Repository navigation
fix(metadata-protocol): the bare draft save beside a disabled package's rows writes the one enabled holder's draft - #39035
Conversation
…and the one enabled shipper (red) The draft save naming no package, where the item's rows are bound to a disabled package D and to E, the only enabled shipper, answers as without D: it writes E's draft and leaves D's rows byte-unchanged. Red on main: 409 RESOURCE_CONFLICT naming D and E. The CONTROL with a second enabled shipper now also pins the draft save's refusal naming the two enabled shippers, never D. Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…older beside a disabled package's rows Where a draft save naming no package finds its draft address ambiguous because the rows are bound to a disabled package and to the one enabled holder the read naming no package counts, it now writes that holder's draft (soleEnabledRowHolder), followed as the row-held base is, instead of refusing 409 naming the disabled package. The packagelessHolderRefusal docblock's known-gap paragraph is reworded: the delete, the draft discard and now the draft save all act at that holder first. Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1d80b7735a6ce0226c97611c430af0cc981e76fb && git checkout 1d80b7735a6ce0226c97611c430af0cc981e76fb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c748e7dfd647ca9b4e679d59425f358c9ff84b04 dc847f232e7004094d1b83b4c5b90faf22179def && git checkout -B drift-repro c748e7dfd647ca9b4e679d59425f358c9ff84b04 && git merge --no-ff dc847f232e7004094d1b83b4c5b90faf22179def
node scripts/docs-audit/affected-docs.mjs --json c748e7dfd647ca9b4e679d59425f358c9ff84b04 |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-02T04:36Z · |
…aft-save-cell Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ Final green head · 2026-12-02T05:21Z · zone osa-data
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #39035 (#38753) · head dc847f2 · 2026-12-02T05:24ZACCEPT, on head
Next: zone landing. The merge closes #38753. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-02T05:25Z · Landing: L1 ACCEPT on head dc847f2 (7335910466; no must-fix, no should-fix). Not governed, 85 lines ≤ 3000, no L2 owed, CI 39 success / 0 failure, mergeable clean. Ready for review and auto-merge (squash). |
Fixes #38753
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/metadata-protocol/src/protocol-save.ts,saveMetaItem: just before the ambiguous-draft-address refusal (disabledRowHoldersRefusal), a draft save naming no package whose draft rows are bound to a disabled package D and to the one enabled holder E the read naming no package counts is re-addressed to E (soleEnabledRowHolder):request.packageId = E,draftAddresscleared,followedBase = E, as the row-held-base follow a few lines above does, so the named-base rule and the late override re-judgment judge E. Before:409 RESOURCE_CONFLICTnaming D and E, while the bare read serves E and the bare publish save writes E's row. With two or more enabled holderssoleEnabledRowHolderanswers nothing and the refusal naming only the enabled holders stands.packagelessHolderRefusaldocblock's "Known gap" paragraph is reworded: the delete, the draft discard and now the draft save all act at the one enabled holder first.packages/rest/src/meta-disabled-package-doors.test.ts: four new cells on PR fix(metadata-protocol): a disabled holder counts for nothing at _env, the bare delete and discard, and the bare read beside a package-less row #38948's fixture (both save orders, D shipping the name in code or not): the bare draft save's effect on the stored rows equals its effect without D (E's draft replaced, nothing else), D's rows byte-unchanged, no refusal. The second-enabled-shipper CONTROL now also pins the draft save's409naming the two enabled shippers, never D, with nothing written..changeset/38753-draft-save-cell.md:patchfor@objectstack/metadata-protocol.This is the last cell of #38753 (PR #38948 merged the rest as
Part of), so this PR closes it.Tests
Red first, fix, ablation (local, under the verify lock)
742b2442(test only, fix absent): the four new draft-save cells failed withRESOURCE_CONFLICT:409:Name the package this save is for, then send it again ... dashboard 'one_shipper_dash' belongs to 2 packages ('app.disabled_demo', 'app.healthy_demo') ...; the other 11 cells of-t 38753(the extended CONTROL included) passed.d059c60fafter rebuilding@objectstack/metadata-protocol:-t 3875315 passed / 82 skipped.scripts/ablation-replace.mjs --hold, anchorif (sole !== undefined) {turned into a branch that never runs): rebuilt,ablation-dist-preflightfound the marker indist/index.cjsanddist/index.js; the four draft-save cells went red with the same 409 naming D and E, 11 passed. Restore leg: blob equal to HEAD,git diff HEADempty,git status --porcelainempty; rebuilt, preflight--absent(marker absent from all 24 built files, tree clean);-t 3875315 passed.Suites and typecheck on 4fecd59 (local, under the verify lock)
@objectstack/metadata-protocol, full suite: 381 files passed / 9 skipped; 23940 tests passed / 45 skipped.pnpm turbo run typecheck --filter=@objectstack/metadata-protocol --filter=@objectstack/rest: 33 of 33 tasks passed (rest's test layer compiles undercheck:test-typecheck, 0 errors).@objectstack/restfull suite andtest:repo: not run locally; CI's Test Core shards are the evidence.Gates on 4fecd59
dispatch-gates --commandsderived 72 families; all 72 run locally with exit codes;--ranreconciliation: 69 run, 3 NOT MEASURED (check:dual-build-cjs-loadsexits 3, it needs every package'sdist/;check-comment-mask-corpus.mjsandcheck:query-options-erasuredid not finish inside a 240 s per-gate cap). 68 of the 69 run exit 0.pnpm check:closed-ceremony-textexits 1, and will be red inLint & Repo Gates: see the acceptance notes.overlap-check: clean againstorigin/main444dce6, 0 open PR heads sharing a file.Acceptance notes
protocol-enabled-holders.ts's module docblock andsoleEnabledRowHolder's own docblock still describe its callers as "the bare delete and draft discard"; the draft save is now a third caller. That file is read-only on this claim's surface, so the wording is left; noted, not filed.check:closed-ceremony-textgoes red on this PR for a reason outside its diff.trackedFiles()inscripts/check-closed-ceremony-text.mjsreadsgit ls-files -z -- packages content/docs .changesetthroughexecFileSyncwith Node's default 1 MiBmaxBuffer(1,048,576 bytes). That output is 1,048,565 bytes onorigin/main444dce6 and 1,048,601 bytes on this head; adding.changeset/38753-draft-save-cell.md(36 bytes with its NUL) crosses the limit, and the gate dies withspawnSync git ENOBUFSin both its self-test and its sweep. Any PR that adds a tracked file under those roots now trips it. The script is outside this claim's file surface, so it is not edited here; reported for filing as a reproducible defect.Verification
Run
pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-disabled-package-doors.test.ts -t 38753after building@objectstack/metadata-protocol: 15 pass, including the four "the bare draft save writes E's draft" cells.Riskiest hunks:
packages/metadata-protocol/src/protocol-save.ts(the new re-address block insaveMetaItem, and thatfollowedBasenow also carries the sole enabled holder into the named-base rule and the late override re-judgment).Generated by Claude Code