Repository navigation
fix(metadata-protocol)!: refuse a write naming no package over the package-less row of a name only disabled packages hold - #37584
Conversation
… row of a name only disabled packages hold WIP: the holder refusal reads past the package-unbound row for the disabled-holders judgment (ADR-0150 D3), with the enable as the remedy; pins for the four write doors on both transports and registration orders. Claude-Session: https://claude.ai/code/session_01L6bhgWSCg5Qjw8A76bTFD6 Co-authored-by: Claude <noreply@anthropic.com>
… active rows where a package-unbound row is stored; the refusal fits the client message cap Claude-Session: https://claude.ai/code/session_01L6bhgWSCg5Qjw8A76bTFD6 Co-authored-by: Claude <noreply@anthropic.com>
…ration entry, changeset and the objectql pin The ADR-0150 D3 note dated 2026-11-26 records the ruling of #37499: while every holder of a name is disabled, the four writes naming no package are refused with the enable remedy, and enabling the holder again serves the package-less row untouched. The semantic migration entry and the changeset carry the same fix; the objectql door pin that read the old 200 now reads the refusal and the round trip. Claude-Session: https://claude.ai/code/session_01L6bhgWSCg5Qjw8A76bTFD6 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 29 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 12 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 178 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 f2ad6edb963501f8e425965926e93a456c706363 && git checkout f2ad6edb963501f8e425965926e93a456c706363
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e2837e702adace9c449771efbf2c90838eef0a05 21b30f4b7982d22878115907dbb805b6ede7aa39 && git checkout -B drift-repro e2837e702adace9c449771efbf2c90838eef0a05 && git merge --no-ff 21b30f4b7982d22878115907dbb805b6ede7aa39
node scripts/docs-audit/affected-docs.mjs --json e2837e702adace9c449771efbf2c90838eef0a05
|
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Isolated review, read at 2026-11-26T14:59Z. Inputs: card #37499 (body, claim 7191684203, dev report 7194444492), this PR's body and file list, the net diff against ① Derived judgmentsEvery answer the diff moves is for a caller naming no package, a type the registry reads by package, and a name whose every holder is disabled.
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix. One should-fix, owing a delta review. S1 (should-fix) — the ADR note says every write naming no package is refused; two write doors naming no package are not asked the judgment at this head. The note reads "it hides with its holder, on the reads and on the writes alike", "Every write naming no package is refused … : the publish-mode save, the draft save, the delete and the draft discard", and "Re-enable serves the row untouched". Read in the tree, not run:
Neither door is among the card's four, so the card's Done-when is met by this diff, and this is not graded as a failure of the fix. The finding is on the note: it records a universal the tree does not hold, and it is the text a maintainer approves as the contract. Fix, either way: (a) measure both doors in cell 1 first, then word the note as the four doors it closes, name the per-item publish and the rollback as not judged yet, and cite their card; or (b) close both here through the same judgment and pin them. One clause should also say that the server-stated rewrites ( Per file, against the code and the scenario it is accepted against:
Nits (none moves the head by itself; fix on the next push of the note, or leave as accepted deviations or follow-up cards):
Out of the diff, read and not reviewed:
Implemented-by: VERDICT: PASS |
…wo doors not judged yet The note said every write naming no package is refused. Two doors are not asked the judgment at this head: the per-item publish and the per-item rollback. The note now states the four writes this change closes, names those two as not judged yet with their card, says the server-stated rewrites are not asked by design, names the draft reads, marks which controls are pinned and which are measured, and points at D4's exception for the platform's own record. The migration entry's surface reads "packages that are disabled". Claude-Session: https://claude.ai/code/session_01L6bhgWSCg5Qjw8A76bTFD6 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Isolated delta review, read at 2026-11-26T15:53Z. It follows record 7195624788 on head The delta is 8 added and 6 removed lines over two files: the D3 note in ADR-0150, and one string in the migration entry. No other file differs between the two heads, so the four implementing files are byte-identical to the ones the earlier record read. ① Derived judgments
② Semver levelUnchanged and still right. ③ Boundary flags
④ Design judgmentS1: closed No must-fix. One should-fix, owing a delta review. Why S1 is closed. The note no longer states a universal. It says the row hides "on the reads, and on the four writes this note closes", heads the bullet "Four writes naming no package are refused", bounds the re-enable bullet to those four, names the per-item publish and the per-item rollback as not judged yet with their symbols, files and card, and adds the clause on the server-stated rewrites. Each new sentence was read against the tree:
S2 (should-fix) — the note and the entry state the
The note says, for "a caller with no package" while every holder is disabled: "Four writes naming no package are refused, The pins and the measurement did not meet the close, for two reasons read in the fixtures. The runtime holder id ( Not a must-fix: no write lands through those doors in that cell, and the card's Done-when names the cell as measured. It is graded as S1 was: the text a maintainer approves states an answer the tree does not give. Fix, either way:
Per file, on this head:
Nits (none moves the head by itself):
Out of the diff, read and not reviewed:
Implemented-by: VERDICT: PASS |
…set to the cells the D11 close leaves open Where the ADR-0146 D11 close applies (an item one read-only code package ships, with a pair, whose package-less row the ceremony would move), the save, the draft save and the delete naming no package answer that close first, 403 NOT_OVERRIDABLE, with the holder enabled or disabled; only the draft discard reaches the 409 there. Measured at this head for an email_template. The note, the entry's surface, replacement and acceptance criteria, and the changeset now say so, and the note names what this change newly refuses. The note also names the three reads at _env that still answer 409 and corrects the sentence on the platform's own record. Claude-Session: https://claude.ai/code/session_01L6bhgWSCg5Qjw8A76bTFD6 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Isolated delta review, round 3, read at 2026-11-26T17:24Z. It follows records 7195624788 (head The delta is 23 added and 15 removed lines over three files: the D3 note in ADR-0150, three strings of the migration entry, and the changeset. The four implementing files are byte-identical at ① Derived judgments
② Semver levelUnchanged and still right. ③ Boundary flags
④ Design judgmentS2: closed No must-fix, no should-fix. Why S2 is closed. The finding was that the note and the entry stated the
The D11 answer against the card's ruling. In those cells the tree answers
Per file, on this head:
Nits (none moves the head by itself; the changeset is a prose face, the ADR and the entry are not):
Out of the diff, read and not reviewed:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 21b30f4 · card #37499 · area s2-data · 2026-11-26T17:26ZL1 checklist
Tier: H. Landing: hand-off to the approver by the next stroke; ⛔ the seat does not merge. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-26T17:27Z · head 21b30f4 · approver 维护者速读
|
Requested by Sales · project thread
Fixes #37499
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no page under
skills/**orcontent/docs/**teaches a save, draft save, delete or draft discard naming no package over a name only disabled packages hold; the refusal's own sentence names the fix维护者速读
What changes
A package-less
sys_metadatarow stored at a name a package holds is that package's customization (ADR-0150 D3/D4). Reads naming no package already hid it while every holder was disabled. The four writes naming no package still reached it wherever the ADR-0146 D11 close leaves the package-less write open. Measured onmain5dbcc02bfor adashboardunder a holder whose id derives no pair (that close'sno_paircell), on both transports and both registration orders, before and after a restart:mainPUT /api/v1/meta/:type/:name200, the hidden row edited409 RESOURCE_CONFLICT, nothing writtenPUT …?mode=draft200, a draft stored that the draft read answers404 NO_DRAFTfor409 RESOURCE_CONFLICT, nothing writtenDELETE …?state=draft200, the draft removed409 RESOURCE_CONFLICT, nothing deletedDELETE /api/v1/meta/:type/:name200, the row removed; the next enable serves the package's item without its customization409 RESOURCE_CONFLICT, nothing deletedThe refusal starts with the fix ("Enable the package that holds TYPE 'NAME' first, then send this save again"), points at
GET /api/v1/packagesandPATCH /api/v1/packages/:id/enable, and names no package. It stays under the 500 characters a door cuts a client message at. Once a holder is enabled again, the read naming no package serves the row byte-identical to what was stored, and the same writes answer as before.Coverage, stated as measured. Where the ADR-0146 D11 close applies (an item of one of the five overlay types that one read-only code package ships, with a pair, whose package-less row
os migrate packageless-overlayswould move), the save, the draft save and the delete naming no package answer that close first, with the holder enabled or disabled:403 NOT_OVERRIDABLE, naming the pair and prescribing?package=with the pair's id. This change touches neither that close nor its place ahead of the judgment. Measured on this branch for anemail_templatesuch a package ships, a package-less row stored, the package disabled, with and without a package-less draft: those three answer the403and store nothing, and the draft discard, which that close never asks, answers the409. So what this change newly refuses is:Two more writes naming no package are not judged yet: the per-item publish and the per-item rollback (read in the code, not measured). Card #37608 carries both. Whether the D11 sentence should, over a disabled base, name the pair and prescribe a
?package=write is a question this change leaves open, for a card of its own.Where the change is:
packages/metadata-protocol/src/protocol-save.ts:packagelessHolderRefusal, the one judgment all four doors ask, no longer returns early when a package-less row is stored. The enabled-ambiguity arm keeps that skip, so a package-less row beside two enabled holders is written as before. A newdisabledHoldersCustomizationRefusalcarries the enable remedy. The publish-mode save also asks the judgment when the served address is the package-less row beside a disabled package's own row.packages/metadata-protocol/src/protocol-diff-delete-load.ts: the draft discard judges the holders over the active rows too when a package-less row or draft is stored, so it is refused when the customization is the active row and no draft exists.docs/adr/0150-…md: a dated note under D3 records the ruling, the readings above, the coverage as stated above and the controls.packages/spec/src/migrations/entries/semantic/19.disabled-holder-package-less-row-bare-write-refused.ts: the ADR-0087 entry the narrowed declaration owes.Not moved: an item the D11 close covers, for the save, the draft save and the delete (above). Also not moved, each pinned as a control: a name no package holds (
env_only_dash) saves, drafts, discards and deletes with200beside a disabled package; a package-less row at a name an enabled package holds; a name only disabled packages hold with no package-less row or draft stored, which keeps its409and its?package=remedy; every read.Decisions taken in this change, small enough not to need a card:
?package=refusal is kept for a name with no package-less row stored. There the named write has one row to write and nothing hidden beside it.Lane measurements the card asked for first:
mainand on this branch.docandaction(sealed against overlays): the save, the draft save and the delete answer403 NOT_OVERRIDABLEwith the holder enabled or disabled, the draft discard has no draft to remove, and nothing is written. Unchanged here._env: neither transport routes aPUTor aDELETEthere, so there is no write door to close. The dispatcher also mounts noDELETEon a metadata item (405), so the delete and the discard are pinned through the REST route and the in-processdeleteMetaItem.Tests
packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts, in the[#32605]block, each across dispatcher and REST and both registration orders:CONTROL: the environment's own item, of a name no package holds, saves, drafts, discards and deletes as before beside a disabled Dthe package-unbound row of a name only the disabled D ships is hidden with it(four doors refused, every stored row byte-identical, re-enable serves the row, then the same writes succeed)a package-unbound draft of a name only the disabled D ships … is hidden with it(draft beside the row, draft alone)a package-unbound row beside the disabled holder's own row … is hidden with it(a code package and an authored package)packages/objectql/src/disabled-holder-packageless-row-doors.test.ts(review#2 S3): the pin that read the old200now reads the refusal and the round trip.Readings, each under the shared verify lock with the exit code read from its VERDICT line:
Tests 20 failed | 100 passed | 61 skipped (181)with-t 32605(the five refusal pins in each of the four arms; the control passes on both builds).Test Files 1 passed (1),Tests 181 passed (181).Test Files 370 passed | 9 skipped (379),Tests 23440 passed | 45 skipped (23485); objectql638 passed (638),14428 passed (14428); rest429 passed (429),8852 passed | 351 skipped (9203); runtime649 passed (649),12081 passed | 25 skipped (12106); spec899 passed (899),28498 passed | 1 todo (28499).typecheckof metadata-protocol, objectql, runtime and spec: exit 0 each.The metadata-protocol, objectql, rest and runtime suites ran on
f71b5f88aplus the objectql pin edit. The commit after it (7e6689619) adds the ADR note, the spec entry, the changeset and that pin, and no other source. The spec suite, the typechecks, the ablation and the first dogfood battery ran on7e6689619.Rounds 2 and 3 (heads
450813bf0, then21b30f4b7) change wording only: the ADR note, the strings of the migration entry, and the changeset. The four implementing files are byte-identical to7e6689619, so the readings above stand for the code. The readings on the final head are under Verification.Acceptance notes
env_only_dashstays200,d_unbound_dashflips to409.everyRowBytesin the second and fourth tests above.docs/adr/**is a governed path and the note sits under the ADR's Decision heading, so this pull request needs an authorized approval. Moving the note to its own pull request is possible if the seat prefers.409for every name only disabled packages hold, and the D11 close answers three of the four doors first where it applies. The note, the entry and the changeset are now bound to the cells that close leaves open, and that cell was measured (above).claude/project-thread-iu6ti1, the name the platform assigned to this thread._envfor such a name answers409where the other reads answer404. It lives in other files and has its own card.First read, by risk:
packages/metadata-protocol/src/protocol-save.ts, the tail ofpackagelessHolderRefusal: the removed early return, and the!address.unboundguard that keeps the two-enabled-holders cell unmoved.packages/metadata-protocol/src/protocol-diff-delete-load.ts, theactivelookup for the draft discard: it must stay inside theunboundcondition or the cells without a package-less row would move.packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts, the four tests named above.Two-minute check:
pnpm --filter @objectstack/metadata-protocol build, thenpnpm --filter @objectstack/runtime exec vitest run --project local --maxWorkers=2 src/domains/meta-disabled-holder-served-stack.test.ts. ExpectTests 181 passed.Verification
Summary: the ablation turns 21 tests red and the restore turns them green (on
7e6689619; the implementing files have not moved since); all 101 derived gate families answered exit 0 on7e6689619; on the head21b30f4b7the 86 families that read the three edited files answer exit 0, the spec suite is green, CI is green, and the full dogfood battery is green.Ablation: re-allow the package-less skip in the judgment
On
7e6689619,scripts/ablation-replace.mjs --holdputif (address.unbound && 'ABLATION_37499_UNBOUND_SKIP'.length > 0) return undefined;back at the head of the judgment inprotocol-save.ts. Then the package was rebuilt andscripts/ablation-dist-preflight.mjsfound the marker indist/index.cjsanddist/index.js.meta-disabled-holder-served-stack.test.tsTests 20 failed | 161 passed (181), lock VERDICTcommand-exit 1;disabled-holder-packageless-row-doors.test.tsTests 1 failed | 4 passed (5), VERDICTcommand-exit 1.--restore,git diff HEADempty, rebuilt, preflight--absentpasses over all 24 built files):Tests 181 passed (181)andTests 5 passed (5), VERDICTcommand-exit 0each.A first attempt was a no-op and is void: the replacement text still contained the anchor, the tool refused it and restored the file, and the preflight reported the marker absent from
dist/. The readings above are from the second attempt.Derived local gates: 101 families, on 7e66896
node scripts/pm/dispatch-gates.mjs --commandsderived 101 commands from the seven changed paths. Each ran with its exit code recorded before any pipe, and--ranreconciled the record.node scripts/check-plugin-teardown-shape.mjs --self-test: exit 3 at first (its fixture commit was outside the shallow clone); exit 0 after fetching that commit,48 cases pass.pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts: exit 1 at first (a dependency of the CLI had no build yet); exit 0 after the build,Tests 3 passed (3).pnpm check:dual-build-cjs-loads: exit 3 at first (it reads built output and some packages had nodist/); exit 0 after the dogfood closure build,126 published require entry point(s) across 74 package(s) load.The record with those three reruns reconciles to
101 derived, 101 run, 0 NOT-MEASURED, 0 UNRUN.Among them:
check-adr-0087-registration --base origin/main,check:upgrade-guide,check:spec-changes,check:api-surface,check:error-status-conformance,check:dispatcher-error-vocabulary,check:adr-anchors,check:adr-index,check:issue-citations,check:doc-authoring,check:nul-bytes,check:pm-governed-merges, each exit 0.scripts/pm/overlap-check.mjsansweredVERDICT cleanbefore the first push, andorigin/mainatc385d3bd16merges cleanly and touches none of the changed files.Not run locally, left to CI: the
repovitest project, the workspace type-check lanes and the build job.Final head 21b30f4: gates, spec suite, CI and the dogfood battery
The diff from
7e6689619to21b30f4b7touches three files: the ADR note, the migration entry's strings and the changeset.pnpm --filter '@objectstack/dogfood^...' build: lock VERDICTcommand-exit 0.pnpm --filter @objectstack/spec test:Test Files 899 passed (899),Tests 28498 passed | 1 todo (28499), VERDICTcommand-exit 0.typecheckof spec: exit 0.dispatch-gates --commandsover those three paths derives 86 of the 101 families. Each ran with its exit code recorded: 86 exit 0. The other 15 read none of the three files and were not run again.21b30f4b7: 70 check-runs, 59 success, 11 skipped, none failed.21b30f4b7982d22878115907dbb805b6ede7aa39, as CI spells it, no shard and no path:Test Files 487 passed | 3 skipped (490),Tests 4129 passed | 68 skipped (4197), lock VERDICTcommand-exit 0, held 1848s, no failure, the tree clean before and after.450813bf0(same code): for the save, the draft save and the delete,403 NOT_OVERRIDABLE; for the draft discard,409 RESOURCE_CONFLICT; the stored rows unchanged after all four.Dogfood battery on the first head 7e66896
On
7e6689619with a clean tree, as CI spells it:pnpm --filter '@objectstack/dogfood^...' build(lock VERDICTcommand-exit 0), thenpnpm --filter @objectstack/dogfood testwith no shard and no path.Test Files 487 passed | 3 skipped (490)Tests 4129 passed | 68 skipped (4197)command-exit 0, held 1900sHuman Minimum
packages/specholds no runtime logic.packages/spectouched: the migration registry is generated at build and is not tracked;check:generatedreads no stale artifact.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code