Skip to content

check-adr-0087-registration: refuse a newly added ADR-0087 migration entry whose major prefix is below PROTOCOL_MAJOR, so an upgrade note cannot land where --from <previous major> never shows it #38240

Description

@objectstack-fleet

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

Filing gate: ① (b) follow-up of #38142 (PR #38239), the gate question its claim (7236938884) left to a measured reading; the reading in the PR's Acceptance notes supports a card. Source: fleet.
Grading: area:build · Task · p3 · reach: every team upgrading across a major with os migrate meta --from N; three 19 upgrade notes were already lost this way (#38142) · evidence: os-dev-report 7237345615 on #38142.
Dedupe: "check-adr-0087-registration major PROTOCOL_MAJOR", "migration entry below the protocol major" → only #38142 itself.

维护者速读

Ask

  1. In scripts/check-adr-0087-registration.mjs, for each migration entry the PR adds (the R4 "entries this PR registers" set, :570 entry dirs), refuse when the file's major prefix is below PROTOCOL_MAJOR. Equal or above passes: the 717 entries filed ahead of the 17→18 bump were above the major of their day and were right.
  2. The refusal names the file, its prefix, the current PROTOCOL_MAJOR, and the fix (rename to <PROTOCOL_MAJOR>.<id>.ts), and says a backfill for an already-released major is the one case that may sit lower — with how to declare it (an explicit allow line in the PR body, or whatever existing escape the gate already has; read it first).
  3. Pin it in the gate's self-test: an added semantic/18.* with PROTOCOL_MAJOR 19 is red; 19.* and 20.* are green; a renamed (R100) existing entry is not counted as added.

Done when

Activity

  1. added
    tooling
    pm:queue
    domain:devx
    on Nov 28, 2026
  2. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:fleet · domain:devx · Task · p2 · pm:queue · size S; rationale: the ADR-0087 registration gate should refuse a newly added migration entry whose major prefix is below PROTOCOL_MAJOR. Three 19 upgrade notes were lost this way (#38142). By the instruments rule, the gate would stop a repeat of a measured miss in the upgrade path, so p3 → p2. Gate tooling sits in area:fleet (area:build → area:fleet). Recorded 2026-11-28T10:14Z.

  3. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Reach note for this card's rule, from the L2 contract review on PR #38239 (7237861973, out-of-diff note). A rule that refuses a newly added entry whose prefix is below PROTOCOL_MAJOR catches the three entries #38142 fixed. It would not have caught the 34 more entries now carried by #38256, because each was filed while PROTOCOL_MAJOR and the spec package major both read 18. They were stranded by the protocol move itself: entries not yet in a released tag stayed under the old major. The implementing thread should say in its PR body what the rule does and does not cover, and may propose a second check at the protocol move (no unreleased entry left below the new major), but it should not widen this card without an amendment.

  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn

    Serial queue · 2026-11-28T13:39Z · area o5-fleet (seat repo:objectstack#5) takes this card next on scripts/check-adr-0087-registration.mjs, after #37447's gate PR lands (claim 7240067619 answers fold-or-serial: not folded — a new disposition category and a prefix-below-major refusal are different defect forms; one dev per file in this area). Left in pm:queue, unclaimed until then.

    Known points for whoever builds it (read now, not measured):

  5. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn
    Claim: PM loop round 1 · 2026-11-28T23:55Z
    Session: session_01FEkQ5oPfjnm2yWHEwkiYrn
    Account: os-project-manager
    Branch: claude/issue-38240-adr0087-below-major
    Worktree: objectstack-issue-38240
    Domain: domain:devx
    Seat: repo:objectstack#5
    Area: o5-fleet
    File surface: scripts/check-adr-0087-registration.mjs (the R4 "entries this PR registers" set, a below-PROTOCOL_MAJOR refusal for added entries, its declared backfill escape, the gate's self-test); reading PROTOCOL_MAJOR reuses the existing evaluated export (see scripts/sync-template-versions.mjs ~:301), no new copy of the number. Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier on scripts/check-adr-0087-registration.mjs at f42bcc1: "Model tier — no path-derived mandate"), effort: high (reason: the maintainer's standing word 「默认就是 high」; a gate refusal that narrows what lands is a judgement call, not a mechanical edit)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7237765394
    Premise: holds at f42bcc1 — PROTOCOL_MAJOR has 0 hits in the gate; #37447's category (PR #38365) merged as f42bcc1, so the serial wait (7240095647) is cleared and the dev builds on that tree and re-runs the gate's --self-test
    Serial constraints cleared: #37447 / PR #38365 merged f42bcc18c6 (serial note 7240095647); no other open PR on the gate at claim time; overlap-check before every push
    Pre-claim lane: area:fleet · domain:devx · Task · p2 per triage 7237765394. The gate narrows what lands, so a contract-review-tier L2 is owed before the queue (guard instrument, rules face); landing tier is read at landing with check-governed-merges --pr N.
    Pre-claim deps: none open; #37447 merged.
    Prior rulings read: reach note 7237892858 (from L2 7237861973 on PR #38239) binds the PR body to say what the rule covers and does not (the 34 entries #38256 carries were stranded by the protocol move itself, which this rule would not catch); no widening without an amendment. The gate's maintainer ruling 2026-08-30 (#13080), 「豁免的安全性由谓词④承载,保持豁免是收窄而非洞」: predicate 4 is not touched.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  7. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn
    os-dev-report

    {
      "issue": 38240,
      "status": "done",
      "branch": "claude/issue-38240-adr0087-below-major",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38436",
      "head": "9982079f87",
      "session": "session_01FEkQ5oPfjnm2yWHEwkiYrn",
      "premise_still_valid": true,
      "summary": "scripts/check-adr-0087-registration.mjs now refuses, on every diff, a migration entry the PR adds whose filename prefix is below the PROTOCOL_MAJOR evaluated at HEAD. The major is read from PROTOCOL_SOURCE (packages/spec/src/kernel/protocol-version.ts) through sync-template-versions.mjs's loadProtocolMajor, called in a child node because scan() is synchronous; nothing is hard-coded. Added-ness is by identity: the key (filename minus the MAJOR. prefix) is absent from the merge base's listing of the same entry directory, and semantic entries must also be in ledgerAdded (the R4 set). So R100 and edited renames never count. The refusal names the file, its prefix, PROTOCOL_MAJOR and its source, and gives the git mv to PROTOCOL_MAJOR.KEY.ts. A backfill for a released lower major is declared with an adr-0087-backfill HTML-comment line in a changeset (exact path plus a reason of 40 characters or more), and every backfill is printed as an exemption on each run. Predicate 4 is untouched. New self-test battery EM has 31 cases; the roster floor goes from 60 to 61.",
      "files_changed": [
        "scripts/check-adr-0087-registration.mjs (+356/-3)"
      ],
      "tests": "At 9982079f87. Red before: the EM-R1 fixture (added semantic/18.* with PROTOCOL_VERSION 19.0.0) through main f42bcc18c6's scan(): 'GREEN -- EM-R1 expected RED, got green (0 problem(s))'. Through the branch: 'RED (1 problem(s))'. Branch gate with the refusal loop ablated: '--self-test -- 15 failure(s)', all in EM-R1/G5/R3/R4/R5. Green after: '✓ check-adr-0087-registration --self-test: 991 assertions', exit 0. Real-history replay: scan() over d9bc148e0 (filed a 19 note under 18) is red naming the file; over 216524a286 (PR #38239's three R100 renames) it counts 0 added and finds 0 problems. CLI over f42bcc18c6..origin/main 5df10eccaa: '3 migration entries added, each at or above PROTOCOL_MAJOR 19.'",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 9982079f87 derived 34 commands. The 33 non-long ones ran in one runner under os-verify-lock (slot issue-38240), each exit captured before any pipe, all 0: 'VERDICT command-exit 0'. pnpm check:pm-dispatch-gates ran separately under nohup: 'VERDICT command-exit 0', '2459 cases pass'. dispatch-gates --ran: '34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED' (the tool notes the record lists no exit codes; they are in the runner's per-command tsv). overlap-check before each push: 'VERDICT clean exit 0'. CI check-runs on #38436: NOT MEASURED, reason: the report is delivered at the end of local verification, as the contract says, so CI convergence belongs to the PM.",
      "line_budget": "359 changed lines (+356/-3), 1 file, under the 3000 human-merge threshold.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "deviations": [
        "Did not merge origin/main before opening. main gained 8 commits since f42bcc18c6; none touches the gate, sync-template-versions.mjs or the protocol module, and overlap-check says it merges cleanly. Merging would have meant re-running the 34-family union on a new head.",
        "The PR footer uses the AGENTS.md session-URL footer form (rule plus one 'Generated by' line), not the harness reminder's two-line form. The AGENTS.md rule outranks the reminder.",
        "The history reading was re-measured from a blobless clone of main in the scratchpad (one read-only network clone), because the shared checkout is shallow from 2026-11-24.",
        "A new declaration form (adr-0087-backfill) was added because the gate had no existing escape for this. Its only text input is changeset bodies, its one marker is the breaking disposition (exactly one per changeset), and reading the PR body would need a governed workflow edit."
      ],
      "open_questions": [
        {
          "question": "The card names 'the R4 set', but that set is an id set read from id: lines and cannot see retired-keys/ or retired-defs/. The card's directory pointer and its ~1,150 reading both span all three directories, so the rule covers all three (key-based added-ness, semantic additionally gated by ledgerAdded). Keep that scope?",
          "options": [
            "A keep all three directories (0 below-major adds in retired-* across 515 historical adds)",
            "B narrow to semantic/ only, exactly the R4 id set"
          ],
          "recommendation": "A, because the entries README gives one naming rule for all three directories, the history shows no false positive, and a retired-key filed low starts its tombstone aging clock a major early"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: the seat (repo:objectstack#5) · noted, not filed: the reach note's optional second check at the protocol move (no entry absent from every released tag may stay below the new major), which is the shape that stranded the 34 #38256 carries; named in the PR's Acceptance notes",
        "carrier: the seat · noted, not filed: a rename to a LOWER major (19.X.ts to 18.X.ts) is not 'added' and is not judged, by the card's R100 rule; listed under 'does not cover' in the PR body"
      ],
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft forced, plus the assignees and labels it carries: os-project-manager, skip-changeset) → #38436; post-stamped report comment (POST /repos/objectstack-ai/objectstack/issues/38240/comments). git push is not a REST write.",
      "mcp_calls": "0"
    }
  8. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn
    os-dev-report

    {
      "issue": 38240,
      "status": "done",
      "round": 2,
      "branch": "claude/issue-38240-adr0087-below-major",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38436",
      "head": "323f21d860",
      "session": "session_01FEkQ5oPfjnm2yWHEwkiYrn",
      "premise_still_valid": true,
      "summary": "Round 2 on contract review 7249162118 and L1-a record 7249085688. S1: the refusal's example backfill line now prints the placeholders MINOR, PATCH and WHY, and a backfill reason must name a release of the entry's own major in digits (backfillReasonFaults), so the printed line, pasted unedited, stays red (EM-R6); with the placeholders filled in it passes (EM-G8). S2: the ledgerAdded conjunct now applies only when the merge base tracks no template (the pre-split case), so a new semantic/18.* file for an id the base template already carries is refused (EM-R7). N1: retired-keys/ and retired-defs/ refusals and annotations now state the tombstone aging cost that build-schemas.ts reads, not the --from replay. Optional items, done: EM-G7 (a pre-split base where a carried id is not counted and a new id is; the L1-a nit) and EM-R8 (at PROTOCOL_MAJOR 20 an added 19.* is red; L2 N4). Both CI reds at e5288b7ab0 are fixed: check:future-spec-major flagged the EM-U2 fixture spelling '@objectstack/spec 118.4.0', now reworded; the Changeset-family self-test failed because the battery floor read 53 against 50 registered cases, now 50. origin/main merged twice (no rebase).",
      "files_changed": [
        "scripts/check-adr-0087-registration.mjs"
      ],
      "tests": "At 323f21d860: '✓ check-adr-0087-registration --self-test: 1010 assertions', exit 0. Ablations under os-verify-lock, VERDICT command-exit 0. (s1) reader reverted to accept any reason of 40+ characters: 6 failures (EM-R6 x3, EM-U2 x3). (s2) ledgerAdded conjunct back on every base: 3 failures (EM-R7). (conj) conjunct removed entirely: 2 failures (EM-G7). Each red failing then passing. Prose gate: at e5288b7ab0, check-future-spec-major exit 1, '✗ check-future-spec-major: 1 problem(s) ... :11407 — dates a change to @objectstack/spec 118.4.0, above the published major 19'; at 323f21d860, exit 0, '✓ check-future-spec-major: no @objectstack/spec citation names a major above 19'. Self-test at e5288b7ab0 content: '✗ ... 2 failure(s)', 'battery EM ... registered 50 case(s), below its pinned floor of 53'; at 323f21d860: 1010 assertions, exit 0.",
      "gates": "dispatch-gates --commands at 323f21d860 (merged with origin/main): the same 34-command set as round 1. The 33 non-long commands plus pnpm check:future-spec-major (34 in all) ran in one runner under os-verify-lock, slot issue-38240: 'VERDICT command-exit 0', 34 of 34 exit 0. pnpm check:pm-dispatch-gates: 'VERDICT command-exit 0', '2459 cases pass'. dispatch-gates --ran: '34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED'. overlap-check before each push: clean. CI on 323f21d860: NOT MEASURED, reason: the report is delivered when local verification ends.",
      "line_budget": "The PR is still one file, about +480/-3 against main.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "deviations": [
        "Round 1's derivation listed check:future-spec-major only in the artifact-roster block, which I did not run, so CI found the red. This round runs it explicitly.",
        "Several lock attempts timed out (exit 99) behind other seats' runs. Each retry kept slot issue-38240. One attempt to run the check gates outside the lock was refused by the permission classifier and was not retried.",
        "The local branch survived the round-1 worktree removal, at 9982079f87, identical to the remote. dev-worktree.sh refuses an existing branch, so the worktree was re-added with git worktree add on that branch."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: the seat (repo:objectstack#5): the L2 ③ follow-up card (protocol-move check covering the 34 stranded entries, downward renames, PRs not re-run after a move, the build-schemas CURRENT_MAJOR remedy window) is the seat's to file, per the L1-a residual. Not filed by the dev.",
        "carrier: the seat: L2 N2 (--list does not show backfills) and N3 (README and ADR-0087 prose) are noted, not done; both are outside this file surface."
      ],
      "api_writes": "2 this round — relay issue_patch on #38436 (PATCH /repos/objectstack-ai/objectstack/issues/38436, Round 2 line added, signed trailer kept last, read back identical) and this post-stamped report comment (POST /repos/objectstack-ai/objectstack/issues/38240/comments). git push is not a REST write.",
      "mcp_calls": "0"
    }
  9. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn

    Delivered · 2026-11-29T04:09Z · area o5-fleet · PR #38436 merged 16f132fbe7 at 2026-11-29T04:04:17Z (Fixes #38240), landed by this area as Tier S (landing record 7250223605, not governed). The ADR-0087 registration gate now refuses a migration entry a PR adds below PROTOCOL_MAJOR, with all three entry directories judged by key (the seat's scope ruling A). A backfill to a released lower major is the one escape: an adr-0087-backfill changeset line naming the exact path, with a reason that names a release of that major. It is printed on every run, and the printed example is refused until edited.

    pm:dispatched is removed in this stroke.

  10. removed
    pm:dispatched
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:fleetdomain:devxpriority:p2tooling

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions