diff --git a/docs/adr/0048-cross-package-metadata-collision.md b/docs/adr/0048-cross-package-metadata-collision.md index 8a077368749..63660433394 100644 --- a/docs/adr/0048-cross-package-metadata-collision.md +++ b/docs/adr/0048-cross-package-metadata-collision.md @@ -1,6 +1,6 @@ # ADR-0048: Cross-package metadata collision — package-id identity, namespace install gate, package-scoped resolution -**Status**: Revised (2026-06-13) — supersedes the original *per-item collision detection* framing. The runtime guard shipped under the original proposal is **retained as a same-package authoring backstop**; the strategic direction for the app-marketplace era is revised below. · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — §3.3's sentence that a context-free read "is best-effort: it returns the first match": a read of a name a code package ships has an owner — that package, or the declared override its paired `.custom` publishes — and a same-named item of a package outside that closure is served only under its own address (ADR-0146 D8); and §3.4's coexistence "by construction", for a base's dependency closure only: the paired `.custom`'s item bearing a base item's name is a declared override or is refused at publish — declare or rename — and any other dependent package's item bearing a base item's name is refused at publish — rename; only the pair declares (ADR-0146 D2, ruled 2026-10-31 on #28364 and #28390). Packages with no dependency relation keep §3.3 and §3.4 as written; qualify-to-cross, the same-package overwrite and the 2026-10-08 addendum stand. · **Amended** (2026-11-07, [#30794](https://github.com/objectstack-ai/objectstack/issues/30794)): §3.5 — rename-on-install ships for **unmanaged** copies, through the one rename engine `duplicatePackage` applies; a managed install is never renamed and §3.2 stands for it as written. See the dated note under §3.5. · **Amended by [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md)** (proposed 2026-11-08): the 2026-11-06 addendum's one-holder refusal retires type by type as each type's readers carry the package; it stays for platform-requested bare names and, as ruled (ADR-0150 Q2 = A, record [`6724050556`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6724050556) on #31527), for positions. This line takes effect when ADR-0150 is accepted. +**Status**: Revised (2026-06-13) — supersedes the original *per-item collision detection* framing. The runtime guard shipped under the original proposal is **retained as a same-package authoring backstop**; the strategic direction for the app-marketplace era is revised below. · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — §3.3's sentence that a context-free read "is best-effort: it returns the first match": a read of a name a code package ships has an owner — that package, or the declared override its paired `.custom` publishes — and a same-named item of a package outside that closure is served only under its own address (ADR-0146 D8); and §3.4's coexistence "by construction", for a base's dependency closure only: the paired `.custom`'s item bearing a base item's name is a declared override or is refused at publish — declare or rename — and any other dependent package's item bearing a base item's name is refused at publish — rename; only the pair declares (ADR-0146 D2, ruled 2026-10-31 on #28364 and #28390). Packages with no dependency relation keep §3.3 and §3.4 as written; qualify-to-cross, the same-package overwrite and the 2026-10-08 addendum stand. · **Amended** (2026-11-07, [#30794](https://github.com/objectstack-ai/objectstack/issues/30794)): §3.5 — rename-on-install ships for **unmanaged** copies, through the one rename engine `duplicatePackage` applies; a managed install is never renamed and §3.2 stands for it as written. See the dated note under §3.5. · **Amended by [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md)** (proposed 2026-11-08): the 2026-11-06 addendum's one-holder refusal retires type by type as each type's readers carry the package; it stays for platform-requested bare names and, as ruled (ADR-0150 Q2 = A, record [`6724050556`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6724050556) on #31527), for positions. This line takes effect when ADR-0150 is accepted. · **Amended** (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)): §5's authoring-lint bullet, rewritten in place — since ADR-0150 child P ([#31669](https://github.com/objectstack-ai/objectstack/issues/31669)) the bare-name finding of `naming/namespace-prefix` judges only capabilities and positions, and the refusal #30806 phase 3 was to add is withdrawn. §3.4's lint sentence stands as written; see the dated note under §3.4. **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0003](./0003-package-as-first-class-citizen.md) (package as first-class citizen), [ADR-0005](./0005-metadata-customization-overlay.md) (artifact vs runtime overlay precedence), [ADR-0008](./0008-metadata-repository-and-change-log.md) (metadata repository, `MetaRef` identity), [ADR-0010](./0010-metadata-protection-model.md) (package provenance / `_packageId` stamping) **Consumers**: `@objectstack/objectql` (`SchemaRegistry.registerItem`, `ObjectQL.registerApp`, install path), `@objectstack/console` / `objectui` (routing + metadata resolution), package authors, CLI/CI install path, the app marketplace registry. @@ -290,6 +290,15 @@ package — stays covered by the `naming/namespace-prefix` lint in `os lint`. > action bound to an object. See > [Addendum (2026-11-06)](#addendum-2026-11-06-bare-names-resolved-without-a-package-hold-one-package--34-narrowed). +> **Note (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)) — the +> lint sentence above still holds.** [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) +> child P ([#31669](https://github.com/objectstack-ai/objectstack/issues/31669)) retired the +> rule's bare-name finding for the types ADR-0150 D1 puts in buckets 2–4, and kept the finding +> this section relies on (ADR-0150 D9): two items of one type that land on one registry key +> inside one package — among its apps, pages, dashboards, flows, actions (per `objectName`), +> reports and datasets (`DUPLICATE_KEYED_TYPES`, `packages/cli/src/commands/lint.ts`) — are +> still reported. What the rule covers now is in §5. + ### 3.5 Namespace rename-on-install is deferred (non-goal) Renaming a colliding namespace on install would require rewriting **every** @@ -381,25 +390,34 @@ alias is optional and out of scope for the phases below. Status legend: **[done]** shipped · **[proposed]** not yet built · **[deferred]** out of scope here. -- **[done]** Authoring lint: `naming/namespace-prefix` in `os lint` warns on - every bare package-authored top-level name in every manifest collection of a - package that declares `manifest.namespace` (a package without one is not - judged), and gives the rename as its `fix` (ruling C on #30798, #30804). It - does not judge objects (`defineStack` refuses those), views (named for their - object), docs (`docs/namespace-prefix`), extensions, translation bundles, - fields, `functions`, or an item that declares `overrides`. A name carries the - namespace when it is the namespace itself (the namespace-named app per - ADR-0019), starts with `_`, is a dotted `.` name, the - capability shape (maintainer ruling 2026-11-06T11:08Z, recorded in - [#30804 comment 6683456244](https://github.com/objectstack-ai/objectstack/issues/30804#issuecomment-6683456244)), - or starts with `sys_`. The permission set `guest_portal` is exempt, because - the public form doors request it by that bare name (ADR-0138; maintainer - ruling 2026-11-06T14:57Z, recorded in - [#30804 comment 6687835712](https://github.com/objectstack-ai/objectstack/issues/30804#issuecomment-6687835712); - `PLATFORM_REQUESTED_BARE_NAMES`). The rule also reports a name declared - twice in one package among its apps, pages, dashboards, flows, actions (per - `objectName`), reports and datasets. It is warning-only; the refusal is - phase 3 of the same ruling (#30806). +- **[done]** Authoring lint: `naming/namespace-prefix` in `os lint` reports two + warning-only findings over the declarations of one package (amended in place + 2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685), after + ADR-0150 child P, [#31669](https://github.com/objectstack-ai/objectstack/issues/31669)). + - **The duplicate finding** (§3.4, kept by ADR-0150 D9): a name declared twice in one + package among its apps, pages, dashboards, flows, actions (per `objectName`), reports + and datasets (`DUPLICATE_KEYED_TYPES`). It asks for a distinct name, never for a prefix. + - **The bare-name finding** judges only the collections whose names keep the literal + prefix (`PREFIX_JUDGED_COLLECTIONS`): capabilities, spelled `NS.SHORT` (ADR-0150 D1 + bucket 1; maintainer ruling 2026-11-06T11:08Z, recorded in + [#30804 comment 6683456244](https://github.com/objectstack-ai/objectstack/issues/30804#issuecomment-6683456244)), + and positions, one slot per name in the environment (ADR-0150 D7). It judges a package + that declares `manifest.namespace`, and gives the rename as its `fix`. A name carries + the namespace when it is the namespace itself, starts with `_`, is a dotted + `.` name, or starts with `sys_`; an item that declares `overrides` is not + judged. + - **Every other type keeps its short name.** ADR-0150 identifies buckets 2–4 by + (package, name) (D1), so child P retired the warning that asked for `_` + there (D9), and a name already prefixed stays valid. The permission set `guest_portal`, + exempted by ruling 2026-11-06T14:57Z + ([#30804 comment 6687835712](https://github.com/objectstack-ai/objectstack/issues/30804#issuecomment-6687835712); + `PLATFORM_REQUESTED_BARE_NAMES`), is no longer judged at all: permission sets are + bucket 2. + - **No refusal follows.** Phase 3 of ruling C on #30798 (#30806), which was to turn the + bare-name finding into a refusal at `defineStack` and the save door, is withdrawn + (maintainer ruling A 「转向包寻址」, recorded in + [#30806 comment 6721941146](https://github.com/objectstack-ai/objectstack/issues/30806#issuecomment-6721941146); + ADR-0150's status line). - **[done] Phase 1 — install-time namespace gate.** `NamespaceConflictError` + the gate in `SchemaRegistry.installPackage` (refuses a package whose `manifest.namespace` is already owned by a different installed package; diff --git a/docs/adr/0129-object-name-is-the-canonical-id.md b/docs/adr/0129-object-name-is-the-canonical-id.md index 6cd39e98b63..e005dc31cbc 100644 --- a/docs/adr/0129-object-name-is-the-canonical-id.md +++ b/docs/adr/0129-object-name-is-the-canonical-id.md @@ -5,7 +5,11 @@ convoy with #12786). This ADR **records an already-enforced, platform-wide decis changes no shipped behavior. The contract below has been enforced since the parse path was closed by #4001 and is restated by Prime Directive #6 in `AGENTS.md` — what was missing was the decision record itself, and that absence is what produced the phantom citation this ADR -closes (see § History). +closes (see § History). · **Cross-referenced by +[ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md)** +(2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)): objects keep this +record's literal prefix unchanged, and behavioural metadata is addressed by (package, name) instead +of carrying it. See the dated note under D4. **Deciders**: ObjectStack maintainer (2026-08-29), recording a contract in force since #4001. **Relates to**: [ADR-0028](./0028-metadata-naming-and-namespace-isolation.md) (the **Deferred target model** pointing the opposite way — reconciled in D4 below), @@ -82,6 +86,19 @@ design, this ADR is the enforced present. **Until 0028's recorded re-open trigge this ADR is the governing record of object naming.** If 0028 is ever adopted, the adopting work must supersede this record explicitly (Prime Directive #13) — never drift past it. +> **Note (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)) — ADR-0028 +> is re-opened for the behavioural tier only, and this record stays the governing record of object +> naming.** [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) +> (accepted by the maintainer's merge of #31586) supersedes ADR-0028 D1 and D3 in part, for the +> behavioural and presentation types of its buckets 2–4. Objects are its bucket 1, with fields, +> object extensions, views, capabilities, docs and an api's path: they keep the literal prefix, for +> the reason D1 here gives (the name is the table name, read by consumers the platform does not +> control; ADR-0150 D1). Nothing in D1–D3 changes. What ADR-0150 does not take is ruling C on #30798's +> extension of D2's literal prefix to every package-authored name: phase 3 of that ruling (#30806), +> which was to amend this record so, is withdrawn (maintainer ruling A 「转向包寻址」, recorded in +> [#30806 comment 6721941146](https://github.com/objectstack-ai/objectstack/issues/30806#issuecomment-6721941146)). +> A flow, an action, a page or a tool keeps a short name, and the platform carries its package. + --- ## History — why this record exists diff --git a/docs/adr/0130-release-artifact-as-co-ownership-boundary.md b/docs/adr/0130-release-artifact-as-co-ownership-boundary.md index 350ca720597..aec08e4ac49 100644 --- a/docs/adr/0130-release-artifact-as-co-ownership-boundary.md +++ b/docs/adr/0130-release-artifact-as-co-ownership-boundary.md @@ -174,6 +174,21 @@ A release artifact MAY carry N package manifests. Everything inside one artifact one file and installed in one act. That joint delivery **is** the ownership proof; nothing else needs to assert it. +> **Note (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)) — what +> co-ownership does not decide: how a reference between two packages of one artifact resolves.** +> The CLI's picklist-reference check and the post-seal install judge read the paragraph above (the +> install judge until E6, #31731) as +> letting a package resolve a list a sibling package of the same artifact owns, with no declared +> dependency (`packages/cli/src/utils/picklist-references.ts`). That allowance narrows to declared +> dependencies: a bare reference resolves from the referring package's own items, then the unique +> holder in its declared dependency closure (ADR-0141, plus `sys`), else it is refused naming every +> candidate ([ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md) +> D3). A sibling in the same artifact is in that closure only when the referring package's manifest +> declares it, and the author's fix is that one `dependencies` entry. Maintainer ruling N1 on +> #31678, recorded in +> [#31678 comment 6729820123](https://github.com/objectstack-ai/objectstack/issues/31678#issuecomment-6729820123). +> D1's co-ownership claim, and the install gate it corrects, are unchanged. + Therefore the install gate's criterion is corrected from *"is this the same package id?"* to *"are these co-owners within one artifact?"*. This is not a new permission being granted; it is an existing check being asked the question it was always meant to ask. The 2026-08-06 ruling diff --git a/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md b/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md index 1c1a87978a0..f14b10bdec3 100644 --- a/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md +++ b/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md @@ -1,6 +1,6 @@ # ADR-0150: Behavioural metadata is addressed by (package, name) — objects keep the literal prefix; ADR-0028 re-opened for the behavioural tier -**Status**: Proposed (2026-11-08). `docs/adr/` is Tier H (Prime Directive #14): this record becomes **Accepted** by the maintainer's merge. The child cards under [Execution plan](#execution-plan-after-acceptance) are filed under the epic ruling [`6723499113`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6723499113) (child R is #31575); ⛔ no child lands before this record is accepted. **This record declares; it implements nothing**: no schema, no code, no changeset. · **Supersedes in part** [ADR-0028](./0028-metadata-naming-and-namespace-isolation.md) (D1 and D3, for the metadata types of buckets 2–4 below; ADR-0028 stays Deferred for objects and everything else) · **Amends** [ADR-0048](./0048-cross-package-metadata-collision.md) §3.3 and its 2026-11-06 addendum (the one-holder refusal retires per type as that type's readers carry the package, [D9](#d9--what-retires-and-what-stays)) · **Withdraws** the non-object half of ruling C on #30798: phase 3 (#30806 S1 and S5) does not ship. +**Status**: Proposed (2026-11-08). `docs/adr/` is Tier H (Prime Directive #14): this record becomes **Accepted** by the maintainer's merge. The child cards under [Execution plan](#execution-plan-after-acceptance) are filed under the epic ruling [`6723499113`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6723499113) (child R is #31575); ⛔ no child lands before this record is accepted. **This record declares; it implements nothing**: no schema, no code, no changeset. · **Supersedes in part** [ADR-0028](./0028-metadata-naming-and-namespace-isolation.md) (D1 and D3, for the metadata types of buckets 2–4 below; ADR-0028 stays Deferred for objects and everything else) · **Amends** [ADR-0048](./0048-cross-package-metadata-collision.md) §3.3 and its 2026-11-06 addendum (the one-holder refusal retires per type as that type's readers carry the package, [D9](#d9--what-retires-and-what-stays)) · **Withdraws** the non-object half of ruling C on #30798: phase 3 (#30806 S1 and S5) does not ship. · **Amended** (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685), child A): the rulings and epic-seat readings recorded on the children since acceptance are written in: D2 (the shareable namespaces), D3 ((c) and the caller-less references), D4 (owner-less functions), TL;DR 7, and the execution plan's releasability sentence and covered-types paragraph. - **Date**: 2026-11-08 - **Supersedes**: [ADR-0028](./0028-metadata-naming-and-namespace-isolation.md) in part (D1 and D3, for buckets 2–4) @@ -29,12 +29,15 @@ - **Ruled by the maintainer:** - **Child N** (D2, ruled 17:17Z): a `(type, name)` held twice inside one namespace, with `?package=` the exact qualifier (D2 ruling); G1 declares what that refuses against today's first-match read. - **Child K** (Q3, ruled 17:13Z): a namespace equal to an object name, in both directions, at every object door. + - **Step 3 of the ruled resolution rule** (record `6723462584`): a package caller's bare reference whose only holder is a package outside its declared closure, a sibling package of the same release artifact included unless declared (D3 (c); N1 ruled 2026-11-09, record `6729820123`). + - **A clash sealed before phase 1** (ruled 2026-11-09, record `6729831159`): a covered type's name two packages already held is refused to a caller with no package (`409` at a door), not served by first registration (Execution plan, covered types). + - **A same-object, same-name action pair** (ruled 2026-11-09, record `6729825528`): refused with `409` when the caller names no package, in the action family's B card (Execution plan, covered types). - **Added by this record beyond the rulings, accepted by the maintainer's merge:** - **The address grammar's namespace-position literals** (`trigger`, `hooks`, `connectors`, `actions`, `global`, …) are refused as a namespace at install. They live in a `spec/kernel` constant that `route-ledger.ts`'s test pins (D5). - **A package caller's bare reference whose only holder is an environment-authored item** is refused (`outside-closure`), where today the bare slot serves it (D3 (a)). It cannot be measured on a package tree; the D10 upgrade report names each one. - **A name of a bucket 2/3 type that starts with `_`** is refused, because `_`-led segments are the router's (D5). The narrower alternative is recorded under Alternatives. - Measured first-party, none of them refuses anything. + Where measured first-party, none of them refuses anything. --- @@ -96,6 +99,7 @@ ADR-0028 D2 proposed deriving physical names from `(namespace, short)` to hide t - **Identity** is `(package id, type, name)`: the registry's composite key, ADR-0048 §3.1's globally unique package id, and every new stored package column (D8) holds the package id. - **Address** is `(namespace, name)`: the URL segment (D5), the AI face (D6) and the MCP inputs carry the manifest `namespace`, which an author and an AI already know and which the install gate keeps unique per environment (ADR-0048 §3.2). - **Co-owners of a namespace keep each behavioural name unique across it** (child N; ruled: the maintainer accepted D2 「同意」 at 17:17:11Z, seat record [`6724570466`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6724570466) on #31527, with `?package=` kept as the exact qualifier). ADR-0130 and ADR-0141 let several packages share one namespace (HotCRM's five packages all declare `crm`). The address `crm/send_email` must name one item, so within a namespace a `(type, name)` has at most one package holder. This is the object rule of ADR-0130 D3 / ADR-0141 D5, extended to buckets 2 and 3. Measured on HotCRM `6961ab1`: 0 of its 297 behavioural `(type, name)` keys are held by two of its packages, so the rule costs no rename. +- **The shareable namespaces `base`, `system` and `sys` are not judged by that rule** (child N; accepted in the epic seat's red-line review of N, record [`6728571147`](https://github.com/objectstack-ai/objectstack/pull/31717#issuecomment-6728571147) on PR #31717). N's refusal leaves them out, as the ADR-0048 §3.2 namespace gate does. So two packages of one of those namespaces may hold one behavioural name, and a qualified address under it does not always name one item. The door then answers `409` with the candidates and never picks; G1 pins that `409`. - **`sys`** is the reserved kernel package (ADR-0028 TL;DR 5): platform metadata belongs to it, and its address is `sys/NAME`. - **The environment package** has no namespace. An environment item is addressed by its bare name, which is unique in the environment, or under the reserved segment `_env` where a bare name would read as a namespace (D5). @@ -113,6 +117,8 @@ A caller with no package (an environment item, a context-free door, an MCP clien - **(a) A package caller never resolves to an environment-authored item by bare name.** A package cannot declare a dependency on the environment, so an environment item is in no package's closure. A name that only an environment item holds is refused for a package caller (`outside-closure`), and the refusal names the environment as the holder. **This is a declared narrowing**, added by this record within the letter of the ruled rule. Today `getItem` serves the bare slot first to every caller (D4's overlay row), so a package flow's `template: welcome` filled by an environment-authored template is served today and refused once its reader is wired. It is carried by the E rows that wire a package caller (E1–E6, E8) and by U only through G1's door: Studio's held id travels as `?package=` (`client.meta.getItem`), so at the door it is the exact qualifier (D5), never a caller. G1 declares what that refuses. It cannot be measured on a package tree (HotCRM holds no environment), so the D10 upgrade report names each such reference as the migration finds it. - **(b) An overridable platform baseline ranks below a package holder.** These are the items of phase 1's `OVERRIDABLE_BASELINE_PACKAGES`; today that is the email service's built-in templates (ADR-0131 D6/D10). They rank below a package holder in step 2 and in the context-free environment step. A baseline item answers only when no package holds the name among that step's candidates, as the template loader serves it today. In step 2 the candidates are P's closure, so a baseline outside it is refused in step 3, never answered by an environment-wide fallback. +- **(c) A package caller never resolves to a package outside its declared closure by bare name.** Where the only holder of a name is a package Q that P's closure does not reach, today `getItem`'s first-composite fallback serves Q's item. Once the reader is wired through R, step 3 refuses it as `outside-closure`, naming Q. This is step 3 of the ruled rule (record `6723462584`), and the epic seat recorded it as such (record [`6728487836`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6728487836) on #31527): each E and G child declares it in its `Narrowing:` line beside (a), with its measured first-party count. + - **A sibling package of the same release artifact is no exception** (N1, ruled 2026-11-09: declared closure only, record [`6729820123`](https://github.com/objectstack-ai/objectstack/issues/31678#issuecomment-6729820123) on #31678). It is in P's closure only when P's manifest declares it: the artifact is ADR-0130's co-ownership boundary, not a resolution scope. The CLI's picklist-reference check and the post-seal install judge narrow their sibling allowance to declared dependencies (ADR-0130's dated note under D1), and the author's fix is one `dependencies` entry. Severity follows that record: the `kernel:ready` picklist audit warns and names every candidate, the read serves the field no options and the validator refuses a value, and the post-seal install judge refuses. The D10 upgrade report lists each such reference. **Exceptions (ruled).** @@ -123,6 +129,11 @@ A caller with no package (an environment item, a context-free door, an MCP clien **A reference written in an environment-authored overlay (ADR-0005) is the environment's reference.** It resolves as a caller with no package: the environment item first, else the unique package holder, else the refusal with candidates. It never resolves from the package the overlay customizes. That keeps the ruled Q2 mechanism working (D7: an administrator's overlay of P's position adds a set of another package Q, or an environment-authored set), and today's admin customizations too, such as an overlay of a package field's `picklist`. It loosens nothing, because the answer is one holder or a refusal, and it guesses nothing. +**Two more references are the environment's, and resolve as a caller with no package.** + +- **An extension's target.** A picklist extension (`picklistExtensions.extend`) adds values to a list another package owns. It is a contribution to that item, like an overlay or an `object_extension`, not a reader of it. So its target resolves caller-less: the unique holder in the environment, else a refusal naming every holder (epic-seat ruling X on #31678, record [`6728613177`](https://github.com/objectstack-ai/objectstack/issues/31678#issuecomment-6728613177)). A field's `picklist` stays a reference resolved from the field's package. +- **The audience anchors `everyone` and `guest`.** The permission sets they bind resolve caller-less, not from the package that registers the anchors (an epic-seat reading, recorded in its red-line review of E3, record [`6732998040`](https://github.com/objectstack-ai/objectstack/pull/31815#issuecomment-6732998040) on PR #31815). + ### D4 — The runtime keys carry the package Every runtime index that keys a bucket 2 or 3 item by bare name gains the package coordinate. Each becomes `(package id, name)`, or `(package id, objectName, name)` for an action bound to an object: @@ -141,6 +152,11 @@ Every runtime index that keys a bucket 2 or 3 item by bare name gains the packag Hooks bind by event and object and already carry `packageId`. Only `isArtifactShippedHook` (name-only) gains the package. +**An owner-less engine function registration is the platform's holder, not the environment's item** (the epic seat's review of R2, record [`6729484996`](https://github.com/objectstack-ai/objectstack/pull/31733#issuecomment-6729484996) item 2, refined by its re-review [`6730444942`](https://github.com/objectstack-ai/objectstack/pull/31733#issuecomment-6730444942) item 1). An `engine.registerFunction` with no owning package is code a plugin or host registers, never an item authored in the environment (bucket 4 is authored metadata). It resolves like `sys`, reachable from every caller's closure: + +- a package caller gets its own function first, then the unique holder among its closure and the platform; two or more of those are refused `ambiguous-in-closure`, naming each; +- a caller with no package gets the environment's own item first; after it, the platform counts as one more holder beside the packages, so the platform alone answers, and the platform beside a package holder is refused `ambiguous-in-environment`, naming each. + **A package-less row that bears a package-held name is a customization, never a second item.** A `sys_metadata` row with `package_id` NULL hydrates into the bare slot today (`registerItem`). Where a package holds that `(type, name)`, the row is the ADR-0005 overlay of that one phase-1 holder (`bare-name-one-holder.ts` already counts it as no holder). It is not a bucket-4 item, so it never arms beside the item it shadows (E1) and never makes the name ambiguous. Its migration into a declared override in the holder's paired `.custom` package is [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) D11's, and this record does not repeat it (R15). A bucket-4 item is therefore one whose `(type, name)` no package holds. If a package installed later takes such a name, the row reads as that holder's overlay, which is what the bare slot does today. The D10 upgrade report names the row. ### D5 — Addresses: an optional namespace segment, `409` on ambiguity @@ -270,9 +286,14 @@ This replaces #30806 S3's name rewrite. Nothing is renamed, so nothing is rewrit Each slice is a child card, filed under the epic ruling `6723499113`; ⛔ none lands before this record is accepted. **Who builds** follows ruling `6723571682`: the epic seat keeps D and R; E, G and S go to the `domain:server` queue, P to `domain:spec`, the Studio slice to the ui lane, #31515 to the cloud lane. **Order** (same ruling): R before E and G; S after E and G; the backstop narrowing last. -**Every child is independently releasable** (red line 3). It is additive: nullable package columns are backfilled before any reader uses them, an index gains the package without dropping the bare path, a URL gains an optional segment, and a bare name keeps resolving to its unique holder, except a package caller's reference whose only holder is the environment (D3 (a), declared on the rows that carry it). +**Every child is independently releasable** (red line 3). It is additive: nullable package columns are backfilled before any reader uses them, an index gains the package without dropping the bare path, a URL gains an optional segment, and a bare name keeps resolving to its unique holder, except a package caller's reference whose only holder is the environment (D3 (a)) or a package outside its declared closure (D3 (c)), each declared on the rows that carry it. + +**Covered and uncovered types.** For the 14 types phase 1 covers (`BARE_NAME_ONE_HOLDER_TYPES`' 13 plus permission sets), adding the coordinate changes no observable answer for a name phase 1 keeps to one holder. (`BARE_NAME_ONE_HOLDER_TYPES` is picklist, mapping, dataset, api, the object-less action (ADR-0048 P1.7), function, flow, webhook, connector, email_template, agent, skill and tool (ADR-0048 P1.10, #31414), so E6's whole surface is covered.) Two cases have two package holders even so, and each is a narrowing that the rows meeting it declare: + +- **A clash sealed before phase 1.** The cold-boot seal only warns, so a deployment that held a covered name twice before phase 1 keeps both holders, and today the first registered answers. Through R, a caller with no package is refused, naming both packages (`409` at a door), and a package-qualified address reaches the intended one. There is no sealed-set exception in R (#31677 Q1, ruled A 2026-11-09, record [`6729831159`](https://github.com/objectstack-ai/objectstack/issues/31677#issuecomment-6729831159)). Each E child that meets it declares it in `Narrowing:` (E5 measured 0 on HotCRM `6961ab1`), and S4's upgrade report names each sealed clash with both packages. +- **An action bound to an object.** Phase 1 covers only the object-less action, so two packages may each bind an action of one name to one object. Today the last registered handler runs, with a boot warning only (ruling `6262054499` on #24472). A call that names no package is refused with `409` `RESOURCE_CONFLICT`, naming both packages, and a package-qualified address reaches the intended one. The refusal lands in the action family's B card #31697, after E2, G1, G2 and S4; E2 keeps today's visible behaviour (#31697, ruled A 2026-11-09, record [`6729825528`](https://github.com/objectstack-ai/objectstack/issues/31697#issuecomment-6729825528)). -**Covered and uncovered types.** For the 13 types phase 1 covers (`BARE_NAME_ONE_HOLDER_TYPES`' 12 plus permission sets), no two package holders of a name exist while its refusal stands, so adding the coordinate changes no observable answer. (`BARE_NAME_ONE_HOLDER_TYPES` is picklist, mapping, dataset, api, action, function, flow, webhook, connector, email_template, agent and skill, so E6's whole surface is covered.) The other 12 bucket 2/3 types have no backstop: sharing rule, queue, assignment rule, hook, job, app, page, dashboard, report, book, cube and tool. (`rag_pipeline` is retired (#31456) before the ruled table was measured; no child touches it.) Two of them change no bare answer: +**Uncovered types.** The other 11 bucket 2/3 types have no backstop: sharing rule, queue, assignment rule, hook, job, app, page, dashboard, report, book and cube. (`rag_pipeline` is retired (#31456) before the ruled table was measured; no child touches it.) Two of them change no bare answer: - **Hook** has no first-match read to narrow: it binds by event and object, and `isArtifactShippedHook` is a yes/no predicate (D4). - **Job** keeps `jobKeyFor`'s reading (E7): the first holder keeps the bare key, and a second holder already gets its own `APPID:jobName`. @@ -324,7 +345,7 @@ Each child PR proves it is releasable with four readings: **Count:** D, R, N, K, P, A, U and C (8), 8 E, 3 G and 4 S make 23 build children, N and K included. That is one above the evaluation thread's estimate of 18–22, because of K, which carries the Q3 ruling. -The B children are one per covered type, 13 in all (phase 1's 12 types plus permission sets), and small. Several types of one family can ride one PR where their E, G and S children have all landed. The trailing B children are new, and come from red line 3. +The B children are one per covered type, 14 in all (phase 1's 13 types plus permission sets; `tool` joined phase 1 in #31414, ADR-0048 P1.10), and small. Several types of one family can ride one PR where their E, G and S children have all landed. The trailing B children are new, and come from red line 3. **Hand-off outside this epic** (no child, so the count is unchanged): the scenario scorer's `bare-name` Build check and build prompt narrowed to bucket 1 types and positions (D9), filed by the cloud#3600 epic seat ([`6726694021`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6726694021)) to the lane that owns the scorer, with or before P. diff --git a/packages/cli/src/utils/picklist-references.ts b/packages/cli/src/utils/picklist-references.ts index 931bc8f2979..ce51b5249ff 100644 --- a/packages/cli/src/utils/picklist-references.ts +++ b/packages/cli/src/utils/picklist-references.ts @@ -42,6 +42,15 @@ * (ADR-0130), so a list a SIBLING package in the same artifact owns resolves * here exactly as one the declaring package owns. * + * Note (2026-11-09): this sibling allowance narrows to declared dependencies. + * ADR-0150 D3 resolves a bare reference from the referring package, then the + * unique holder in its declared dependency closure (ADR-0141, plus `sys`), + * else refuses it naming every candidate; a sibling of the same artifact is in + * that closure only when the referring package declares it (maintainer ruling + * N1, record 6729820123; ADR-0130's dated note under D1). The code below still + * resolves against every body's picklists until the CLI reader is wired to + * that rule. + * * ## A composed stack's top-level picklist that nothing names: refused * * The boot keeps a composed stack's residual picklist (a top-level one no