Repository navigation
feat(adr-0087): refuse an added migration entry filed below PROTOCOL_MAJOR - #38436
Conversation
…MAJOR The registration gate now reads, on every diff, the migration entries the PR adds across the three entry directories (by key, so a move between majors is a rename, not an add) and refuses one whose filename prefix is below the PROTOCOL_MAJOR evaluated at HEAD by loadProtocolMajor. A late note for an already released major is declared with an adr-0087-backfill line in a changeset. Self-test battery EM pins it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
…as added Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn Final green head · 2026-11-29T01:41Z · area o5-fleet
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb 席位核对L1 (thread L1-a, area o5-fleet) · read 2026-11-29T01:53Z · Head-sha: This is the first L1 record on this PR, a full review. Checklist (l1-face
My readings, at this head (detached worktree, restored,
Residual (seat's decision before landing): "Possible follow-up (not filed, the seat's call)": a check at the protocol move, so that no entry absent from every released tag stays below the new major. That is the shape that stranded the 34 entries #38256 carries. It is outside this card by the card's own words, and this PR says so. Before landing, the seat either files it and puts the Nit (no action owed): the Owed before landing: the contract-tier L2 PASS on this head, and the seat's call on the residual above. Then the area lands it (Tier S). |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn Contract reviewServed-tier: Inputs: card #38240 (body, triage 7237765394, reach note 7237892858, serial note 7240095647, claim 7247757481, os-dev-report 7248771784); #38142 and its thread; PR #38239 (body, Acceptance notes, record 7237861973); the maintainer's ruling of 2026-08-30 on #13080 (5468992520); PR #38436 (body, comment 7248962235, file list, net diff of the head against merge base ① Derived judgments1. Net accept set against 2. The refusal: below 3. Added-ness by key against the merge base's listing. Right for the card's three pins, wrong in one corner (S2).
4. The 5. The
Does it need the maintainer's word under risk ⑤ of
Since the answer is no, no words of his are owed. His word would be needed for any later widening: more than one exact path per line, a carrier outside the diff's changesets, a form with no reason, or writing the form into ADR-0087 as a category. One dependency, not a finding: which major a late note for a change shipped in an 18.x minor belongs to is the question #38239's record left to the maintainer (#38277, per 7238814523). The gate records the author's claim and does not settle it. 6. Self-test. Right.
7. Check-runs on the head. 53: 27 ② Semver level
③ Boundary flags
④ Design judgment
S1 (should-fix) — the refusal prints a backfill line that passes as printed.
S2 (should-fix) — a
N1 (nit) — for N2 (nit) — N3 (nit) — the README's "Adding an entry" and ADR-0087 do not yet name the refusal or the declaration line. A prose follow-up. N4 (nit) — every EM case runs at major 19, the tree's own. A case at another major would pin the read inside the battery instead of through GR7. S1 and S2 each owe a delta review of their fix. N1 can ride the same commit, since the head moves anyway. Implemented-by: VERDICT: PASS |
…r0087-below-major Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
…used as printed, and a template id no longer hides a new entry Round 2 of the contract review: the example reason carries MINOR, PATCH and WHY placeholders and the reason must name a release of the entry's own major in digits (S1); the ledgerAdded conjunct applies only on a merge base from before the per-entry split (S2); retired-keys and retired-defs refusals give the tombstone aging cost (N1). Battery EM gains the cases that pin each. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
…c version in prose Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
…r0087-below-major Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn Final green head (round 2) · 2026-11-29T03:30Z · area o5-fleet
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb 席位核对L1 (thread L1-a, area o5-fleet) · read 2026-11-29T03:40Z · Head-sha: This is a delta from my ACCEPT 7249085688 at Checklist (l1-face
My readings, at this head (detached worktree, restored, removed)
Nit (no action owed): the placeholder test is whole-word and case-sensitive. A real reason written as "… 18.4.0, a PATCH release …" would be refused. That fails loud, never silent. Owed before landing: the delta contract L2 on this head (running), and the protocol-move follow-up card the area files and names in the body. Then the area lands it. |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn Contract reviewServed-tier: Delta review of round 2 against the full review 7249162118 (head ① Derived judgments1. The printed backfill line. S1: closed.
2. The S2: closed.
3. Net accept set: still strictly narrower than
4. Battery floor 50. Right.
5. EM-R8. Right. With 6. EM-U2 rewording. The cases test what they tested.
7. Check-runs on this head. 48: 26
② Semver levelUnchanged from the full review. The diff is still one file under ③ Boundary flagsThe Round 2 line's claims, each answered:
Other flags:
④ Design judgmentNo must-fix, no should-fix. N1 (nit) — closed for
N5 (nit) — the placeholder clause refuses any reason holding the word
N6 (nit) — the PR body below the Round 2 line still describes round 1.
N4: closed by EM-R8. N2 and N3 are untouched, as the full review left them for a follow-up. N1's remainder and N5 sit in the gate file, so a fix moves the head. Each is left as an accepted deviation or goes on the follow-up card. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn Landing · 2026-11-29T03:43Z · area o5-fleet · Head-sha
|
Requested by Leehom · project thread
Fixes #38240
Clause-②: no
Metadata-protocol: none
维护者速读
Round 2 (contract review 7249162118, head
323f21d860): S1 fixed (the refusal's printed backfill line carriesMINOR,PATCHandWHYplaceholders and the reason must name a release of the entry's own major in digits, so the line pasted unedited stays red, EM-R6); S2 fixed (theledgerAddedconjunct applies only on a merge base from before the per-entry split, so an id the template already carries no longer hides a new entry, EM-R7); N1 fixed (retired-keys/andretired-defs/refusals give the tombstone aging cost read bybuild-schemas.ts). Also: EM-G7 (the L1-a nit), EM-R8 (a case at major 20), and EM-U2 no longer spells a spec version in prose (thecheck:future-spec-majorred). Battery EM now has 50 cases;origin/mainmerged.Where the sections below still describe round 1 (the
ledgerAddedcondition on every base, a 40-character-only backfill reason, 31 EM cases, test readings at9982079f87), the Round 2 line above supersedes them: delta contract review 7250195970 (PASS) and delta L1-a 7250194256 (ACCEPT) read head323f21d860.What changes
scripts/check-adr-0087-registration.mjsgains a second rule, judged on every diff (with or without a breaking changeset):semantic/,retired-keys/,retired-defs/), an entry file at HEAD is added when its key (the filename minus itsMAJOR.prefix) is absent from the merge base's listing of the same directory. Asemantic/entry must also be inledgerAdded, the id set the R4registeredcheck already reads, so the two never disagree about what a PR registered.PROTOCOL_MAJORis refused. The message names the file, its prefix, the currentPROTOCOL_MAJORand where it was read, gives thegit mvtoPROTOCOL_MAJOR.KEY.ts, and says the one case that may sit lower is a backfill, with the exact line to write.adr-0087-backfillplus a colon, followed by the entry path and the release that shipped the change (40 characters minimum, the same floor as anot-requiredreason). It is not anadr-0087disposition (that pattern needs the colon directly afteradr-0087), and each one is printed and annotated as an exemption on every run.PROTOCOL_MAJORsource. Read at HEAD frompackages/spec/src/kernel/protocol-version.ts(PROTOCOL_SOURCE, imported fromscripts/sync-template-versions.mjs) and evaluated by that module'sloadProtocolMajor, the same reader the version lane uses. Nothing is hard-coded and no second copy is parsed. The reader is async andscan()is not, so it runs in a childnodeprocess, only when the diff adds an entry. A major that cannot be read is a red.EM (#38240), 31 cases, roster floor 60 to 61. The GR7 transition fixture now carries the protocol module, because itsbetaentry counts as added and is judged against it.The rule's reach
Covers:
PROTOCOL_MAJORat HEAD. That covers the threesemantic/18.*entries spec migrations: three ADR-0087 semantic entries landed under protocol major 18 after PROTOCOL_VERSION moved to 19, soos migrate meta --from 18never shows them #38142 moved to 19.Check Changesetjob checks out the PR's merge commit. So a branch cut before a protocol move is judged against the major onmainonce its CI runs after the move.Does not cover:
semantic/18.*entries spec migrations: 34 more ADR-0087 semantic entries first ship in a 19 prerelease but sit under major 18, soos migrate meta --from 18never shows them (follow-up of #38142) #38256 carries were each filed whilePROTOCOL_MAJORread 18. They were at the major of their day, so this rule would not have refused any of them. Catching that shape takes a check at the protocol move (no unreleased entry left below the new major), not a check on added entries. That check is not built here.19.X.tsto18.X.tskeeps its key, so it is not added (the card's R100 pin) and is not judged.skip-changeset. The real scan runs inCheck Changeset, which that label skips wholesale. Adding an entry publishes from@objectstack/spec, so such a PR owes a changeset anyway.retired-keys/andretired-defs/(they have noid:line forledgerAddedto see). From such a base, all of their files would read as added: a red, never a silent pass, and no open branch is that old.History reading
From #38239's Acceptance notes: since the per-entry files exist (
f293d454b, 2026-08-10), about 1,150 entries were added and 3 landed below the protocol major of their day, all three in #38142. No backfill was among them: the one explicit backfill (5823d593db) landed at the major of its day. A rule of "equal toPROTOCOL_MAJOR" would have refused the 717 entries filed ahead of the 17 to 18 bump.Re-measured for this PR from a blobless clone of
main, first-parentf293d454b..f42bcc18c6, all three entry directories. An entry counts as added when its key appears asAand not asDin the same commit, so a move between majors is not an add. Major of the day is read by position against the two bump commits4e9fe9ff6(17 to 18) and204356a6e(18 to 19).semantic/retired-keys/retired-defs/The three below:
publish-refuses-data-model-fields-that-save-and-do-not-work,define-form-studio-helper-renamed-define-metadata-formandform-type-define-form-and-packageless-list-at-form-name, each18.*under protocol 19.Tests
All readings are at head
9982079f87, unless a line names another tree.EM-R1fixture (an addedsemantic/18.*whilePROTOCOL_VERSIONis19.0.0) run throughscan()frommain's gate (f42bcc18c6) and from this branch's gate: main's is green, this branch's is red. The same battery run against this branch's gate with the refusal loop switched off: 15 failures, all inEM-R1,EM-G5,EM-R3,EM-R4andEM-R5. Nothing else in the self-test moved.node scripts/check-adr-0087-registration.mjs --self-testprinted991 assertionsand exited 0. The battery floor holds, includingEM (#38240)at 31.scan()overd9bc148e0(fix(lint)!: four publish-time checks for data-model metadata that saves and does not work #37513, the commit that filedpublish-refuses-data-model-fields-that-save-and-do-not-workunder 18 while protocol was 19) is red, naming that file. Over216524a286(fix(spec): three upgrade-guide entries that first ship in protocol 19 move from step 18 to step 19, soos migrate meta --from 18shows them #38239, threeR100renames 18 to 19) it is green, with 0 entries counted as added. The CLI overf42bcc18c6..origin/main(5df10eccaa, three new19.*entries) prints3 migration entries added, each at or above PROTOCOL_MAJOR 19.Red before: main's scan() against this branch's, on the EM-R1 fixture
Green after, and the replay on the commit that filed a 19 note under 18
Derived gate families: 34 derived, 34 run, all exit 0
Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat9982079f87. Each command ran underos-verify-lock.sh, and its exit code was captured before any pipe.VERDICT command-exit 0. Every one exited 0:check-adr-0087-registration(--base origin/mainand--self-test),check-closing-keyword-parity(both halves),check-comment-mask-corpus,check-declaration-mirrors(both),check-self-test-wired(both),check-self-test-workflow-commands(both),check-whole-set-label-write(both),ci/plan-test-core-shards --self-test,pm/bare-root-worklist --self-test, and the pnpm familiesadr-anchors,agent-test-spelling,bash32-floor,changeset-gate-self-tests,ci-filter-parity,cli-command-ids,cross-package-test-inputs,driver-memory-census,entry-guard,gitlink-declared,nul-bytes,parse-guard,pnpm-filter-targets,pnpm-flag-spellings,ratchet-remedy-authority,refd-timer-probe,scripts-symbol-anchorsandwatch-hint-literal.pnpm check:pm-dispatch-gates:VERDICT command-exit 0,dispatch-gates self-test (fast tier): 2459 cases pass.dispatch-gates --ran:34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED.Acceptance notes
scripts/and publishes nothing, so the PR carriesskip-changeset. That label skips the real scan inCheck Changeset. The gate's--self-testhalf still runs, unconditionally, inLint & Repo Gates(check:changeset-gate-self-tests)..github/workflows/**edit. The form is one line per entry, checked against the exact added path, with the same 40-character reason floor asnot-required. A line that names no refused entry excuses nothing and is not itself an error.PROTOCOL_MAJORruns in a child process.loadProtocolMajoris async (it imports the type-stripped module) andscan()is synchronous and called synchronously across the whole self-test. So the reader is called in a childnode, only when an entry is added. The reader file itself is untouched. Cost: one short spawn on a PR that adds an entry, nothing on any other.semantic/also required in the R4 set. A stays within added entries, so it does not widen past the reach note 7237892858. The narrower B (semantic/only, exactly the R4 id set) was not taken.ledgerAdded(the R4 set) is an id set read fromid:lines. Renames do not count in it, because an id survives a move. But it carries no file paths, and it cannot seeretired-keys/orretired-defs/, whose entries declareexport const entry = '...'and noid:. The card's directory scope and its ~1,150 reading both span all three directories, so added-ness is decided by the key in each directory, andsemantic/additionally requires the id to be inledgerAdded. EM-G3 (semantic) and EM-G6 (retired-keys) pin that a rename, here a downward one so a counting rule would red, is not counted.verifyTypeSurfaceOnlyor the prescription exemption moved (maintainer ruling 2026-08-30 on [finding] check-adr-0087-registration has no honest disposition for a published TYPE-surface narrowing — every category is refused, so the class is pushed to drop the**BREAKING**token instead #13080).main. Since the branch point,maingained 8 commits. None touches this file,sync-template-versions.mjsor the protocol module (overlap-check: merges cleanly). The three entriesmainadded are the CLI reading above.build-schemas.tsremedy major, the README/ADR prose and--list(L2 N2, N3), and the delta L2 nits N1 (retired-defs/cost text) and N5 (capitalised placeholder words).Verification
Read first (by risk):
scan()'s new tail block (the refusal and its backfill match) andaddedMigrationEntries, the added-ness definition the rule stands on.protocolMajorAt, the child process that evaluatesPROTOCOL_MAJORwithloadProtocolMajor.EMbattery, especially EM-G3 and EM-G6 (renames are not added) and EM-R2 (an unreadable major is red).Two-minute check:
node scripts/check-adr-0087-registration.mjs --self-testprints the success line with no failures. Then run the gate on this branch withnode scripts/check-adr-0087-registration.mjs. Its last line should readthis PR adds no migration entry.Generated by Claude Code