Skip to content

test(scripts): stop pinning a pending changeset filename in the two gate suites - #9582

Merged
os-try-charles merged 1 commit into
mainfrom
claude/issue-9472-changeset-tests-synthetic-fixture
Sep 16, 2026
Merged

os-try-charles merged 1 commit into
mainfrom
claude/issue-9472-changeset-tests-synthetic-fixture

Conversation

@os-try-charles

Copy link
Copy Markdown
Collaborator

Part of #9472 — the Q2-A half only.

⛔ Deliberately not a closing keyword, and that is a declared deviation from my dispatch (which asked for one). The director's ruling (comment 5682619925) states this card's closing condition as three terms: this lane's repair, objectui#9569, and the scheduled Changeset Release lane reading green on a run after both. Merging this pull request satisfies exactly one of the three, so a closing keyword would shut the card before the lane reading that the ruling makes the point of it. The half left open is the lane reading. objectui#9569 is verified landed — merged 2026-09-16T00:55:43Z as f7fcc2cdb, which is this branch's base — and at the time of writing no scheduled run has fired since.

The defect, in one sentence

scripts/markdown-test-inputs.mjs resolves markdown path literals out of every test's source and offers only the ones that exist in the tree; two suites named a pending changeset by filename, and pnpm changeset:version deletes exactly those files.

So on the post-version tree the scanner stopped offering them, the ledger entries that declared them turned into stale-not-read findings, and Validate the post-version tree went red.

suite the literal it named is it a real pending declaration?
check-changeset-overwrite.test.ts .changeset/olive-donkeys-smile.md yes
check-installed-spec-pin-claims.test.ts .changeset/8897-installed-spec-pin-claims.md yes

What changed

  • check-changeset-overwrite.test.ts hoists its peer release declaration into a PEER_CHANGESET constant. The fixture repository writes that file itself, as it always did; only the name is now the test's own. The fixture- prefix belongs to neither namespace a committed name can come from — pnpm changeset generates adjective-animal-verb, and this repository commits an issue-number-and-slug name — so it cannot become a pending declaration. The generated-name tail is kept so the fixture still wears the shape the objectui#6336 hazard wears.
  • check-installed-spec-pin-claims.test.ts hands isScanned a synthetic name. That exclusion is by path prefix (.changeset/), so the basename carried no meaning in the assertion to begin with.
  • scripts/markdown-test-inputs.mjs drops the two ledger notRead entries that described the old literals. This is a surface addition over my claim comment's declared file set, and it is not optional: leave those entries and the scanner reds on the tree as it stands, because the literals they describe are gone.

Both directions, measured

The version step's effect on these two files is that it consumes them, so the probe consumes them. Every leg proved its mutation landed on disk (both paths absent) and proved its restore by git hash-object equality against the HEAD blob, never by an exit code.

leg tree command result
control pristine base, files present vitest run scripts/__tests__/markdown-test-inputs.test.ts exit 0, 24 passed
defect base, both changesets consumed same exit 1 — AssertionError: expected [ …(2) ] to deeply equal [], two stale-not-read findings, matching the lane's annotation
fixed this branch, files present the three affected suites exit 0, 74 passed
fixed this branch, both changesets consumed the three affected suites exit 0, 74 passed
fixed this branch, both changesets consumed vitest run scripts/__tests__ — the validator's own command exit 0, 164 files passed / 2 skipped, 4779 tests

The defect leg is what makes the last row mean something: the same command on the same simulated tree fails before the change and passes after it.

⛔ Nothing was widened

declaredEntries() — the answer ci.yml's fast path consumes, and the --audit census — reads only each ledger verdict's reads array. This change touches only notRead arrays, so that census cannot have moved by construction, and the scanner's own population is ledger-independent. On this branch: auditTree findings [], missingDocuments() [], and both suites are still candidates the scanner sees (via .changeset/README.md and CHANGELOG.md respectively), so neither becomes a stale-test. The gate's coordinate is untouched, per the constraint carried from objectui#9140.

Gates

Every exit code landed to disk before it was read, never through a pipe.

command exit
node scripts/check-changeset-presence.mjs 0 — "no source or published contract of a released package changed in this range, so no changeset is owed"
pnpm check:changeset-claims 0
pnpm check:installed-pin-claims 0
pnpm check:control-bytes 0
pnpm check:new-line-citations 0 — 0 new citations
pnpm check:test-path-roots 0
pnpm check:comment-mask-corpus 0
pnpm check:unreferenced-sources 0
pnpm type-check:scripts 0
pnpm lint:root 0
pnpm exec vitest run scripts/__tests__ 0

lint:root is the lint lane that reaches scripts/**, and it ran over its whole population rather than a narrowed one: 364 files, the count read from eslint's own --format json output, 0 errors. The package lanes of turbo run lint are left to CI and this diff touches no file under packages/, apps/ or examples/.

⛔ No skip-changeset label, although my dispatch asked for one. In this repository that label is a phantom: scripts/__tests__/ci-cd-pipeline-doc.test.ts pins that no workflow or gate under .github/ or scripts/ may mention it, and the changeset gate's own verdict line above is the authority that says nothing is owed here.

Acceptance notes

Observations found alongside this work, not repaired here:

  • check-changeset-overwrite.test.ts still writes two other fixture changesets, .changeset/plum-pandas-wave.md and .changeset/6336-new-work.md. Neither is a pending declaration today, so neither is this defect — but both carry the same latent shape, and that is precisely what the follow-up gate card (C, filed from this round per the ruling) exists to close once and for all rather than one filename at a time. Carrier: card C.
  • .changeset/olive-donkeys-smile.md is itself pending under the generated adjective-animal-verb name that .changeset/README.md instructs authors to rename before committing. Noted, not filed — it is a queue-hygiene observation about one file, and nothing here depends on it. Carrier: whoever drains the release queue.

🤖 Generated with Claude Code

https://claude.ai/code/session_015h79niBMyoB1xcaQje3uiz


Generated by Claude Code

…ate suites

`scripts/markdown-test-inputs.mjs` resolves markdown path literals out of every
test's source and offers only the ones that EXIST in the tree. Two suites named
a PENDING changeset by filename, so each became a ledger `notRead` entry — and
`pnpm changeset:version` deletes exactly those files. On the post-version tree
the scanner stopped offering them, the entries turned into `stale-not-read`
findings, and `Validate the post-version tree` went red on every scheduled
release run.

Both suites now name a file of their own instead. `check-changeset-overwrite`
hoists its peer declaration into `PEER_CHANGESET`, which the fixture repository
writes itself; `check-installed-spec-pin-claims` hands `isScanned` a synthetic
name (that exclusion is by path prefix, so the basename carries no meaning).
The two ledger entries that described the old literals go with them.

Measured both directions on a tree with those two changesets consumed, which is
what the version step does to them: before, the suite exits 1 with two
`stale-not-read` findings, matching the release lane's annotation verbatim;
after, it exits 0. Green on the tree as it stands as well.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015h79niBMyoB1xcaQje3uiz
@github-actions github-actions Bot added the tests label Sep 16, 2026
@os-try-charles
os-try-charles marked this pull request as ready for review September 16, 2026 02:02
@os-try-charles
os-try-charles added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 29f4c05 Sep 16, 2026
35 checks passed
@os-try-charles
os-try-charles deleted the claude/issue-9472-changeset-tests-synthetic-fixture branch September 16, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants