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