Skip to content

fix(scripts): the polarity census pins stop asserting what the live .changeset/ holds, so the post-version tree validates (objectui#10010) - #10933

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-10010-post-version-census
Sep 28, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-10010-post-version-census

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #10010

Clause-②: no — root scripts/ and a workflow step only; no published contract, accept set or public surface is touched

What was red, and which control, measured

changeset-release.yml's scheduled lane fails «Validate the post-version tree» on three pins in scripts/__tests__/changeset-polarity-census.test.ts — «the default corpus is .changeset/ and the script is not inside it», «runs from a clean checkout: no build, no workspace state, plain node» and «the REPORT prints the two named lines, and the merged heading is gone» — each expected 2 to be +0. The census header says exit 2 = a control failed. WHICH control was never measured on the card. It is now, on a post-version tree rendered locally the way the render step does it (pnpm changeset:version in a detached scratch worktree at 733fd5a; never committed, never pushed; restored and removed afterwards):

control (read at 733fd5a) normal tree post-version tree
corpusLit — present-tense declaration verb 1369 — pass 0 — FAIL
corpusAbsent 0 0
memberLit — BaseSchema.type 1 1
memberAbsent 0 0
resolutionLit 3 of 3 3 of 3
resolutionAbsent 0 0
entries scanned 2263 0

⇒ ONLY corpusLit goes dark. changeset version consumes every pending entry and leaves .changeset/ holding its README and config.json, so the corpus is empty and the lit control reads 0. The census is RIGHT to exit 2 there: a corpus that holds nothing and a reader that read nothing are the same reading to it. The defect is in the three pins, which asserted exit 0 against the LIVE corpus — a fact about the tree's release phase, not about the instrument.

When it started — the boundary, measured

The census and its test were born in cec21a21ce (objectui#9727, committed 2026-09-18T01:46:40Z): after the last green scheduled fire (00:20:11Z) and before the first red one (06:12:48Z). The two pin-7 exit-0 assertions are in that birth commit; the REPORT pin arrived later with objectui#9767. History was read on a shallow checkout whose graft is at 2026-05-23, with both legs: git merge-base --is-ancestor fbe1520c13 cec21a21ce answers 0; the census file is absent at the birth commit's parent (exit 128) while package.json is present there (exit 0).
⚠️ NOT explained here: the earlier red stretch (2026-09-12..09-16) predates the census file; not measured.

The same defect was waiting on main

The rendered post-version tree is also what main holds right after the Version Packages PR merges, and ci.yml runs this suite there. So the old pins would have gone red on main after the next release too, and the entriesScanned > 300 floor would have stayed red until 300 new entries accumulated. (Inference from the rendered tree; there has been no release merge since the census landed.) Editing only the workflow step would have left that standing; fixing the pins repairs both.

What changed

  • scripts/__tests__/changeset-polarity-census.test.ts
    • pin 7 «the default corpus is .changeset/…» still runs on the live default corpus, and now asserts only what holds in every release phase: the corpus directory is .changeset/; entriesScanned equals that directory's pending entries EXACTLY (replaces the > 300 floor, and catches both a tree-wide scan and an empty reader); the exit status is the controls' verdict; every control that does not read the corpus's content passes; and the run is void only when the lit control reads 0.
    • pin 7 «runs from a clean checkout…» and pin 11 «the REPORT prints the two named lines…» assert exit 0 on the fixture corpus, over the live member index and the live resolution roots — they are about the instrument.
    • new pin 6 case: an EMPTY corpus exits 2, and the lit control is the one that goes dark while the other five pass. The control keeps its teeth, pinned without depending on the tree's release phase.
    • the failure messages carry the controls now. The old ones carried stderr, which the census leaves empty, so for ten days the lane's annotation said expected 2 to be +0 and nothing about which control.
    • the file header's «every pin reads fixtures» paragraph is corrected to say which run reads the live corpus and why.
  • scripts/changeset-polarity-census.mjs: header only — a new section «An EMPTY corpus exits 2, by construction». The control logic and the 0/1/2 exit contract are unchanged; ⛔ an empty corpus is NOT special-cased to exit 0.
  • .github/workflows/changeset-release.yml: untouched.

Evidence — red before, green after, on the same rendered tree

  • Post-version tree, without the change: pnpm test scripts/__tests__/changeset-polarity-census.test.ts gives Tests 3 failed | 68 passed (71) — the three pins above, each expected 2 to be +0, the lane's shape exactly.
  • The same rendered tree with the two files checked out from 16169cca22: Tests 72 passed (72). The census itself still exits 2 there, corpusLit reading 0.
  • Step 14 in full on that rendered tree (pnpm quick-reference:check && pnpm check:control-bytes && pnpm test scripts/__tests__): exit 0, Test Files 177 passed | 2 skipped (179), Tests 5323 passed | 2 skipped (5325).
  • Ablation — the relaxation the card forbids. The lit clause in runControls was mutated to pass on an empty corpus, through ablation-replace.mjs (anchor hits 1 to 0, blob b66d877f to 86b95436): the new empty-corpus pin goes red, 1 failed | 71 passed (72), message «an empty corpus must NOT exit 0: expected +0 to be 2». Restored: blob equals HEAD and git diff HEAD is empty. Direction observed: red, as predicted.
  • Scratch tree restore: the workflow's own restore, then git status --porcelain printed 0 lines; the worktree was then removed.

Gates (normal tree, at 16169cca22)

  • pnpm test scripts/__tests__/changeset-polarity-census.test.ts — 72 passed (72)
  • pnpm test scripts/__tests__ — exit 0, Test Files 177 passed | 2 skipped (179), Tests 5323 passed | 2 skipped (5325)
  • pnpm type-check:scripts — exit 0
  • pnpm quick-reference:check — exit 0; pnpm check:control-bytes — exit 0, OK line
  • pnpm check:new-line-citations — VERDICT new-cross-file-line-citations: 0 new citation(s), exit 0
  • node scripts/check-test-path-roots.mjs — exit 0
  • ESLint narrowed to the two changed files: --format json reports 2 files, 0 errors, 0 warnings. Population per ESLint's own --print-config: the test file resolves 118 rules, the .mjs 0 rules; neither sets parserOptions.project or projectService, and eslint.config.js sets neither anywhere ⇒ no type-aware linting ⇒ this diff cannot move a verdict on an untouched file. The repo-wide pnpm lint is CI's.
  • node scripts/check-changeset-presence.mjs — «no changeset is owed». ⇒ No changeset entry, per the census header's objectui#9795 rule: a change to this script gets no entry, not even an empty-frontmatter one. check:changeset-claims and check:pending-changeset-literals were therefore not run (no entry added).
  • node scripts/check-governed-queue-guard.mjs --test over both paths — NOT GOVERNED.

Acceptance notes

  • objectui#10019, the ordering fact recorded on the card, is no longer open (state reason: completed, 2026-09-20) — the door it guarded is already shut.
  • With the pins green, the scheduled lane's next fire should reach «Refresh the version PR» again. That is the lane's own act. This PR takes no release action and touches neither the Version Packages PR nor its branch.
  • eslint.config.js resolves zero rules for this .mjs (read via --print-config). Observation only, not filed; carrier: none.

Generated by Claude Code

….changeset/` holds, so the post-version tree validates (objectui#10010)

`changeset version` consumes every pending entry, so on the post-version
tree the scheduled release lane validates -- and on `main` right after a
release merges -- the census corpus is empty, the lit control reads 0 and
the census exits 2, correctly. Three pins asserted exit 0 against the live
corpus, so the lane's "Validate the post-version tree" step went red on them
from the first scheduled fire after the census landed.

- pin 7's boundary run keeps the live default corpus but asserts only what
  holds in every release phase: the corpus directory, an exact entry count,
  status = the controls' verdict, and that only the lit control may void it
- the clean-checkout and REPORT pins assert exit 0 on the fixture corpus
- a new pin 6 case: an EMPTY corpus exits 2 and the lit control is the one
  that goes dark (the control keeps its teeth)
- the census header documents the empty-corpus outcome; its 0/1/2 exit
  contract and its control logic are unchanged

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBx9rvB7dufCz4at53x35U
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Spec Main Shape Gate is red on this head, and it is not this PR's. domain:devx seat 2 (session_01EBx9rvB7dufCz4at53x35U), read 2026-09-28T08:25Z on head 16169cca22.

  • The failure: packages/types type-check — report-chart-query-spec-parity.test.ts:747, TS1360 Type 'true' does not satisfy the expected type 'false' (objectstack typed JoinedReportBlock in 681868ca, and the parity tripwire fired as designed). This PR touches scripts/changeset-polarity-census.mjs (comments only) and its test; it cannot move that pin.
  • Same signature on every objectui PR head since ~07:16Z, green on main at 06:50Z ⇒ one incident, anchored on objectui#10916. Its fix is PR objectui#10934 (draft; 3 files including a changeset and scripts/check-spec-symbol-derivation.mjs, under another seat's claim) — ⛔ not ported here: it is a different card's in-flight change on files outside this PR's claimed surface, and a duplicate hunk would collide with it at landing.
  • No re-run: deterministic against objectstack main, reproduced on five heads.
  • This PR's own review is ACCEPT (on objectui#10010). Once objectui#10934 is on main, this seat merges main into this branch, re-reads every check on the new head, and lands it through the queue.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 28, 2026 09:06
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit a93ba87 Sep 28, 2026
42 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-10010-post-version-census branch September 28, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment