Repository navigation
fix(metadata-protocol): the bare save, delete, publish, draft and history doors follow the row-held base the bare read serves - #35450
Conversation
… the bare read serves Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd Co-authored-by: Claude <noreply@anthropic.com>
…re-write-doors-follow-base
📓 Docs Drift CheckThis PR changes 2 package(s): 32 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 13 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 175 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 7d0e4cc8adffda0be957b0455c85f2d2843297dc && git checkout 7d0e4cc8adffda0be957b0455c85f2d2843297dc
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f727061b88258b946402bbb29afee6e6410081d6 0af89166469cf611a5bfb1cd9cb3c370f44f1b96 && git checkout -B drift-repro f727061b88258b946402bbb29afee6e6410081d6 && git merge --no-ff 0af89166469cf611a5bfb1cd9cb3c370f44f1b96
node scripts/docs-audit/affected-docs.mjs --json f727061b88258b946402bbb29afee6e6410081d6
|
…d base too; docblocks state the writes follow it Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd 2026-11-19T11:34Z Final head for review: Area notes for the reviewer:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对L1-a: ACCEPT · head Readings: Code (9 files). One helper,
Every other path keeps its old refusal, word for word. The unprovisioned store is caught (#5532). The two docblocks that this PR would otherwise make false are corrected in comment-only hunks (claim amendment 7005577225). Pins.
Ablation ran in two rounds, the helper (3 red) and the Declaration: agreed. Routing.
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35450 · card #34681 · face: declaration ( Gate verdicts on this head, read from its check-runs at 11:50Z: 24 success, 16 skipped, 0 failed, 11 still in progress ( Findings: one must-fix (M1), three should-fix (S1, S2, S3), three nits. ① Derived judgmentsThe diff implies one accept-set change, at seven doors, in one cell: a bundled type's name that no package ships, held as active rows at one member by a base package and by a package that declares it, with no package-less row beside them.
Why the guard is right. The read-only base's 409 becoming 422 swaps one refusal for another on a request refused both ways. It narrows nothing; a client that offered a package picker on the 409 now reads the 422 naming the base. Public surface. M1 (must-fix): the published request contract still says these requests are refused.
The claim fenced S1 (should-fix): the draft-mode arm skips the named-base rule the bare save owes. S3 (should-fix): contract docblocks the PR left false. Claim amendment 7005577225 corrected two docblocks on the ground that the PR making a sentence false lands the correction. The same sentence remains in: Nits:
② Semver level
The changeset's sentence "exactly as the same request naming the base does" is subject to S1 and N1. ③ Boundary flagsDev flags and open questions, from os-dev-reports 7005535521 and 7007306366:
S2 (should-fix): the decision route. Triage twice reserved this card for a maintainer decision card before code (6940518124, 6945990423), and the card body says a change to the write doors goes to a person. The seat answered with its own note (7000610592) that two standing maintainer rulings already decide it. I read both cited comments, outside this brief's input list, to check that note:
The rule sentence covers this cell, and the dispatch rule lets a same-family card reuse a parent ruling with its reasons. The save, draft save, publish and history doors follow directly. The delete, the draft discard and the rollback are destructive doors the ruling's reasons did not weigh: a bare delete that was refused now removes the base's row, after which the bare read serves the dependent's row (A3, measured and pinned). I judge the direction sound, since SQL push-down: no finding. The helper adds one read of the item's active rows ( Another author: none. The PR's Before landing: M1 closed; S1, S2 and S3 closed or ruled as accepted deviations; every check-run on the landing head green; then the delta is read by this reviewer. Implemented-by: VERDICT: FAIL |
… name the rollback's package A bare draft save that follows the row-held base (#34681) now judges that base with the named-base rule and the late override re-judgment, as the save naming it is: a base bound to an id no installed package has is refused 422 WRITABLE_PACKAGE_REQUIRED instead of writing a draft bound to it. The rollback receipt names the package of the row it restored, as the delete's receipt does. The spec request texts, the protocol docblocks and the history-slots header now state that bare requests follow the row-held base, and that a second bare delete removes the dependent's row. Pins added for the uninstalled base, two consecutive bare deletes, the bare draft read beside the discard, and the destructive doors under a read-only base. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
…t widening Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
protocol.ts is a facade file at its line ceiling; the four corrected docblocks are re-flowed in place so the file does not grow. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35450 · card #34681 · face: schema (the five Gate verdicts on this head: every check-run has concluded, read at 13:50Z. 74 runs: 62 success, 12 skipped, 0 failed, 0 in progress. The skipped ones are opt-in, queue-only or schedule lanes (the dogfood shards, the queue verdicts, the upgrade harness, the packed-tarball smoke, Result: M1, S1, S2, S3, N1, N2 and N3 are closed. Three new nits (N4, N5, N6), none touching correctness or the contract. ① Derived judgmentsThe accept-set change is the one judged at
Generated reference in sync: Public surface: unchanged from the first record apart from the two items above. ② Semver levelTwo changesets, each with
③ Boundary flagsFindings of record 7008272548, by id:
Round-three dev flags (os-dev-report 7010399497): SQL push-down: no finding. The delta adds no read and no query; the first record's judgment of the helper's one bounded read stands. Another author: none. The PR's New nits:
④ Design judgment
Implementing files: the code agrees with the contract at every door. No must-fix and no should-fix. Landing note, outside the verdict: the branch is K=24 first-parent commits behind Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35450 · card #34681 · face: schema. Merge-only delta from Gate verdicts on this head: every check-run has concluded, read at 14:24Z (the last finished at 14:22Z). 70 runs: 60 success, 10 skipped, 0 failed, 0 in progress. The lane set is the one that ran on Result: merge-only. No finding opened, none re-opened. Merge-only, checked against the objects
① Derived judgmentsThe judgments of the record at
Cited lines that moved with the merge: the late override re-judgment is at Elsewhere in
② Semver levelUnchanged. Both changesets are the same blobs as at ③ Boundary flagsM1, S1, S2, S3, N1, N2 and N3 stay closed as recorded at The merge commit is the relay's update of the branch, not the area's work, so it carries no dev report and owes none. The class-a out-of-scope finding is still unfiled and is not a finding on this PR. ④ Design judgmentUnchanged. The five description texts and the code they describe are the same blobs, or the same hunks, as judged at Landing note, outside the verdict: K=4 first-parent commits on Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd 2026-11-19T14:26Z Landing PR #35450 (card #34681) at head
State: the area marks it ready and arms auto-merge. On MERGED, the area closes #34681 and clears its labels. The review's new nits N4–N6 are on #35529; the class-a finding is #35524. |
…only the dependent holds writes the row-held base's row the bare read addresses (objectstack-ai#37069) <!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_ Fixes objectstack-ai#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 objectstack-ai#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 a stored row of the item at some member (its canonical member, or another one such as `de-DE`) 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: - `packagelessRowHeldBaseAddress` (`protocol-save.ts`) also answers the base where the member's active rows are bound to exactly one package, that package is not the base, and the read's own judgment names the base (`rowHeldBaseAddressOf`, asked, not copied). Two or more holders answer exactly as before (objectstack-ai#34681). - The publish-mode save naming no package asks it in its one-holder branch (after the holder refusal, so every refusal stands) and writes as the save naming the base does. - The draft doors' address naming no package (`packagelessDraftAddress`, behind the draft save, the strict draft read, the per-item publish and the draft discard) is wrapped by the new `packagelessRowHeldBaseDraftAddress`: at this cell it answers the base's draft, promoted into the base's row. The draft save sets the base as its package (the repository otherwise resolves its own write head), as the objectstack-ai#34681 follow arm does, so the named-base rule and the late override re-judgment judge the base. - Contract review S2, option (b) (the seat's route; it replaces the S1 option (a) exemption of the previous head): the package-unbound draft sub-cell moves to the base like the rest of the cell. Where the stored draft address names the package-unbound draft (`key === null`: a package-unbound draft stored at the member with no draft of the dependent beside it, as a bare draft save writes it while no package holds the member), the wrapper still answers the base's address (`none` until the base holds a draft there), and the draft save's follow still names the base. One predicate, `draftAddressFollowsRowHeldBase` (now `into !== null`), is asked by both, so they cannot part. The draft save passes the base to the repository, so the orphan-draft adoption (a save naming no package) does not run: the package-unbound draft stays untouched, as the save naming the base leaves it. Under the S1 exemption the bare draft save adopted that draft into the dependent, after which the bare draft read missed the draft just saved (S2). - The draft discard naming no package at that sub-cell (`protocol-diff-delete-load.ts`): with no base draft it answers the receipt the discard naming the base answers, naming the package-unbound draft still stored (`receiptPackageId`), never `No pending draft for TYPE/NAME.` while a draft is stored. Only the moved address is `none` with a package-unbound draft stored (`packagelessDraftAddress` otherwise makes that draft the address itself), so no other cell's receipt changes. 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」; objectstack-ai#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. - the package-unbound draft sub-cell: bare draft read served it, bare publish promoted it into the dependent's row, bare discard removed it, bare draft save adopted it into the dependent's draft → bare draft save writes the base's draft beside it (untouched) and the bare draft read reads back what was saved; bare publish after that save promotes the base's draft; a second bare draft save updates the base's draft (no second draft); with no base draft, the bare draft read still serves the package-unbound draft, bare publish `404 NO_DRAFT` and bare discard a `200` receipt naming the package-unbound draft as still stored, all three equal to `?package=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-diff-delete-load.ts` (the bare discard's receipt at the package-unbound sub-cell), `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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#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`, `draftAddressFollowsRowHeldBase` (`into !== null`) and the draft save's widened follow condition that asks it; `protocol-diff-delete-load.ts`, `receiptPackageId` (the bare discard's receipt over a package-unbound draft at the base's address). 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 10 passed (10)`. ## Tests <details><summary>The card's 3-step sequence, measured on main a73edb3 and on this head (booted kernel, real protocol and sqlite store)</summary> 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. </details> <details><summary>Per-door conclusions at the cell (main → this head)</summary> - save, publish mode (REST and in process): moved, pinned (writes WA's row, as named). - draft save: moved, pinned (writes WA's draft, as named). - strict draft read: moved, pinned (WD's draft → WA's draft; the draft the bare draft save writes). - per-item publish: moved, pinned (promotes WA's draft into WA's row; with only WD's draft, 404 `NO_DRAFT`, equal to `?package=WA`). - draft discard: moved, pinned (removes WA's draft; with only WD's draft, a receipt that discards nothing, equal to `?package=WA`). - a package-unbound draft stored at the member, no draft of WD beside it (contract review S2 option (b)): moved, pinned (the bare draft save writes WA's draft beside it, untouched, and the bare draft read reads it back; the bare publish promotes WA's draft; a second bare draft save writes no second draft; with no WA draft the bare draft read serves the package-unbound draft, the bare publish answers `NO_DRAFT`/404 and the bare discard the named-base receipt, all equal to `?package=WA`). - delete: unchanged, out of scope (still removes WD's row; it asks the row-held base only with two or more holders). See Acceptance notes. - history / diff / rollback: unchanged, out of scope (still WD's versions and row, through `historySlotOf`'s two-or-more guard). See Acceptance notes. - After the first bare save writes WA's row at the member, the cell is the objectstack-ai#34681 cell (two holders, the base among them) and every door follows the base as PR objectstack-ai#35450 pinned. </details> <details><summary>Pins (new file) and controls</summary> `meta-bare-save-dependent-only-member-35524.test.ts`, 10 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 objectstack-ai#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. 7. A package-unbound draft stored at the member (contract review S2 option (b); laid by a bare draft save at fr-FR while no package held that member, then WD's fr-FR row stored), four tests: (i) the bare draft save writes WA's draft, rows equal to the draft save naming WA, the package-unbound draft untouched, and the bare draft read then reads back what was saved (`['saved fr', WA]`, equal to the read naming WA); (ii) the bare per-item publish after that save promotes WA's draft, outcome and rows equal to `packageId: WA`; (iii) with no WA draft, the bare draft read equals the named one (`['unbound fr', null]`), the bare publish equals the named one (`NO_DRAFT`, 404) and the bare discard result equals the named discard's (`success`, `reset` and receipt, name blanked), rows unchanged; (iv) a second bare draft save updates WA's draft, one WA draft row. 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 182 passed (182)` at 344fc14. </details> <details><summary>Ablations (one per moved pin; mutation through scripts/ablation-replace.mjs, rebuild, dist preflight, restore to the HEAD blob)</summary> - 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)`. - D (previous round, contract review S1, the `key !== null` exemption): superseded by this round; E puts it back as the ablation. - E (this round, contract review S2 option (b)), the move of the package-unbound sub-cell undone (`draftAddressFollowsRowHeldBase` read as `address.into !== null && address.key !== null`, both callers at once): anchor x1 -> x0, marker present in 2 built files after the rebuild; test 7 (i) to (iv) red (`Tests 4 failed | 6 passed (10)`: the bare draft save adopted the package-unbound draft into WD's draft, the bare publish then promoted the unbound draft into WD's row and answered 200, not `NO_DRAFT`). Restored, blob == HEAD (2c49e5a), `git diff HEAD` empty, rebuilt, marker absent from all 24 built files. - F (this round), the bare discard's receipt guard removed (`? draftAddress.into` read as `? draftAddress.into && null`): marker present in 2 built files; test 7 (iii) red alone (`Tests 1 failed | 9 passed (10)`), the bare receipt `No pending draft for email_template/NAME.` against the named one `No pending draft of email_template/NAME is bound to package 'com.qa.authoredbase', so nothing was discarded: its package-less draft remains.` (the named-base answer, measured on this head). Restored, blob == HEAD (1c2294d), `git diff HEAD` empty, rebuilt, marker absent from all 24 built files. - After both restores: pins `Tests 10 passed (10)`. E and F ran at 4f232bf; 344fc14 after it changes only a docblock, the changeset and the pin's added draft-read equality (a control of the read, which neither ablated guard decides; not re-ablated), so the guards E and F ablate are byte-identical at the final head. </details> ## 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. - Moved this round (contract review S2 option (b)): the package-unbound draft sub-cell. Consequence stated in the changeset: with no base draft the bare draft read still serves it (as the read naming the base does; measured, now pinned in (iii)), while the bare publish and discard leave it stored. The changeset's banner names a base holding a row of any other member (a base holding only `de-DE` beside a dependent's `fr-FR` is the same cell), per the S1 review's ②. - 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 objectstack-ai#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 <details><summary>Local runs at the final head 344fc14 (this round, contract review S2 option (b))</summary> - `@objectstack/metadata-protocol` typecheck exit 0, `@objectstack/runtime` typecheck (with its test-typecheck) exit 0, and the three files below, in one lock run at 344fc14: `VERDICT command-exit 0`. `@objectstack/metadata-protocol` test at 4f232bf (344fc14 changes only a docblock in that package): `Test Files 370 passed | 9 skipped (379)`, `Tests 23417 passed | 45 skipped (23462)`. - `meta-bare-save-dependent-only-member-35524.test.ts`, `meta-bare-write-doors-follow-base-34681.test.ts`, `meta-disabled-holder-served-stack.test.ts`: `Test Files 3 passed (3)`, `Tests 182 passed (182)`. - Derived gates (`dispatch-gates.mjs --commands` at 344fc14, 75 families, the same list as at 4f232bf): 75 exit 0 (`check:type-check-debt` under the lock, `re-measure: OK`; `check:dual-build-cjs-loads` measured over the dogfood closure's dist, 125 entry points load). `--ran`: 75 derived, 75 run, 0 NOT-MEASURED, 0 UNRUN. - `test:repo`, `pnpm lint` and the full farm are CI's. Check-runs at 344fc14: 53, 37 success, 16 skipped, none failed (Check Changeset, PR-body guards, Test Core 1..10, TypeScript Type Check, Lint & Repo Gates, Dogfood Regression Gate, Governed Surface Queue Guard among them). - Full dogfood battery (the narrowing arm) at 344fc14, closure built first: `os-verify-lock: VERDICT command-exit 0 · held the lock 2915s (48m35s)`, `Test Files 487 passed | 3 skipped (490)`, `Tests 4128 passed | 68 skipped (4196)`, no failures. Also green at 4f232bf (`Tests 4128 passed | 68 skipped (4196)`). </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h <!-- signed: repo:objectstack#2 · huangyiirene · session_01J8VVAj3FYe91JCMQZPS88h --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Requested by Bill · project thread
Fixes #34681
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
The seven doors naming no package (save in publish and draft mode, per-item publish, delete and draft discard, and the history family: history, diff and rollback) now resolve their address the way the read naming no package does in this cell: a bundled type's name no package ships, held as stored rows at one member by a base package and a package that declares it. One helper,
packagelessRowHeldBaseAddressinprotocol-save.ts, asks the read's own judgment (rowHeldBaseAddressOf, unchanged) over the item's active rows, with the same guard the layered read uses (two or more bound holders, no package-less row, the base among them). Each door asks it only where it would otherwise refuse naming two or more packages (the history family throughhistorySlotOf, its shared slot resolution), and then proceeds as the same request naming the base, judged as named (a base bound to an id no installed package has is refused422 WRITABLE_PACKAGE_REQUIREDat the draft save too, see the third round below):main8596c80PUTand in process)WRITABLE_PACKAGE_REQUIREDnaming the base, as?package=BASEanswers (read-only base)?package=BASE?package=BASE(package=BASE)), as the delete's doesThe dependent's row is untouched and still read and written at its own
?package=. The destructive doors (delete, draft discard, rollback) follow the base by the maintainer's ruling (S2, option A, comment 7008542936).Third round (contract review 7008272548 and ruling 7008542936):
publish?package=IDpublishes the draft #26921) and the late override re-judgment, as the save naming it is: the follow arm keeps the base infollowedBaseand both sites read it, where before they read the cleared draft address and judged nothing. Cell: the base's rows bound to an id no installed package has, which an installed dependent declares. Before: bare draft save 200, writing a draft bound to that id; now 422WRITABLE_PACKAGE_REQUIREDnaming it, as?package=BASEand the bare publish-mode save answer.messagenames the package of the row it restored ((package=ID)), in the delete receipt's spelling.packages/spec/src/api/protocol.zod.ts: thepackageIddescriptions of the save (active and draft), the per-item publish, the delete, andHISTORY_PACKAGE_SELECTOR_DESCRIPTION(history, diff, rollback) now state the row-held base exception, that two packages neither of which declares the other are still refused409, and, on the delete, that a second bare delete removes the dependent's row and the base's copy comes back only by saving it again.gen:schemaandgen:docsregeneratedcontent/docs/references/api/protocol.mdx. Description text only; no shape, key or accepted value moves.packagelessAddress,packagelessDraftAddress,historyMetaItemandrollbackMetaItemdocblocks inprotocol.tsand theprotocol-history-slots.tsmodule header no longer say the bare doors refuse this cell.Files:
packages/metadata-protocol/src/protocol-save.ts(the helper; the publish-mode and draft-mode address),protocol-diff-delete-load.ts(delete and discard),protocol-history-and-publish.ts(publish),protocol-history-slots.ts(historySlotOf: history, diff and rollback); hostPicklists widened by the members the read's judgment reads (one line each in the history, diff and rollback doors, the rollback's inprotocol-package-commits.ts). Comment-only: thepackagelessLayeredReadRefusaldocblock inprotocol.tsand therowHeldBaseAddressOfdocblock inprotocol-meta-item-face.tsnow say the writes follow the base (claim amendment 7005577225), plus the S3 docblocks above.protocol-lock-version-gates.tsneeded no edit. No file seat 4's PR touched; underpackages/speconlyprotocol.zod.ts's five descriptions (claim amendment in 7008542936).Changesets:
.changeset/34681-bare-write-doors-follow-base.md(@objectstack/metadata-protocolpatch) and.changeset/34681-spec-bare-doors-follow-base.md(@objectstack/specpatch), each withClause-②: yes (widening)andMetadata-protocol: none.Pins:
packages/runtime/src/domains/meta-bare-write-doors-follow-base-34681.test.ts(new file, named for this card; the shared harness filemeta-disabled-holder-served-stack.test.tsis fenced for this card).Tests
Readings on `main` 8596c80 before the change (A1), through the real protocol on a booted kernel
Bare read 200
base enat the base. Each bare door, code (read-only) pair and authored (writable) pair alike: save 409, draft save 409, publish 409, history 409, delete 409, draft discard 409, every message naming both packages.?package=BASE(authored base) save: 200 into the base's row. Diff and rollback, measured on branch head 90d943c before their change (the new diff and rollback pins run against that build): each 409 RESOURCE_CONFLICT naming both packages (Tests 2 failed | 5 passed (7)).Third round, RED before the fixes (the build at `aa1df8a4`, new pins added first)
Tests 3 failed | 9 passed (12):com.qa.ghostbase(no installed package has it), declared by the installedcom.qa.ghostaddon.?package=naming it and the bare publish-mode save answered422 WRITABLE_PACKAGE_REQUIRED; the bare draft save answered 200,Saved email_template 'ghost_mail' (env-wide, package=com.qa.ghostbase, state=draft).Reverted to version 1 — type=email_template, name=rb_mail [seq=16], no package.DELETEpin:405 METHOD_NOT_ALLOWED(use GET, HEAD, PUT). TheHttpDispatchermetadata-item route does not mountDELETE(domains/meta.tssays mounting it needs its own card), so the pin was dropped, not the door; see Acceptance notes.Pins at the final head: 11/11 pass
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-bare-write-doors-follow-base-34681.test.ts→Tests 11 passed (11). Added this round: the uninstalled base (S1), two bare deletes in a row, the bare draft read beside the bare discard (the dependent's draft stored first, so a first-match read would meet it first; the read serves the base's draft with a version token), the destructive doors under a read-only base (bare delete, draft discard and rollback each answer what?package=BASEanswers, never409), the rollback receipt's package, and a bare read after the bare publish.Ablation (one-shot, not kept)
Round 3, each through
scripts/ablation-replace.mjs, rebuilt,ablation-dist-preflightchecked, then the pin file:followedBase = base;deleted (anchor 1 → 0, blob e8a6970a → fb961e6f), dist marker absent:Tests 1 failed | 10 passed (11), the uninstalled-base pin red.Tests 1 failed | 10 passed (11), the rollback pin red.Tests 9 failed | 2 passed (11); every moved pin red, including the four rider-2 pins; the shipped-base neighbour and the controls green. A first attempt used a comment marker the bundle strips: the preflight refused it before any test ran, so that leg was a no-op and was re-run with a marker that survives.git diff HEADempty,git status --porcelainempty, rebuilt, preflight--absentclean,Tests 11 passed (11).Round 2, the
historySlotOfsite: its follow-the-basereturnreplaced so it never fires (anchor 1 → 0, blob 3106fd35 → 9365a157), rebuilt, marker present in 2 built files:Tests 3 failed | 4 passed (7), the history, diff and rollback pins red, the rest green. Restored: blob == HEAD 3106fd35,git diff HEADempty, rebuilt, preflight--absentclean,Tests 7 passed (7).Round 1, the helper itself:
Mutation through
scripts/ablation-replace.mjs: the helper's finalreturnreplaced so it never answers a base (anchor 1 → 0, blob 517f041a → aec26a74),@objectstack/metadata-protocolrebuilt,ablation-dist-preflightmarker present in 2 built files. Run:Tests 3 failed | 2 passed (5): the three moved pins went red (first failure: the RESTPUTanswered 409 where 200 is pinned); the neighbour reading and the controls stayed green, as expected. Restored: blob == HEAD 517f041a,git diff HEADempty, rebuilt, preflight--absentclean,Tests 5 passed (5).Acceptance notes
403 NOT_OVERRIDABLEtowardBASE.custom, writing nothing (the package-less write is closed for a shipped name, ADR-0146 D11). The predicted disagreement (the save landing in the dependent's row) does not occur onmainor here.packageId= dependent). Not silent: the delete receipt says the item still exists and names the dependent's row as remaining.422 WRITABLE_PACKAGE_REQUIREDnaming the base) instead of409naming both, and so do the bare delete, draft discard and rollback (pinned equal to?package=BASE).DELETEdoor is not mounted on this transport (405), so the REST pin stays onPUT; the delete is pinned in process. MountingDELETEthere is a public-surface change for its own card, not this one.409naming every holder;?package=still writes where it names.historySlotOf, pinned beside the first five doors. The two contract docblocks that said the writes do not follow the base are rewritten in the same PR.en-USrow, the dependent'sfr-FRrow): the bare read atfr-FRanswers 404, the bare save offr-FRwrites the dependent's row (200), and the bare read atfr-FRthen answers 409. Present onmain8596c80, untouched here.Verification
Third round at head
914e61af(merge base withorigin/main6f36818;overlap-checkagainstorigin/main819c067). The suites ran at531d0988;914e61afonly re-flows four docblocks inprotocol.ts(comments), after which the facade ratchet and the other ratchets were re-run.Local subset, each exit captured before any pipe
pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2: exit 0,Test Files 360 passed | 9 skipped (369),Tests 23249 passed | 45 skipped (23294).pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2on the pin file plusmeta-disabled-holder-served-stack.test.tsandmeta-bundle-member-one-request.test.ts: exit 0,Test Files 3 passed (3),Tests 173 passed (173).pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2: exit 0,Test Files 947 passed (947),Tests 28933 passed | 1 todo (28934).@objectstack/metadata-protocol,@objectstack/runtime(tsc pluscheck:test-typecheck) and@objectstack/spec: each exit 0.gen:schemaandgen:docs: exit 0; they changed onlycontent/docs/references/api/protocol.mdx, committed.dispatch-gates.mjs --commands, 120): 118 exit 0;check:dual-build-cjs-loadsandcheck:skill-examplesexit 3, PREREQUISITE NOT MET (no full build here), NOT MEASURED locally and left to CI.check:facade-delegation-onlywas red in the first pass (protocol.ts11717 lines over its ceiling 11705, from the S3 docblocks); the docblocks were re-flowed line-neutral and the gate re-run at914e61af: exit 0.--ranreconciliation: 120 derived, 118 run, 2 NOT-MEASURED, 0 UNRUN.914e61af:check:facade-delegation-only,check:query-options-erasure(236 sites, at the ceiling),check:nul-bytes,@objectstack/spec check:generated(all 14 artifacts current; a first run without the 4096 MB heap cap died intscwith no diagnostics, re-run with it: exit 0). Each exit 0.overlap-check.mjs --branch=HEAD:VERDICT clean, againstorigin/mainand fix(metadata-protocol)!: a seed record that leaves a key field blank is refused at load #35459.test:reponot run locally (no file of that project changed); CI'sTest Coreruns it.席位核对
protocol-save.ts(packagelessRowHeldBaseAddress, the draft-mode follow arm withfollowedBase, and the two sites that read it),packages/spec/src/api/protocol.zod.ts(the five descriptions),protocol-diff-delete-load.ts(the two address sites in the delete).pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-bare-write-doors-follow-base-34681.test.ts, expectTests 11 passed (11)(afterpnpm --filter @objectstack/metadata-protocol build).!in the title, the arm is(widening)).🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd