Repository navigation
fix(metadata-protocol)!: an unmanaged rename refuses a package without namespace whose object names all share a prefix other than the derived one - #36138
Conversation
…espace the object names contradict A package body without namespace derives one from its id; renamed into a targetNamespace, an object that does not carry the derived prefix is now refused (INVALID_REQUEST / 400, the rename refusal) instead of copied under a second prefix. Co-Authored-By: Claude <noreply@anthropic.com>
… a name carrying another prefix Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 37c19c7832ea92aced51781ccf87da04d253b1c3 && git checkout 37c19c7832ea92aced51781ccf87da04d253b1c3
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 713545fd118fa9839795394bc01c376018c97826 b2e82158b5ebe7f2f06a5f2d318930353483ac6b && git checkout -B drift-repro 713545fd118fa9839795394bc01c376018c97826 && git merge --no-ff b2e82158b5ebe7f2f06a5f2d318930353483ac6b
node scripts/docs-audit/affected-docs.mjs --json 713545fd118fa9839795394bc01c376018c97826 |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5nwb5fUkxg7Q9NVxvR Final head:
Generated by Claude Code |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5 L1 verdict (L1-a): REWORK, held on one reading question for the seat at head 席位核对Shape and gates.
What the code does. R1 (held for the seat; I do not decide it). Whether a multi-segment name without the derived prefix counts as "carrying another prefix" (refused) or as "a name that lacks the package's prefix" (renamed in front).
R2 (after R1 is answered). Pin the answered reading with a test on a multi-segment name that lacks the derived prefix and is not a real foreign prefix (for example N1 (nit, non-blocking). The hint Not findings. Refusal tests assert status and code ( Next. The seat answers R1. Then the dev round adds R2's pin (and the narrower trigger if the ruling needs it), and I read only that delta. |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv Contract reviewServed-tier: Full contract review on the narrowing face (card #35823). Read: the card and all comments, the order, the PR body, dev report 7066304394, final-head declaration 7066311396, ADR-0048 §3.5, the rename engine and the docs page; diff vs merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
…' common prefix A per-name signal refused two-word short names (purchase_order) that ADR-0048 section 3.5 renames in front. Refuse only when two or more objects all share a first segment other than the derived namespace and none carries the derived prefix; the remedy no longer suggests a value. Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv Contract reviewServed-tier: Delta read of record 7066393959 by the same isolated contract-tier reviewer. Head = round commit ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5nwb5fUkxg7Q9NVxvR Final head:
Generated by Claude Code |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5 L1 verdict (L1-a): ACCEPT at head 席位核对Shape and gates.
R1, against the seat reading. The per-name check is gone.
Otherwise ADR-0048 §3.5's rename applies, as on main.
R2 pins, all present.
N1 fixed. The remedy now reads "Declare Docs and changeset. The Not findings.
Next. Landing is the seat's: contract delta PASS 7066464020 and this ACCEPT, both at b2e8215. |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv 席位核对Landing · 2026-11-21T18:31Z · head
Ready + auto-merge now. |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv Contract reviewServed-tier: Final grading of record 7066464020 at the same head by the same isolated contract-tier reviewer, after follow-up #36166 was filed. No new commit; CI 45 success / 19 skipped, none failed or pending; L1-a ACCEPT 7067288301; dogfood battery at this head 483 files / 4101 tests (os-dev-report 7067313122). ① Derived judgments
② Semver levelUnchanged from 7066464020: ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. Nits stand as nits: the unreachable Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv 席位核对Awaiting the maintainer's merge (narrowing) · 2026-11-21T18:53Z · head
|
…ackage and a declared namespace its object names do not carry (objectstack-ai#37065) <!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_ Part of objectstack-ai#36166 Clause-②: no (narrowing) Metadata-protocol: none Ruling-ref: objectstack-ai#36166 comment 7146137652 Skills-docs: none — no skill under `skills/**` teaches the unmanaged install's `targetNamespace` rename (`git grep` of `skills/` for `targetNamespace`, `rename-on-install` and `unmanaged`: zero hits at a73edb3; control: `namespace` hits `skills/objectstack-api/SKILL.md` six times) Seat: repo:objectstack#2 · huangyiirene · session_01J8VVAjMiYmA3shv2bCSnaS > **Declaration ruled.** The maintainer chose 「B 照 objectstack-ai#36138 先例声明为 patch」 (seat record `Ruling-ref: objectstack-ai#36166 comment 7146137652`): the changeset is `patch` with `Clause-②: no (narrowing)`, `Metadata-protocol: none` and the ADR-0087 `not-required (no-migration-prescription)` marker, the same pair as objectstack-ai#36138's changeset. No `packages/spec` entry is written. The diff changes the answer an install request gets, not what a metadata author can write. ## 维护者速读 - 以不托管方式安装应用包并指定新命名空间的人:原来有两种包会被静默拼成双前缀的对象名,现在安装前就拒绝并说明原因;只有一个对象的包照旧改名。 - 属于"应用包安装与命名"这条线,接续上一轮已合并的双前缀拒绝修复。 - 碰到这两种包的安装者会看到明确的拒绝,不再得到三种拼写混杂的副本;改法是在包上声明命名空间,随时可撤回本改动。 - 无。 ## What changes `planUnmanagedImport` (`packages/metadata-protocol/src/package-unmanaged-install.ts`), on the rename path only (a `targetNamespace` that differs from the source namespace). Each of the card's three cases now has an answer, and a test pins each one: 1. **Single object, namespace-less (`demoasset_asset` alone): stays as the ADR-0048 §3.5 rename.** One name carries no signal; the planner docblock already says a single name cannot tell a two-word short name from a foreign prefix. The pin keeps its assertion. Its title now states the decision: `DECIDED: a single-object package keeps the ADR rename, foreign prefix or not`. 2. **A stray object beside a shared prefix (`demoasset_asset`, `demoasset_site`, `site`): refused.** `derivedNamespaceContradiction` now groups object names by first segment. When no object carries the derived prefix, every group of two or more is refused at its own names. The stray is in no entry and does not lift the refusal. Before this, the `every(...)` early return let one stray turn the signal off. 3. **A declared `namespace` the object names do not carry (`namespace: 'other'`, `demoasset_*`): refused.** The new `declaredNamespaceContradiction` asks the one prefix judge, `validateObjectNamespacePrefix` (`@objectstack/spec/kernel`), the same judge `defineStack`, the publish pre-flight and the save door ask. Each object it refuses is named. Both refusals use the existing `unmanagedInstallRenameRefusal` envelope (`400 INVALID_REQUEST`, `details.targetNamespace`, `details.refused` with one object entry each, its `reason` naming the namespace in play and the prefix). They are raised before the base exists. ADR-0129 D2 and ADR-0048 §3.5 ids stay on the docblocks. **Mechanism assumptions, as measured** (scratch probe at a73edb3, deleted afterwards): - PM assumption 1 (case 3 without a rename refuses at the save door): **holds**. `importUnmanagedPackage` with no `targetNamespace` answers `NAMESPACE_PREFIX/422`. But the same probe shows the save door also refuses the honest namespace-less `purchase_order` without a rename (`NAMESPACE_PREFIX/422`), a name the ADR rename turns into an install that works. So "the two doors agree" does not tell the cases apart. The fact that does is the judge's own skip: a package with no `namespace` is the legacy shape whose objects are not judged, while a declared one is held to its prefix at every authoring door. Case 3 is refused on that basis, and a test pins the save-door agreement as a CONTROL. - PM assumption 2 (the group signal): **holds**. No CONTROL changes answer: `purchase_order`+`asset_owner` share nothing, `asset`+`site` have no segment, and one object carrying the derived prefix still clears it. `purchase_order`+`purchase_item`+`vendor` is now refused (`purchase_order`, `purchase_item` named). Without `vendor` it was already refused by objectstack-ai#36138. - PM assumption 3 (case 1 stays as the rename): **holds**, as decided above. Contract-review fix round (record 7154567814 on this PR): the refusal for a group that is not the whole package now ends by asking for every other object to be named under the declared namespace too, since declaring the group's prefix alone would be refused on the next attempt (S2); a whole-package group keeps objectstack-ai#36138's sentence. `content/docs/deployment/install-modes.mdx` now teaches the new answers: the in-front rename holds for a package that declares no `namespace`, the group row no longer needs every object name, and a new row covers a declared `namespace` the object names do not carry (S1). The changeset names the bare-name case and its closing remedy is "declare `namespace` and name every object under it" (S1, S2). A test with two refused groups in one body pins the refused names in manifest order (N4), and the docblock says the stray is refused by the save door too (N1). Fixture triage, same file: `refuses an object whose copy name another object's copy claims` built its collision from a bare `lead` under a declared `crm`, which case 3 now refuses first. Its fixture drops `namespace` (so `crm` is derived from `com.example.crm`), and it still pins the collision branch, which namespace-less bodies still reach. The new declared-namespace test also pins a bare name under a declared namespace as refused. ## ADR note owed Carrier: objectstack-ai#36166 itself. It stays open under `Part of` until the ADR-0048 §3.5 dated note (and the case-1 decision) lands as an add-only governed docs/adr PR, which carries the closing line for objectstack-ai#36166. (The earlier "ADR revisions" rolling card objectstack-ai#36086 closed on 2026-11-24.) > **Note (2026-11-24, objectstack-ai#36166, following objectstack-ai#35823 / PR objectstack-ai#36138)** — on §3.5's rename sentence "a name that lacks the package's prefix takes it in front". On the unmanaged rename path that sentence now has three bounds. (1) A package that declares no `namespace` is refused, not renamed, when no object name carries the namespace derived from its id and two or more object names share a first segment: each object of each such group is refused (`400 INVALID_REQUEST`), whether every object shares the segment (objectstack-ai#36138) or a stray object stands beside the group (objectstack-ai#36166). So two-word short names the package repeats (`purchase_order` beside `purchase_item`) are refused too, and declaring `namespace` lifts the refusal. (2) A package that declares a `namespace` is refused for each object name the namespace-prefix judge (`validateObjectNamespacePrefix`) refuses under it. The rename has no declared prefix in such a name to replace, and every authoring door already refuses that name. (3) Decided to stay as written: a namespace-less package's single object, foreign prefix or not (`demoasset_asset` alone copies as `TARGET_demoasset_asset`), because one name cannot tell a two-word short name from a foreign prefix. Namespace-less object names that share no first segment (`purchase_order` beside `asset_owner`, bare `asset` beside `site`) also stay as written. A body that writes the id-derived namespace out as `namespace` is judged as declared, so bound (2) applies to it and the shapes in (3) are refused for it. Pinned in `packages/metadata-protocol/src/package-unmanaged-install.test.ts`. ## Tests - `package-unmanaged-install.test.ts`: four new refusal tests: the stray-object plan and the verb with zero writes; the repeated two-word short name with and without a stray, and the declared control; the declared-namespace plan, partial and bare cases, and the verb with zero writes (`writes`, `packages`, `sys_metadata` empty). One new CONTROL (the save door agrees without a rename). One CONTROL retitled `DECIDED`. The declared CONTROL keeps its `namespace: 'demoasset'` half and loses the `other` half, now a refusal. Refusal tests assert `status` + `code` and the `details.refused` names. The only prose they check is the namespace named in `reason`. <details><summary>Test runs (first round at tree 710745f; the fix-round head c4494a6 re-ran below)</summary> - At c4494a6, after building the metadata-protocol closure under the verify lock: target file `Tests 113 passed (113)`; `pnpm --filter @objectstack/metadata-protocol test` `Test Files 370 passed | 9 skipped (379)`, `Tests 23420 passed | 45 skipped (23465)`; `typecheck` (`tsc --noEmit`) exit 0; `VERDICT command-exit 0`. The S2 change alters only the remedy sentence, which no test asserts (refusal tests assert status, code and refused names), so no ablation was owed for it. - `pnpm --filter @objectstack/metadata-protocol test` (under the verify lock): `Test Files 369 passed | 9 skipped (378)`, `Tests 23396 passed | 45 skipped (23441)`; `pnpm --filter @objectstack/metadata-protocol typecheck`: `tsc --noEmit` exit 0; lock `VERDICT command-exit 0`. - Consumer sweep (the rename's callers with real fixtures): `pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/protocol-unmanaged-import-rename-battery.test.ts src/protocol-package-lifecycle.test.ts`, after a rebuild of objectql's closure that includes `metadata-protocol` (`dist/index.js` carries `declaredNamespaceContradiction`): `Tests 22 passed (22)`, `VERDICT command-exit 0`. The cloud-connection install-local tests stub the importer. The dogfood and runtime callers use `duplicatePackage`, which is not touched. </details> <details><summary>Ablations (committed first; `scripts/ablation-replace.mjs`, restore = HEAD blob, `git diff HEAD` empty)</summary> - Case 2: the group-size guard (skip a group of fewer than two names) gained a second clause that also skips any group smaller than the whole object set, which puts the old every-or-nothing hole back. The mutation landed (anchor 1 to 0, blob b652573 to 50f7c2b9). Red: `Tests 3 failed | 109 passed (112)`, the stray-object plan, the stray-object verb and the repeated short name with a stray. Restored: blob b652573 == HEAD, `git diff HEAD` empty. - Case 3: anchor `: declaredNamespaceContradiction(sourcePackageId, declaredNamespace, namespace, objectNames);` replaced with `: undefined;`. The mutation landed (blob b652573 to ce8284d8). Red: `Tests 3 failed | 109 passed (112)`, the three declared-namespace refusal tests. Restored: blob == HEAD, `git diff HEAD` empty. - Green before and after: `Tests 112 passed (112)`. </details> ## Acceptance notes - `content/docs/deployment/install-modes.mdx` is the one hand-written page that teaches this rename; it is updated in this PR (contract-review S1). No skill teaches it (see `Skills-docs:`). - The refusal does not add `details.derivedNamespace` / `details.commonPrefix` keys. Each `reason` names them, as the objectstack-ai#36138 envelope does. Adding keys would change the envelope's shape, which this card does not own. ## Verification <details><summary>Readings at the head c4494a6</summary> - Derived gates at c4494a6 (`dispatch-gates.mjs --commands`, 95 families; `--ran` with exit codes: 95 derived, 91 run, 4 NOT MEASURED, 0 unrun): all 91 exit 0, including `check:doc-authoring`, `check-changeset-no-major --base origin/main`, `check-adr-0087-registration --base origin/main`, `check-empty-changeset --base origin/main`, `check:nul-bytes`, the docs-section and ADR-link families the page edit adds, and `check:liveness`. NOT MEASURED (exit 3, prerequisite missing in this checkout; CI builds them): `check:dual-build-cjs-loads`, `check:lean-entry-closure`, `check:skill-examples` (client SDK not built) and `check-plugin-teardown-shape --self-test` (needs an unshallow clone). `overlap-check`: VERDICT clean exit 0 against origin/main a386a1d. - PR check-runs at c4494a6, all completed: 40 success, 15 skipped by their selectors, 0 failed. The successes include every required context in play: Lint & Repo Gates, TypeScript Type Check, Test Core and Test Core 1/10 to 10/10, Build Core, Governed Surface Queue Guard, Live E2E UI, Test UI, Dogfood Regression Gate, plus Check Changeset, Build Docs, Check Documentation Links and Spec property liveness. - **Full dogfood battery at c4494a6** (owed by the `(narrowing)` arm): `git rev-parse HEAD` = c4494a6 before and after, clean tree. Dogfood closure built under the verify lock (VERDICT command-exit 0), then `pnpm --filter @objectstack/dogfood test` with no shard and no path: `Test Files 487 passed | 3 skipped (490)`, `Tests 4128 passed | 68 skipped (4196)`, `VERDICT command-exit 0` (held 2175s), no failures. - Earlier readings, superseded: c171abb `Tests 4128 passed | 68 skipped (4196)`; 1188c47 `Tests 4127 passed | 68 skipped (4195)`. - Accepted deviation (contract-review N2, inherited from objectstack-ai#36138's signal): on the namespace-less path, two or more `sys_*` object names form a group and are refused with "declare `namespace`", while the declared path's judge exempts `sys_*`. Left as it is; only the stray case is new in this PR. </details> **Read first:** (1) `declaredNamespaceContradiction`: is the prefix judge the right predicate for refusing a declared-namespace object? (2) `derivedNamespaceContradiction`'s grouping loop: does any group of two or more refuse an honest package you care about? (3) The retitled `DECIDED` single-object pin. **Two-minute verification:** `pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 src/package-unmanaged-install.test.ts` shows `Tests 112 passed (112)`. Session: https://claude.ai/code/session_01J8VVAjMiYmA3shv2bCSnaS 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#2 · huangyiirene · session_01J8VVAjMiYmA3shv2bCSnaS --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
…ut of step with main (week of 2026-11-25) (objectstack-ai#38289) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDypKu7B9nwbu5WuV7AEio8)_ Fixes objectstack-ai#37245 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;只在十份设计记录里补了带日期的说明,写明主线现在实际怎么做,原有的决定文字一个字没动。 - 为什么做:属于「每周设计记录修订」滚动清单(11 月 25 日这一周);清单每一行指出一处「记录写的和主线不一致」,这次一并补齐,免得照着记录干活的人被过时说法带偏。 - 出错会怎样:最坏是某条补充说明写得不准,读这些设计记录的人会碰到;纯文档、只增不删,可以直接撤回,不影响任何功能。 - 要你做什么:请审这些补充说明并亲手合并(设计记录须由你本人合)。 ## What changes Ten ADR files gain notes dated 2026-11-28. Every diff line is an addition: 239 lines added, 0 removed. No original decision text is rewritten, and no decision changes. Each note follows the note convention its own record already uses. Each row's "what is true now" was read against the code on `main` before it was written. Where a row was wrong or had gone stale, the note says what `main` does, and the table and the list under it say so. | Row (comment id on the card) | ADR and section | Result | |:---|:---|:---| | Card body row (from objectstack-ai#37238) | ADR-0146, the 2026-11-24 amendment, "32 registered types" | **Landed. Row stale.** The row asks for 33; the registry holds 35 entries on `main`. The note states no count and points at the registry and at ADR-0084's table. | | 7155511307, nit 1 | ADR-0160 D1, the door's page cap sentence | **Landed. Row stale.** The row says the door has no page cap. PR objectstack-ai#37354 added one. The note says what `main` does: the list is cut one row under the door's cap, not at it. | | 7155511307, nit 2 | ADR-0160 D1, "only contains braces" | **Landed** as the row asks. | | 7155511307, nit 3 | ADR-0160 D3, the link-field sentence | **Landed as a note that the sentence stands.** | | 7161785832 | ADR-0158, Open items 9 and 12 | **Landed.** | | 7178404228, anchor half | ADR-0066, line 146 | **No edit.** PR objectstack-ai#37621 already landed it (record 7198334624). | | 7178404228, end-state half, with 7201928772 | ADR-0066 D2 ⑧ | **Landed.** Its prerequisite, PR objectstack-ai#37371, is merged. The proposed text is tightened in two places, listed below. | | 7179515770 | ADR-0158 U3, U6, L4, Open item 10 | **Landed.** | | 7184833647 | ADR-0159, Context, "One name already taken" (line 109) | **Landed as a note. The anchor line is untouched.** This is not a no-edit row: the anchor resolves, onto the opposite meaning. See below. | | 7187445064 | ADR-0158 L1, L2, Open items 6, 8, 10 and 11, and a new Open item 13 | **Landed.** | | 7195437501 | ADR-0010, the amendment note of 2026-11-24 | **Landed**, with one arm `main` has gained since the row was written. See below. | | 7212321297, first row | ADR-0067 D3 | **Landed. Row wording wrong.** The note carries the revert rule that the `form` type brought. See below. | | 7212321297, second row | ADR-0160, implementation split, row 7's bullet | **Landed.** The row places the stale path near line 425; it is near line 491. | | 7213085888 | ADR-0048 §3.5 | **Landed.** The row's ready text, dated 2026-11-28, with symbol anchors where it had line numbers. | | 7215202653, corrected by 7215223685, with 7224476684 | ADR-0150 D3, the note of 2026-11-26 | **Landed.** Item 2 of the first row said the two doors were still open. The later row supersedes it: PR objectstack-ai#37948 merged, and both doors now refuse. | | 7217585102 | ui ADR-0057, A2 and A3 | **Landed. Row stale on one line.** The plan-marker line is written as `main` is today, after PR objectstack-ai#37970, and not only as it was after PR objectstack-ai#37720. | Comments that are not rows: 7186949648 (triage note), 7196224618 (a one-row claim), 7196910014 (its report), 7198334624 (its landing record) and 7237786310 (this claim). **No row is held.** Every prerequisite is merged on `main`: PRs objectstack-ai#37219, objectstack-ai#37240, objectstack-ai#37268, objectstack-ai#37354, objectstack-ai#37366 (which carried objectstack-ai#37422), objectstack-ai#37371, objectstack-ai#37389, objectstack-ai#37423, objectstack-ai#37449, objectstack-ai#37640, objectstack-ai#37720, objectstack-ai#37818, objectstack-ai#37931, objectstack-ai#37948, objectstack-ai#37970, objectstack-ai#37065, objectstack-ai#36138 and objectstack-ai#37021. The card has 19 comments as of this pull request; a row added after comment 7237786310 is not in it. ### Where a note differs from its row - **ADR-0146.** The row offers two forms, "give the count" or "point to ADR-0084's table". The note takes the second. A count written today would already be the third reading (32, then 33, now 35). - **ADR-0160 D1, the page cap.** The row's premise was true when it was written and is not now. `RecordContextDoor.pageCap` exists, and both doors answer it. The note records the one-row difference between the amendment's words and the code: a list whose cut plus its probe row would pass the cap is cut one row under the cap. - **ADR-0160 D3, the link field.** The note leaves the wording alone. - **ADR-0066 D2 ⑧.** Two changes to the proposed text. The note says in words that `viewAllFieldsReadVote` replaced `superuserFieldVote`, and anchors only the function that exists. And it does not say that nothing re-opens a lock across sets: another set's `viewAllFields` still makes a hidden field readable, and another set's field row with `editable: true` still grants the edit, because field grants union without deny. - **ADR-0159, line 109.** PR objectstack-ai#37422 was merged into PR objectstack-ai#37366's branch, so the anchor `view.zod.ts#defineForm` resolves and the gate is green on it. It now resolves onto the `form` type's factory, while the paragraph describes the Studio helper, which is `defineMetadataForm` today. The paragraph is Context and describes the tree before the ruling was carried out, so the note leaves it as written and states both names. - **ADR-0010.** The row covers the three restore doors of PR objectstack-ai#37423. The same rule has since gained a second refusal, from PR objectstack-ai#37640: a restore that would write a version the platform registered into a package's row. The note has one sentence on it. That sentence goes beyond the row; cut it if the note should carry the row alone. - **ADR-0067 D3.** The row asks for a note "naming `form` as a translated metadata type". D3 is about undo granularity and has no such notion. The contract reviews of PR objectstack-ai#37422 sent one fact to this record: a `form` item is reverted only after every `view` row its commit edited is put back, and it joins `failed[]` otherwise. The note records that. - **ADR-0048.** The row's text was dated 2026-11-24. The note is dated 2026-11-28, the day it was written into the record. - **ADR-0150.** Besides answering "Not judged yet", the note qualifies one sentence of the 2026-11-26 note that said too much: the draft discard is newly refused only over a stored package-less draft. Where it was already refused, only its sentence moved. - **ADR-0158.** Row 7179515770 points at a draft held by its seat, which this session could not read. The notes are written from the two rows and the code. Open item 13 is a new numbered item at the end of the list, carried from the display card; it is marked not built and not settled. - **ui ADR-0057.** The row asks for "what main does after objectstack-ai#37720". `main` has moved once more: since PR objectstack-ai#37970 the entry's marker stands for a write that waits for approval. The note says that, and that A5's "Not recorded yet" bullet held until that pull request merged. ## Tests Docs only. No package is touched, so no build closure and no package test is owed for the change. No tested behaviour changed, so there is no ablation. What was checked by hand, on the committed text: - Each phrase a note quotes from its ADR was compared with the base file. - Each verbatim maintainer quotation was compared, byte for byte, with its record on GitHub. - Each cited path and symbol exists on `main`. The one exception is deliberate: the ADR-0160 note names `packages/spec/src/ai/skill.form.ts` to say that no such file exists. - Upstream moved ten commits while this was written (`e42520c67b` to `e2a0e90025`). None touches an ADR file or a file a note cites. `overlap-check` answers `VERDICT clean exit 0` against `origin/main` at `e2a0e90025`, and no open pull request shares a file with this branch. The local gate set is the `dispatch-gates --commands` derivation for this change set, 27 commands, run on the final commit `c2c3345747`. Each exit code was captured before any pipe. Reconciliation: `Run reconciliation — 27 derived, 27 run, 0 NOT-MEASURED, 0 UNRUN`, all 27 with a recorded exit code. <details><summary>ADR gates on c2c3345 (all exit 0)</summary> | Command | Exit | Verdict line | |:---|:---|:---| | `pnpm check:adr-symbol-anchors` | 0 | `check-adr-symbol-anchors: 4525 anchors across 164 records resolve`, 0 line anchors survive. On the base commit the same gate reads 4478. | | `node scripts/check-adr-links.mjs` | 0 | `check-adr-links: 1268 relative link destination(s) under docs/adr/ resolve` | | `node scripts/check-adr-links.mjs --self-test` | 0 | | | `pnpm check:adr-anchors` | 0 | | | `pnpm check:adr-index` | 0 | `adr-index --report: OK — docs/adr/README.md is current, every record parsed` | | `pnpm check:doc-authoring` | 0 | | | `pnpm check:nul-bytes` | 0 | `check-nul-bytes: OK (scanned 28605 text file(s)`, no raw control bytes | | `pnpm check:closed-ceremony-text` | 0 | | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | run after building `@objectstack/formula` and `@objectstack/lint` under the verify lock | | `pnpm --dir ui run check:new-line-citations` | 0 | `VERDICT new-cross-file-line-citations: 0 new citation(s)`. Not in the derived list; run because a ui ADR changed. | </details> <details><summary>The other derived families on c2c3345 (all exit 0)</summary> `node scripts/check-closing-keyword-parity.mjs` and its `--self-test`, `node scripts/check-comment-mask-corpus.mjs`, `node scripts/ci/plan-test-core-shards.mjs --self-test`, `pnpm check:ci-filter-parity`, `pnpm check:cross-package-test-inputs`, `pnpm check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm check:pm-governed-merges`, `pnpm check:pm-prior-rulings`, `pnpm check:published-files`, `pnpm check:refd-timer-probe`, `pnpm check:registry-log-declared`, `pnpm check:rest-log-spy-declared`, `pnpm check:tier-file-adoption`, `pnpm check:undeclared-dep-imports`, `pnpm check:watch-hint-literal`. Before the push: `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD` exit 0, one commit message, no card relation and no model identifier in the trailer pair. </details> <details><summary>The ui scripts test family: one prerequisite failure, then green</summary> Derived command: `pnpm --dir ui exec vitest run scripts/`, run under the verify lock with `--maxWorkers=2`. - First run: `VERDICT command-exit 1`. `Test Files 1 failed | 171 passed | 2 skipped (174)`, `Tests 1 failed | 5144 passed | 2 skipped (5147)`. The one failure was `scripts/__tests__/unit-registry-absence-collision.test.ts`, with `Failed to resolve entry for package "@objectstack/client"`. The package had no build output in the fresh worktree. That is a missing prerequisite, not a verdict on this change. - After building the `@objectstack/client` closure under the lock, the same command on the same commit: `VERDICT command-exit 0`. `Test Files 172 passed | 2 skipped (174)`, `Tests 5145 passed | 2 skipped (5147)`. </details> Not run locally: the repository test project behind `test:repo`, which CI runs on the pull request and on the merge group. Every other family CI runs is read from this pull request's check runs, not re-run here. ## Acceptance notes - **Changeset.** None, and the pull request carries `skip-changeset`. `docs/adr/**` and `ui/docs/adr/**` ship in no package: the ui tree's root is a private workspace root and `ui/docs` is under no package directory. - **Governed surface.** `docs/adr/**` lands by the maintainer's hand. This pull request stays a draft; the seat hands it over. - **The registry count.** The card row and the amendment both carry a number. The repository rule for a volatile count is to remove it and not to sync it, so the note adds none. - **Seen and left alone.** These are outside the card and are not changed here. - ADR-0084, near line 226, says `form` is not a registered type. It is about the working names of the 2026-07-01 table, and `form` is registered now. It is a candidate row for next week's card of this name. - One internal skill playbook and ui ADR-0056 still use the Studio form helper's old name. The review of PR objectstack-ai#37366 already recorded both. - Comments in the console's chat scope helper still describe the `app:PKG:build` dock key and the Studio copilot. ## Verification ### Read first 1. `docs/adr/0066-unified-authorization-model.md`, the note of 2026-11-28 under D2 ⑧. It is the highest-risk hunk: one long paragraph on authorization, and it supersedes parts of three earlier notes. Check the sentences on what another set can still re-open, and the sentence that stored sets are read with the new meaning and never rewritten. 2. `docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`, the amendment note of 2026-11-28. Check the four cells and their remedies (enable, enable, name the package, name the package) against the ruling it quotes. 3. `docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md`, the notes under Open items 6 and 10 and the new Open item 13. Both notes quote the maintainer, and item 10's records the shape of a new system object. ### Two-minute check Run `git diff --numstat origin/main...HEAD` on this branch. Expect ten rows, nine under `docs/adr/` and one under `ui/docs/adr/`, each with `0` in the removed column, and 239 added lines in total. Then run `pnpm check:adr-symbol-anchors` and expect exit 0 with a line that contains `check-adr-symbol-anchors: 4525 anchors across 164 records resolve`. --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW)_ <!-- signed: repo:objectstack#1 · os-elon-musk · session_016WV4cxRDKprCtjpEdtiPFW --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #35823
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: updated here — the refusal row in content/docs/deployment/install-modes.mdx; no skills/** file teaches the unmanaged rename (git grep targetNamespace under skills: 0 hits)
维护者速读
What changes
planUnmanagedImport(packages/metadata-protocol/src/package-unmanaged-install.ts) derives the source namespace from the package id when the body declares nonamespace. On the rename path (atargetNamespacedifferent from that namespace) the rename engine trusted the guess: an object name without the derived prefix takes the target prefix in front of its whole name. A name that carries the producer's real prefix (demoasset_asset, under an id that derivesasset_lifecycle_b) was copied astrialdemoasset_demoasset_asset, while its viewdemoasset_asset_allkept its name.Now, on the rename path of a body that declares no
namespace, the copy is judged by its object names' COMMON prefix (the card's signal; seat reading 7066371354 after L1 R1): when there are at least two objects, none carries the derived prefix, and every object name begins with the same first segment, the copy is refused through the existing rename refusal:400 INVALID_REQUEST, onedetails.refusedentry per object, each reason naming the derived namespace, the common prefix and the missingnamespacekey, and asking to declare it (no namespace value is suggested). No new error code, no newdetailskey; the refusal comes before the base exists, so nothing is written. Object names only (ADR-0129 D2 puts the namespace on object names): the gallery package this came from names its flows, datasets, reports and skills without the prefix, and translation items are named by the planner.Unchanged, and pinned as controls:
namespaceis renamed exactly as before, whatever its names look like (namespace: 'other'withdemoasset_*objects still copies astrialdemoasset_demoasset_*; this control reds when the declared-namespace gate is removed);purchase_ordercopies astrialdemoasset_purchase_order, alone or besideasset_owner(no common first segment);targetNamespacenothing changes: the save door's prefix rule already refuses these names (422 NAMESPACE_PREFIX, rolled back, nothing kept), measured on main 30b0987.The refusal row is added to the rename table in
content/docs/deployment/install-modes.mdx(file surface widened by the seat for that one row).Read first, by risk:
package-unmanaged-install.ts,derivedNamespaceContradictionand its one call before the rename loop: the rule that decides what is refused.package-unmanaged-install.test.ts, the describe blocka namespace derived from the id, contradicted by the object names' common prefix: the pins and the controls.Why
Data silently wrong: one copied app held three spellings of one package's names, with no refusal (card #35823, found on objectstack-ai/cloud#4856 whose publish snapshot dropped
manifest.namespace; the cloud side is fixed there). Loud over lenient: a derived namespace the names contradict is refused, never renamed.Tests
pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 src/package-unmanaged-install.test.ts: 105/105 passed (8 cases in the new block).scripts/ablation-replace.mjs, each trap-restored withgit diff HEADempty and the HEAD blob hash matched after:namespacecontrol (contract review S2).src/, so no build is in the path.Acceptance notes
_segment. Two objects sharing a short first word (purchase_order,purchase_item) in a namespace-less package are refused too, and declaringnamespaceclears it; the docs row says so.targetNamespacepath keeps its existing422 NAMESPACE_PREFIXanswer (base created then rolled back) rather than a plan-time400; aligning the two would change an existing answer and is not this card's.namespacethe object names contradict still copy double-prefixed; plus the dated ADR-0048 §3.5 note for thepurchase_order+purchase_itemrefusal.Verification
Two-minute check: run the test file above; the describe block
a namespace derived from the id, contradicted by the object names' common prefix — refused, never double-prefixedpasses, 8 cases.Round 1 (head ca5b93e, the per-name rule): CI all green or skipped, 95/95 derived gates exit 0, full dogfood battery green (PR comment 7066311396). This round's head is re-verified the same way and declared in a PR comment when the runs finish.
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (no formatter ran;pnpm lintis CI's run, read from its check-run)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5nwb5fUkxg7Q9NVxvR