Skip to content

fix(metadata-protocol)!: a save naming no package at a bundle member only the dependent holds writes the row-held base's row the bare read addresses - #37069

Draft
objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/project-thread-g0avze
Draft

objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/project-thread-g0avze

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Irene · project thread

Fixes #35524

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — the moved cell is an authored (row-held) base with an email_template locale only its dependent stores; no skills/** or content/docs page teaches where a save naming no package lands there, and skills/objectstack-platform/SKILL.md's customization paragraph covers the code-shipped base, whose bare save this diff leaves unchanged (pinned in the new test's controls); the spec packageId sentence is #35529's

维护者速读

  1. 用户能看到什么变化:同一封邮件模板,基座包存了英文版、依赖它的包只存了法文版时,不指定包去保存法文版(直接保存或存草稿),以前改的是依赖包那一份、随后按名字读法文版仍显示“找不到”;现在写进基座包的法文版,与指定基座包保存完全一样,依赖包那一份原样保留,保存后按名字一读就能看到刚存的内容;不指定包的读草稿、发布草稿、丢弃草稿也一并对准基座包那份草稿。
  2. 为什么做:落实「同一个地址,读到谁就写谁」这条已定规则,补上“基座包和依赖包同名邮件模板”这一类里尚未覆盖的一格。
  3. 出错会怎样:只影响基座包和依赖包都存了同一邮件模板、且某语言只有依赖包有的环境;只有依赖包草稿时,不指定包发布会被拒并提示指定依赖包,丢弃则不动并说明草稿还在;可直接撤回本次改动,不需要迁移数据。
  4. 要你做什么:无。

What changes

At a named non-canonical member of a bundled type's name no package ships (today email_template, e.g. fr-FR), where an authored base package holds the canonical member as a stored row and only a package declaring that base holds a row of the member, the read naming no package takes the base's address (rowHeldBaseAddressOf, the S1-guarded arm; unchanged, pinned in meta-disabled-holder-served-stack.test.ts M1, M2, S2) and answers 404. The doors naming no package that write or address that member's draft now resolve the same address:

Ruling route: the write follows the read (epic ruling 6781691009, 「a write resolves its address exactly as the read at the same address resolves it」; #34348 ruling (b), 「reads and writes give the same answer」). The read is not changed.

FROM to TO (BREAKING, the narrowing arm):

  • bare save (REST PUT, in process), active: the dependent's row silently updated, read after it 404 (or 409) → the base's row written at the member, as ?package=BASE writes it; the dependent's row byte-unchanged; read after it 200 at the base.
  • bare draft save: the dependent's draft → the base's draft, as ?package=BASE.
  • bare draft read / per-item publish / draft discard: the dependent's draft read, promoted, removed → the base's draft read, promoted, removed. With only the dependent's draft stored: publish 200 into the dependent's row → 404 NO_DRAFT naming that draft; discard removed it → 200 receipt that discards nothing and names the remaining draft. Both equal the same request naming the base.

Files: packages/metadata-protocol/src/protocol-save.ts (the helper's one-holder arm, the publish-mode and draft-mode save address, the new draft-address wrapper), packages/metadata-protocol/src/protocol.ts (the facade's packagelessDraftAddress forwards through the wrapper; still one forwarding call, check:facade-delegation-only green). Pins: packages/runtime/src/domains/meta-bare-save-dependent-only-member-35524.test.ts (new, named for this card, the #34681 fixture shape). Changeset: .changeset/35524-bare-save-follows-base-dependent-member.md (@objectstack/metadata-protocol patch, both declaration lines, BREAKING banner, ADR-0087 disposition not-required (no-migration-prescription)).

No spec touch: the save request's packageId description's row-held-base exception sentence stays true (it covers a member the base and the dependent both hold). Its earlier sentence, "an active save then writes the row of the one package the item's active rows are bound to", now has this cell as a second exception; that text is left to sibling card #35529 (see Acceptance notes).

Declarations: Clause-②: no (narrowing) because a published accept set narrows (the bare publish of the dependent's lone draft at this member moves from 200 to 404 NO_DRAFT) and what a bare write lands in moves (the dependent's row → the base's row), the epic ruling's "D's row silently updated → E's row (narrowing)" shape. Metadata-protocol: none: no key, accepted value or meaning of authored metadata moves; what moves is the row a request naming no package addresses, as PR #35450 declared for the sibling move.

Read first (by risk):

  1. protocol-save.ts, packagelessRowHeldBaseAddress: the new equality address.candidates.includes(base) === address.candidates.length > 1 (two or more: the base among them; one: the base is not that one).
  2. protocol-save.ts, packagelessRowHeldBaseDraftAddress and the draft save's widened follow condition (draftAddress.into !== null).
  3. protocol.ts, the facade's packagelessDraftAddress, now the one resolution every bare draft door shares.

Two-minute check: pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-bare-save-dependent-only-member-35524.test.ts after building @objectstack/metadata-protocol; expect Tests 6 passed (6).

Tests

The card's 3-step sequence, measured on main a73edb3 and on this head (booted kernel, real protocol and sqlite store)

Fixture: authored WA holds en-US, authored WD (declares WA) holds fr-FR, same email_template name.

Step main, rows stored after boot main, kernel booted over the rows this head (both)
1. GET ?member=fr-FR 404 404 404
2. PUT fr-FR, no package 200, rewrites WD's row 200, rewrites WD's row 200, writes a new WA row at fr-FR
rows after (package_id, bundle_member) WA/canonical, WD/fr-FR (edited) same WA/canonical, WD/fr-FR (unchanged), WA/fr-FR (edited)
3. GET ?member=fr-FR 409 RESOURCE_CONFLICT 404 200 at WA, the saved content

Why step 3 answered 409 on main: only where the rows were stored after boot. The registry then held no row of WA's; the save's registry write-through registered WD's fr-FR item, so the registry named WD the name's one holder, and the read, at the base's address, was refused by the exact-qualifier judgment ("not held by package WA ... held by package WD"). ?package=WA&member=fr-FR answered the same 409. On a kernel booted over the rows (registry hydrated with both), step 3 answered 404. Either way the save wrote a row the read did not serve.

The save naming WA at fr-FR on main (in process and REST PUT ?package=WA): 200, writes a new WA row at fr-FR, WD's row untouched, and the bare read then serves it (200 at WA). So the stop rule did not trigger; this head makes the bare save answer exactly that.

Per-door conclusions at the cell (main → this head)
Pins (new file) and controls

meta-bare-save-dependent-only-member-35524.test.ts, 6 tests:

  1. REST PUT and in-process save on a kernel booted over the rows: step 1 404; WD's row byte-identical before and after (every stored column); rows equal to the save naming WA; no package-unbound row; bare read 200 at WA, ?package=WD still WD's; and after a restart.
  2. Rows stored after boot: the bare save writes WA's row and the bare read serves it (was 409).
  3. Draft save: WA's draft, same rows as the named draft save, WD's row byte-identical; bare draft read serves it; bare publish promotes into WA's row; bare read 200; bare discard removes the draft the bare draft save wrote.
  4. WD's own draft at the cell: bare publish and discard answer exactly what ?package=WA answers; ?package=WD publishes it.
  5. Read-only (code) base holding rows: the bare save answers 422 WRITABLE_PACKAGE_REQUIRED naming the base, as ?package=BASE (was the same code naming the dependent).
  6. CONTROLS: the canonical member both hold (the metadata-protocol: with a bundled base and a dependent both holding a member, the bare write doors still answer 409 naming both while the bare read now answers the base #34681 cell) still writes the base's row; the canonical member only the dependent holds (S1) is still read and written at the dependent; two packages with no base relation at a member both hold still 409 naming both, and at a member one of them holds that package's row is read and written; a base that ships the name in code answers as today (bare read 404, bare save writes the dependent's customization row), pinned unchanged.

Unchanged and green: meta-disabled-holder-served-stack.test.ts (M1, M2, S2 untouched) and meta-bare-write-doors-follow-base-34681.test.ts: Test Files 3 passed (3), Tests 178 passed (178) at 80f540b.

Ablations (one per moved pin; mutation through scripts/ablation-replace.mjs, rebuild, dist preflight, restore to the HEAD blob)
  • A, the publish-mode save's one-holder arm blanked (const resolved = base ?? address.packageId read as address.packageId): marker present in dist; tests 1, 2 and 5 red (Tests 3 failed | 3 passed (6)); restored, blob == HEAD, git diff HEAD empty.
  • B, packagelessRowHeldBaseDraftAddress returning the stored address: tests 3 and 4 red (Tests 2 failed | 4 passed (6)), re-run on 80f540b with the same reading; restored, blob == HEAD.
  • C, the draft save's follow condition back to ambiguous-only: test 3 red, the draft save writing package=com.qa.authoredaddon (Tests 1 failed | 5 passed (6)); restored, blob == HEAD.
  • Restore leg: rebuilt, all three markers absent from the 24 built files, pins Tests 6 passed (6).

Acceptance notes

  • Not moved, same family (reported to the seat, not built here): at this cell the bare delete still removes WD's row, and the bare history, diff and rollback still read and restore WD's versions, while the bare read answers 404 (measured in process on main and on this head). They ask the row-held base only with two or more holders. Whether they follow the base (where there is nothing of the base's to remove or restore) is a design question for that family, not this card.
  • Not moved: a base that ships the name in code, with a dependent's stored row at another member: the bare read at that member answers 404 and the bare save writes the dependent's customization row (measured, pinned unchanged).
  • SaveMetaItemRequestSchema.packageId's sentence "an active save then writes the row of the one package the item's active rows are bound to" now has this cell as an exception at the member grain, and rowHeldBaseAddressOf's docblock says the writes ask it only with two or more holders. Both are text for sibling card metadata-protocol: follow-ups from the #35450 contract review: the spec exception text, three door-request comments, and a rollback pin over real history #35529, which rewrites those descriptions; untouched here.
  • On main, the history naming WA at fr-FR (where WA holds no row) answered RESOURCE_CONFLICT; observation only.

Verification

Local runs at the final head 80f540b
  • @objectstack/metadata-protocol test: Test Files 369 passed | 9 skipped (378), Tests 23389 passed | 45 skipped (23434) (run at b7be6fc; the later commit only reshapes the facade wrapper's argument).
  • @objectstack/metadata-protocol typecheck: exit 0 at 80f540b; @objectstack/runtime typecheck (with its test-typecheck): exit 0.
  • The three runtime files above: Tests 178 passed (178) at 80f540b.
  • Derived gates (dispatch-gates.mjs --commands, 75 families): 73 exit 0; check:dual-build-cjs-loads and check-plugin-teardown-shape.mjs --self-test exit 3 PREREQUISITE NOT MET (no full-tree dist / shallow clone): NOT MEASURED locally, CI's reading. check:facade-delegation-only went red on the first tree and is green after the fix commit. --ran reconciliation: 75 derived, 73 run, 2 NOT-MEASURED, 0 UNRUN.
  • test:repo, pnpm lint and the full farm: CI's.
  • Full dogfood battery (the narrowing arm), at the final head db0a77a (main merged in): os-verify-lock: VERDICT command-exit 0, Test Files 487 passed | 3 skipped (490), Tests 4128 passed | 68 skipped (4196), no failures (an earlier run at 80f540b was also green, its reading in the dev report on the card).

🤖 Generated with Claude Code

https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h

… the dependent holds

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…lows the row-held base

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…er a forwarding call

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
@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 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol, touching 11 documentable anchor(s).

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/concepts/metadata-lifecycle.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))
  • content/docs/kernel/cluster.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 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; 124 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 9171bed0a65ab242567f243969368ead786cd830 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1f07cd774dbbb012145bbbe72f70d34db8a4ffac — the merge of head db0a77a90995c5c6487a521978f1cd05d86b3062 into base 9171bed0a65ab242567f243969368ead786cd830, 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 1f07cd774dbbb012145bbbe72f70d34db8a4ffac && git checkout 1f07cd774dbbb012145bbbe72f70d34db8a4ffac
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9171bed0a65ab242567f243969368ead786cd830 db0a77a90995c5c6487a521978f1cd05d86b3062 && git checkout -B drift-repro 9171bed0a65ab242567f243969368ead786cd830 && git merge --no-ff db0a77a90995c5c6487a521978f1cd05d86b3062

node scripts/docs-audit/affected-docs.mjs --json 9171bed0a65ab242567f243969368ead786cd830

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 9171bed0a65ab242567f243969368ead786cd830 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAj3FYe91JCMQZPS88h

Final green head for review, 2026-11-25T10:22Z: db0a77a90995c5c6487a521978f1cd05d86b3062 (main 9171bed merged in by the relay). CI at this head: 39 success, 18 skipped, 0 red. Full dogfood battery at this head: Test Files 487 passed, 3 skipped; Tests 4128 passed, 68 skipped; no failures (os-dev-report 7159591353 on #35524). Owed: L1 ACCEPT, then a contract-review-tier L2 on the narrowing face, both at this head. Landing is a hand-off (narrowing lands like Tier H), not an auto-merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj

席位核对

L1 · ACCEPT · 2026-11-25T10:25Z · head db0a77a90995c5c6487a521978f1cd05d86b3062 · L1-c, for area f2-I on the seat's GO · card #35524 (p2, inside the maintainer's partial resume of #37065 and #37069)

  • 形态: l1-face.mjs --pr 37069 at this head: open, draft, base main, first line Fixes #35524, no closing keyword binds another card. Fixes is right: the card's cell (the save naming no package at a member only the dependent holds) moves, and the same-family cells it does not move (bare delete, history, diff, rollback at that cell; the code-shipped base) are named in the body as out of scope, not as owed by this card.
  • 范围与 changeset: one face flag read and cleared by hand: @objectstack/runtime is touched with no changeset entry, but its only file is the new test packages/runtime/src/domains/meta-bare-save-dependent-only-member-35524.test.ts and the package ships files: [dist, README.md, CHANGELOG.md], so nothing published moves there. @objectstack/metadata-protocol (published) carries .changeset/35524-bare-save-follows-base-dependent-member.md, patch, both declaration lines, BREAKING banner, ADR-0087 disposition. Changeset read sentence by sentence against the diff: FROM/TO (bare save and draft save write the base's row or draft; bare draft read, per-item publish and discard act on the base's draft; with only the dependent's draft, publish 404 NO_DRAFT and discard discards nothing) matches protocol-save.ts and the facade's packagelessDraftAddress wrapper in protocol.ts; the "Not moved" list matches the callers' two-or-more guards for delete/history. File surface widened by protocol.ts beyond the claim, declared in the report with its reason (the draft chain the change itself would break); accepted.
  • Skills-docs: none with a reason: checked. No skills/** or content/docs page teaches where a bare save lands at an authored base's dependent-only member; the code-shipped base the platform skill covers is pinned unchanged in the test's controls.
  • 测试与门禁证据: 6 new pins with code/status asserted on every refusal case (WRITABLE_PACKAGE_REQUIRED/422, RESOURCE_CONFLICT/409, NO_DRAFT); three ablations A/B/C each red on its own arm and restored (report 7148652912). Check-runs at this head: 39 success, 18 expected skip, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success. dogfood_battery pinned to this head (report 7159591353): full battery, 487 files / 4128 tests passed, no failures — owed by ! and (narrowing), present.
  • 接受的偏差: none beyond the declared protocol.ts widening.
  • 范围外去向: the build report's two class-b findings (bare delete/history/diff/rollback at this cell still act on the dependent's row while the bare read answers 404; bare save beside a code-shipped base writes the dependent's overlay) are unfiled ("reported to the seat"); the seat files them when its pause lifts. The spec packageId sentence goes to sibling card metadata-protocol: follow-ups from the #35450 contract review: the spec exception text, three door-request comments, and a rollback pin over real history #35529, named in the body.
  • 落地条款: a contract-review-tier L2 on the narrowing face is owed at this head next (L1-c runs it, one agent at a time). Narrowing ⇒ approver-landed (ruling of 2026-11-19 on governance: the guard scripts join the governed register, .claude/** lands by declared rule-change, and a narrowed spec change lands only by the maintainer #35321): the seat hands it to the approver after the L2 PASS. A new push voids this ACCEPT.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj

Contract-review-claim: session_01J8VVAo7qz23KxTeCEv1faj · head db0a77a · 2026-11-25T10:26Z

L1-c (L1 ACCEPT 7159693982) runs the owed CONTRACT_REVIEW_TIER review of the narrowing face in an isolated sub-agent, the only agent running seat-wide.

This branch has not been deployed

No deployments
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 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