Skip to content

fix(metadata-protocol)!: an unmanaged rename refuses a package without namespace whose object names all share a prefix other than the derived one - #36138

Merged
os-zhuang merged 5 commits into
mainfrom
claude/project-thread-c3l4yd
Nov 21, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/project-thread-c3l4yd

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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 no namespace. On the rename path (a targetNamespace different 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 derives asset_lifecycle_b) was copied as trialdemoasset_demoasset_asset, while its view demoasset_asset_all kept 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, one details.refused entry per object, each reason naming the derived namespace, the common prefix and the missing namespace key, and asking to declare it (no namespace value is suggested). No new error code, no new details key; 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:

  • a body that declares namespace is renamed exactly as before, whatever its names look like (namespace: 'other' with demoasset_* objects still copies as trialdemoasset_demoasset_*; this control reds when the declared-namespace gate is removed);
  • a multi-segment unprefixed name keeps ADR-0048 §3.5's amended rename: purchase_order copies as trialdemoasset_purchase_order, alone or beside asset_owner (no common first segment);
  • a single-object package, bare one-segment names, and any package with an object carrying the derived prefix keep the rename;
  • without a targetNamespace nothing 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:

  1. package-unmanaged-install.ts, derivedNamespaceContradiction and its one call before the rename loop: the rule that decides what is refused.
  2. package-unmanaged-install.test.ts, the describe block a namespace derived from the id, contradicted by the object names' common prefix: the pins and the controls.
  3. The changeset: the BREAKING sentence and the ADR-0087 disposition.

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).
  • Ablations on the committed round (a7b3062), on-disk mutation by scripts/ablation-replace.mjs, each trap-restored with git diff HEAD empty and the HEAD blob hash matched after:
    • the common-prefix refusal made a no-op (blob 0944eee5c9fa -> cb234f9d5ba6) => 2 failed / 103 passed: the refusal naming both, and the verb's zero-write refusal;
    • the declared-namespace gate forced open (blob 0944eee5c9fa -> d0bfa966ec7f) => 1 failed / 104 passed: the declared-namespace control (contract review S2).
  • The tests import the module from src/, so no build is in the path.

Acceptance notes

  • The common prefix is the first _ segment. Two objects sharing a short first word (purchase_order, purchase_item) in a namespace-less package are refused too, and declaring namespace clears it; the docs row says so.
  • The no-targetNamespace path keeps its existing 422 NAMESPACE_PREFIX answer (base created then rolled back) rather than a plan-time 400; aligning the two would change an existing answer and is not this card's.
  • filed Unmanaged rename: a copy still double-prefixes when a single object, one stray object, or a declared namespace contradicts the object names #36166 — the silent cases the set-level signal leaves (contract review 7066464020, boundary flag ③): a single-object package with a foreign prefix, one stray object beside the prefixed ones, and a declared namespace the object names contradict still copy double-prefixed; plus the dated ADR-0048 §3.5 note for the purchase_order + purchase_item refusal.

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-prefixed passes, 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

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (no formatter ran; pnpm lint is CI's run, read from its check-run)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5nwb5fUkxg7Q9NVxvR

…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>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 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
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 713545fd118fa9839795394bc01c376018c97826 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 37c19c7832ea92aced51781ccf87da04d253b1c3 — the merge of head b2e82158b5ebe7f2f06a5f2d318930353483ac6b into base 713545fd118fa9839795394bc01c376018c97826, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nwb5fUkxg7Q9NVxvR

Final head: ca5b93e15b327fcf6e7c5bf4a8e9831d83b60ceb (ca5b93e), declared for L1.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5

L1 verdict (L1-a): REWORK, held on one reading question for the seat at head ca5b93e15b327fcf6e7c5bf4a8e9831d83b60ceb (Fixes #35823, route narrowed by the seat in 7065273884). Full read of origin/main...ca5b93e15b (4 files, +176/−2).

席位核对

Shape and gates.

  • l1-face --pr 36138 at ca5b93e:
    • Shape: draft against main, first line Fixes #35823, and no closing keyword binds another card.
    • Declarations: fix(metadata-protocol)!, Clause-②: no (narrowing), Metadata-protocol: none.
    • Floors: Lint & Repo Gates and TypeScript Type Check are success, and mergeable_state is clean.
    • Check-runs: all success or expected skip, 0 failing, 0 pending.
  • One flag, answered: dogfood. The narrowing arm's full battery is pinned at this head in 7066311396 (483 files passed / 3 skipped, 4101 tests passed / 68 skipped, command exit 0). That is the evidence the ! needs.
  • Changeset 35823-unmanaged-derived-namespace-mismatch.md names @objectstack/metadata-protocol (the only published package touched), carries the BREAKING sentence, and the declaration lines match the body.
  • Docs: content/docs/deployment/install-modes.mdx gains the refusal row, so no published page is left false by this round.

What the code does. derivedNamespaceMismatch runs only when the body declares no namespace and a targetNamespace is given. A name that starts with <derived>_ passes. A name with no _ passes ("bare"). Every other name is refused, and the refusal treats the text before the FIRST _ as "the prefix it carries".

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).

  • At this head such a name is refused. The test names every contradicting object, and only those has asset_lifecycle_b_owner passing only because it starts with the derived namespace. A name like purchase_order or asset_owner in a namespace-less package is now refused on the rename path, where main renamed it to <target>_purchase_order.
  • ADR-0048 §3.5 (2026-11-07 note): "a name that lacks the package's prefix takes it in front". The seat's route (7065273884) keeps that for "a bare name". The code defines "bare" as one segment only. The card's Done-when speaks of "the names' common prefix" differing from the derived namespace, which is a different test again (one prefix shared by the names, not a per-name first segment).
  • The code cannot tell purchase_order (a two-word short name, no prefix) from demoasset_site (a real prefix). Which reading holds changes what a customer's install does, and it reads an ADR, so per common.md it goes to the seat. Asked there.

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 purchase_order): refused or renamed, whichever the seat rules. If the ruling is "renamed", the refusal needs a narrower trigger (for example the common-prefix test the card names), and the changeset's "A bare object name (asset, no prefix at all)" sentence and the JSDoc change with it.

N1 (nit, non-blocking). The hint namespace: '${carried}' takes the text before the first _. Namespaces may themselves hold _ (the derived one here is asset_lifecycle_b), so for a real prefix demo_asset on demo_asset_site the sentence suggests namespace: 'demo'. The "if that is the prefix" hedge keeps it from being false, but naming the whole name and asking for the prefix it carries would not mislead.

Not findings. Refusal tests assert status and code ([400, 'INVALID_REQUEST']) and details.refused. The controls pin: bare asset renamed, derived-prefix names renamed, a declared namespace unchanged, the no-rename path unchanged, and the verb refusing before any write. The declared-namespace path (declaredNamespace !== undefined) is untouched, as the Done-when asks.

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.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ca5b93e15b327fcf6e7c5bf4a8e9831d83b60ceb
Local-runs: none
Scope: packages/metadata-protocol/src/package-unmanaged-install.ts, packages/metadata-protocol/src/package-unmanaged-install.test.ts, content/docs/deployment/install-modes.mdx, .changeset/35823-unmanaged-derived-namespace-mismatch.md + packages/metadata-protocol/src/package-namespace-rename.ts, packages/spec/src/kernel/namespace-prefix.ts
Security-touching: no

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 15b7f51b27, 4 files, +176/−2. Isolated contract-tier subagent, not fed the seat's or the dev's conclusions. Nothing built or run; the 105/105, ablation and battery figures are the dev's.

① Derived judgments

  • Check-runs: 40 success, 15 skipped.
  • Rename path only: inside if (namespace !== sourceNamespace) (package-unmanaged-install.ts:614, call :624-626); only for an undeclared namespace (declaredNamespace === undefined, :522, :624; stringKey :387 treats '' and non-strings as undeclared).
  • derivedNamespaceMismatch (:691-706) passes <derived>_… and no-underscore names and refuses the rest, naming the derived namespace, the carried prefix, the missing key and the remedy; raised through unmanagedInstallRenameRefusal (:634): INVALID_REQUEST 400, details.targetNamespace, details.refused[], before any write (verb test pins zero writes).
  • Docs row install-modes.mdx:270 accurate (namespace-prefix.ts:58-65).

② Semver level

Clause-②: no (narrowing) in body and changeset; patch with BREAKING banner and ! title per AGENTS.md:1023-1031; Metadata-protocol: none defensible (no schema key or accepted authored value changes); ADR-0087 not-required marker with reason; dogfood battery declared (483 files / 4101 tests).

③ Boundary flags

  • Not governed (0 of 4 paths, 178 lines). No SQL. Follow-ups: the 422-after-rollback vs plan-time 400 note; a declared namespace the names contradict still double-prefixes (same silent class, outside this card's Done-when).
  • Security: no authz, tenancy or ownership check altered; every copied name still takes the target prefix.

④ Design judgment

  • S1 (should-fix). :697-699 treats any name with an underscore as carrying a prefix, so a namespace-less package's support_ticket is refused; ADR-0048 §3.5 (docs/adr/0048-cross-package-metadata-collision.md:313), the rename engine docblock and install-modes.mdx:240-242 rename it in front. Same as L1-a R1 (7066354944); the seat's reading 7066371354 replaces the per-name signal with the common prefix of two or more names, so ADR-0048 needs no note.
  • S2 (should-fix). The declared-namespace control (package-unmanaged-install.test.ts:1215-1224) does not discriminate the declaredNamespace === undefined gate; add e.g. namespace: 'demoasset' with other_thing ⇒ trialdemoasset_other_thing.
  • S3 (should-fix, wording). The remedy (:705) suggests namespace: '<first segment>', which can be platform-reserved (sys, base) or differ per object; with the common-prefix signal it should name the one common prefix and not suggest a reserved one.
  • Nits: an object named exactly the derived namespace is refused; a leading-underscore name counts as bare; the PR body's Verification still says "in progress"; the changeset's "as the rename always did" holds only for one-segment names.

Implemented-by: claude/project-thread-c3l4yd
Reviewed-by: session_01FEkQ5krBqrrgxCYgjXmfbv

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>
@objectstack-fleet objectstack-fleet Bot changed the title fix(metadata-protocol)!: an unmanaged rename refuses an object name carrying a prefix other than the namespace derived for a package that declares none fix(metadata-protocol)!: an unmanaged rename refuses a package without namespace whose object names all share a prefix other than the derived one Nov 21, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b2e82158b5ebe7f2f06a5f2d318930353483ac6b
Local-runs: none
Scope: packages/metadata-protocol/src/package-unmanaged-install.ts, packages/metadata-protocol/src/package-unmanaged-install.test.ts, content/docs/deployment/install-modes.mdx, .changeset/35823-unmanaged-derived-namespace-mismatch.md + packages/metadata-protocol/src/package-namespace-rename.ts
Security-touching: no

Delta read of record 7066393959 by the same isolated contract-tier reviewer. Head = round commit a7b30626 plus a merge of main (merge base 713545fd11); the four PR files are byte-identical between a7b30626 and the head, main changed none of them, and the three-dot diff is still those four files (+202/−1, 0 governed).

① Derived judgments

  • The check is one call before the rename loop, inside the rename block, gated on declaredNamespace === undefined (package-unmanaged-install.ts:622-630). derivedNamespaceContradiction (:703-727) refuses only when there are at least two objects, none starts with <derived>_, and all share one first segment; one details.refused entry per object through unmanagedInstallRenameRefusal (INVALID_REQUEST 400, before any write). Matches seat reading 7066371354 as refined to object names (ADR-0129 D2). The gallery apps/asset_lifecycle reproduction (several demoasset_* objects) is caught.
  • S1 closed (single multi-segment names, names without a common first word and bare names are renamed per ADR-0048 §3.5, pinned). S2 closed (namespace: 'other' + two demoasset_* objects expects the double-prefixed copy; red without the gate). S3 closed (remedy names no value). Nits of 7066393959 closed.
  • CI on this head was still running when read; the dogfood battery owed by the narrowing arm must be re-read at this head before landing.

② Semver level

Clause-②: no (narrowing) holds on a smaller set than round 1; BREAKING banner, patch, ADR-0087 no-migration-prescription marker. Metadata-protocol: none holds.

③ Boundary flags

  • Should-fix, carried to a follow-up card (not this PR): silent cases left by the set-level signal — a single-object package with a foreign prefix still copies double-prefixed (pinned as a CONTROL; disclosed in the changeset), one stray object (site, purchase_order) beside demoasset_* defeats the signal, and a declared namespace the names contradict still double-prefixes. The card's Done-when is met as written.
  • Security: no; plan-time refusal only, ownership and reserved-namespace checks untouched.

④ Design judgment

  • Nit: two or more unprefixed objects sharing a first word (purchase_order, purchase_item) are refused where ADR-0048 §3.5 (:313) renames them; small, derived-path only, disclosed. A dated ADR note belongs with the follow-up.
  • Nit: common === derivedNamespace at :717 is unreachable after :711.
  • Nit: the docs row omits "no object carries the derived prefix" (matters only for a multi-segment derived namespace).

Implemented-by: claude/project-thread-c3l4yd
Reviewed-by: session_01FEkQ5krBqrrgxCYgjXmfbv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nwb5fUkxg7Q9NVxvR

Final head: b2e82158b5ebe7f2f06a5f2d318930353483ac6b (b2e8215), declared for the L1 delta. Rework round for L1-a R1/R2 (7066354944) and contract review S2/S3 (7066393959): the object names' common prefix replaces the per-name signal (seat reading 7066371354, refined to object names); contract delta PASS on this head (7066464020); follow-up filed #36166.

  • CI on this head: all 63 check-runs success or skipped (Test Core 1-10/10, Lint & Repo Gates, TypeScript Type Check, Check Changeset, Governed Surface Queue Guard, PR-body guards: success).
  • Local, same head: metadata-protocol suite 23313 passed / 45 skipped, typecheck exit 0; 95 of 95 derived gate families run, all exit 0 (dispatch-gates --ran: 0 NOT-MEASURED).
  • Dogfood battery owed by the (narrowing) arm, full run under the verify lock on this head: VERDICT command-exit 0, Test Files 483 passed / 3 skipped, Tests 4101 passed / 68 skipped, no failures.
  • Ablations on the round commit a7b3062: common-prefix refusal no-op => 2 red; declared-namespace gate forced open => 1 red (S2); both restored by hash.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5

L1 verdict (L1-a): ACCEPT at head b2e82158b5ebe7f2f06a5f2d318930353483ac6b (Fixes #35823). This is a delta read of ca5b93e15b..b2e82158b5: round commit a7b30626ba, then a merge of main. It sits on top of my REWORK record 7066354944, and the seat reading of R1 is 7066371354.

席位核对

Shape and gates.

  • l1-face --pr 36138 at b2e8215:
    • Declarations unchanged: fix(metadata-protocol)!, Clause-②: no (narrowing), Metadata-protocol: none.
    • Floors: Lint & Repo Gates and TypeScript Type Check are success.
    • Check-runs: 44 success, 17 expected skip, 0 failed, 0 pending.
    • mergeable_state is clean.
  • The changeset still names @objectstack/metadata-protocol.
  • Flag answered: dogfood. The full battery at this head is pinned in 7067263519 (483 files passed / 3 skipped, 4101 tests passed / 68 skipped, command exit 0).
  • The merge: git diff a7b30626ba b2e82158b5 on the four PR paths is empty. The PR's net diff is still those four files.

R1, against the seat reading. The per-name check is gone. derivedNamespaceContradiction refuses only when all of these hold:

  • the body declares no namespace;
  • a rename is asked for;
  • there are two or more objects;
  • no object carries the derived prefix;
  • every object name has the same first segment, and that segment is not the derived namespace.

Otherwise ADR-0048 §3.5's rename applies, as on main.

  • Object names only, not every item name. This narrows the seat's "every item name" in the safe direction: views such as demoasset_asset_all and planner-named translation items would otherwise blur the signal. The JSDoc gives that reason, and contract delta PASS 7066464020 covers it.
  • The "no object carries the derived prefix" guard is load-bearing, and it is pinned. A derived namespace can hold _, as asset_lifecycle_b does. So asset_lifecycle_b_asset + asset_lifecycle_b_site share the first segment asset, and without the guard they would be refused. The verb-level control installs exactly those two names and expects them renamed, so it goes red without the guard.
  • Accepted consequence of the seat reading. Two objects sharing a short first word (purchase_order, purchase_item) are refused the same way as demoasset_*. The changeset and the docs row say so, and declaring namespace clears it.

R2 pins, all present.

  • purchase_order alone is renamed to trialdemoasset_purchase_order, and so is purchase_order beside asset_owner.
  • Bare asset + site are renamed.
  • A single-object package is not refused, even demoasset_asset.
  • demoasset_asset + demoasset_site on the derived path are refused at [400, 'INVALID_REQUEST'], one details.refused entry each, naming derived from its id as 'asset_lifecycle_b', begins 'demoasset_' and the missing key.
  • The verb refuses before any write: no write, no package, no sys_metadata row.
  • A declared namespace, matching or not, renames as before.
  • Without a rename the plan does not ask.
  • Ablation (7067263519): with the common-prefix refusal made a no-op, 2 tests go red; with the declared-namespace gate forced open, 1 goes red. Both were restored by hash.

N1 fixed. The remedy now reads "Declare namespace on the package, the prefix its object names carry". It no longer suggests a value cut at the first _.

Docs and changeset. The install-modes.mdx row and the changeset paragraphs, read sentence by sentence, match the code: the two-or-more condition, the common first word, no derived prefix, each object named, and a declared namespace unchanged "whatever its names look like". The ADR-0087 comment is updated to the new trigger.

Not findings.

Next. Landing is the seat's: contract delta PASS 7066464020 and this ACCEPT, both at b2e8215.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

席位核对

Landing · 2026-11-21T18:31Z · head b2e82158b5ebe7f2f06a5f2d318930353483ac6b

Reading Value
L1 ACCEPT 7067288301 (L1-a, this head)
Contract PASS 7066393959 at ca5b93e1, delta PASS 7066464020 at this head (CONTRACT_REVIEW_TIER); S1–S3 closed, residuals on #36166
Dogfood battery full, at this head: 483 files / 4101 tests passed (os-dev-report 7067313122, declaration 7067263519)
Check-runs 44 success, 19 expected skip, 0 failed, 0 pending; mergeable clean
Governed check-governed-merges --pr 36138: NOT governed, under 3,000 lines; Clause-②: no (narrowing) lands on L1 + contract PASS + battery
Main K = 9 first-parent commits past base

Ready + auto-merge now.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 18:32
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 21, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft November 21, 2026 18:51
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b2e82158b5ebe7f2f06a5f2d318930353483ac6b
Local-runs: none
Scope: packages/metadata-protocol/src/package-unmanaged-install.ts, packages/metadata-protocol/src/package-unmanaged-install.test.ts, content/docs/deployment/install-modes.mdx, .changeset/35823-unmanaged-derived-namespace-mismatch.md + packages/metadata-protocol/src/package-namespace-rename.ts
Security-touching: no

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 level

Unchanged from 7066464020: Clause-②: no (narrowing), BREAKING, patch, Metadata-protocol: none, ADR-0087 no-migration-prescription.

③ Boundary flags

④ Design judgment

No must-fix, no should-fix. Nits stand as nits: the unreachable common === derivedNamespace comparison (:717); the docs row omits "no object carries the derived prefix".

Implemented-by: claude/project-thread-c3l4yd
Reviewed-by: session_01FEkQ5krBqrrgxCYgjXmfbv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

席位核对

Awaiting the maintainer's merge (narrowing) · 2026-11-21T18:53Z · head b2e82158b5ebe7f2f06a5f2d318930353483ac6b

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 21, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from hotlong November 21, 2026 18:54
@os-zhuang
os-zhuang marked this pull request as ready for review November 21, 2026 22:04
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit fa30414 Nov 21, 2026
73 of 74 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-c3l4yd branch November 21, 2026 22:31
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants