This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
feat(changeset): re-read a pending changeset when a later change touches a file it names - #9112
Merged
Merged
Conversation
…hes a file it names A `.changeset/*.md` body publishes VERBATIM into the CHANGELOG at the next release. Between authoring and release nothing re-reads it: the four gates that read `.changeset/` all judge structure (presence, bump level, workspace classification, whether a change touched one it does not own), and none reads a claim in a body. Three instances were filed and worked one at a time before the mechanism was carded (objectui#9003). `check-changeset-claims.mjs` asks one mechanical question — does a pending body NAME, in backticks, a file this change touches — and hands the PARAGRAPH to the seat whose own diff might have falsified it. It judges name resolution, never meaning; only an unambiguous resolution counts, which needs no denylist of common names. Report-only with no enforcing switch. The coordinate is a file name because of a measurement, not taste: over the 25 most recent first-parent commits, matching a symbol anywhere in the diff would have asked for a median of 191 paragraphs per commit, a workspace package 25, an identifier declared in exactly one edited file 8, and an unambiguously named file 1 (mean 2.2, max 13, silent on 12 of 25). Runtime ~1.1s against the 1,384 changesets pending today. Covers claims that WENT false (objectui#7721, objectui#8617); ⛔ does not cover ones BORN false (objectui#8759), and says so in its own output. Nothing here weakens `check-changeset-overwrite.mjs` — the report names it, says the correction it discourages is that gate's own legitimate case 2, and points at the two prose-only corrections already on `main`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
`Changeset Claim Re-read` runs on every pull request — the workflow it lives in carries no path filter, deliberately — so the Dependabot gate has to say what it is. It is report-only with no enforcing switch, so it is classified `NOT_A_GATE` with the reason rather than enrolled as a required context: a check that cannot say no must not be able to stop a merge. That table exists so a new check is classified by a human instead of defaulting into silence, and `dependabot-merge-gate.test.ts` is what noticed the omission. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9003
A
.changeset/*.mdbody publishes verbatim into the CHANGELOG at the next release. Between authoring and release nothing re-reads it: the four gates that read.changeset/judge presence, bump level, workspace classification and whether a change touched one it does not own — all structure, none of them a claim in a body. Three instances were filed and worked one at a time before the mechanism was carded.This adds a fifth reader that asks one mechanical question and hands the answer to a human.
What it does
scripts/check-changeset-claims.mjs, report-only, wired as a second job inchangeset-presence.yml:If yes, it prints the changeset, the name, the file it resolves to, and the paragraph that names it — then says in its own output that it is not claiming the paragraph is false, and that answering that is the reader's job.
Name resolution, never meaning. A backticked span is resolved against the tree at the merge base and only an unambiguous resolution counts — exactly one tracked file.
package.jsonresolves to 47 files here and therefore names nothing definite;flow-node-config.spec-reconciliation.test.tsresolves to one. That is the whole filter, and it needs no hand-maintained denylist of common names.The unit quoted is the paragraph, not the sentence. Both false halves of the #8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.
Which shape, and the argument against 955
The card's two candidate shapes are not comparably priced. 1,384 changesets are pending in the tree; 957 declare a bump and will therefore publish a body verbatim; 427 are empty-frontmatter no-release declarations whose prose never reaches a CHANGELOG (re-measured on this branch's base,
689953ae9).main: median 1 changeset asked for per commit, mean 2.2, max 13, and 12 of 25 commits are told nothing at all. And it asks the one person who can answer cheaply — the seat whose own diff is the thing that might have falsified it.957 → 1. That is the whole argument, and it is why this is the filter and not the wall.
The coordinate is a file name because of a measurement, not taste. Four candidates, same 25 commits, same 1,384-changeset population, counting how many pre-existing changesets each commit would have been asked to re-read:
Only the last is readable. 191 paragraphs per commit is the release-time wall in a different costume. The runner-up would have caught one more historical instance, and that trade is named in the gate's own header and output rather than quietly dropped.
Which sub-shape it covers — and which it does not
.changeset/7344-handler-string-any-mirrors.md) and its pin test still say "nothing readsAppComponentSchema.actions[]" — measured false, and the sentence ships as CHANGELOG copy at the next release #7721, An unreleased changeset states a fact that is now false and will publish it verbatim to the CHANGELOG (.changeset/6794-notify-submitter-default.md) #8617). Covered, at the moment of falsification.binding: 'field'negative pins — there are three, and the number reaches the release notes #8759). Not covered, and not claimed. A changeset this change adds is excluded by construction (it names its own files by definition, so including them would fire on nearly every PR), and finding(changeset): the merged objectui#8315 changeset counts "two"binding: 'field'negative pins — there are three, and the number reaches the release notes #8759's defect was a cardinal in prose, which is the reading this gate refuses to attempt.Also explicitly not covered, printed in the gate's own output so nobody reads it as more: a claim about a symbol, a package, an installed dependency's version or a count; and a file named ambiguously.
Honest limit worth stating separately: on the real instance below it points at the right changeset, and the paragraph it quotes is the one containing the file name — which is not necessarily the paragraph that went false. That is the correct behaviour for a mechanism that does not judge prose, and the reason the output says "read the paragraph" rather than "this sentence is wrong".
How it reckons with the discouragement gate
The card's sharpest observation is that the one gate reading a foreign changeset exists to discourage correcting it. Nothing here weakens, narrows or carves an exemption into
check-changeset-overwrite.mjs. The correction path is made explicit and additive instead: this gate's output names that gate, says it will report the correction, and says that report is that gate's own case 2 — "correcting a declaration on purpose … legitimate, and the reason this gate reports instead of failing" — which is report-only today. It also points at the two prose-only corrections already onmain(thedocs(changeset)commit that corrected two present-tense claims a later PR falsified, and the one that dropped the stale cardinal from the #8315 changeset), so the repair reads as precedented rather than forbidden.The two gates are meant to fire together on a correction: one asks for the read, the other records the write.
Re-measured, since the card's framing understates it: two of the three instances' changesets have since been corrected in place, both prose-only, both leaving frontmatter untouched. The repair path is used, not theoretical.
It can fail, and it is not vacuous
Red on a real instance. PR #8615 is the later merge that falsified the #8617 changeset. Run against exactly that range, the gate names it:
Green when the condition is absent. The same gate over the commit immediately before this branch's base reports
✅ No pending changeset names a file this change touches.So does the PR you are reading.Firing control, so a silent run is not an unread run.
--auditover the whole tree: 1,384 pending declarations, 957 publishing a body, 439 of those naming at least one file in backticks, and 881 file names that resolve to exactly one tracked file (244 resolve to none or to many). The gate is silent on this PR because this PR touches none of those 881, not because it read nothing. The unit suite pairs every report with the identical fixture with the named file left alone.Ablation, from the committed implementation, restored by hash.
b1a14f28eEach mutation was proved on disk before it was read (anchor counts plus a
git hash-objectdiffering from theHEADblob — one attempt was caught as a no-op by exactly that check and redone), each leg restored withgit checkout HEAD -- <path>under anEXIT INT TERMtrap, and restoration proved by the blob hash matchingHEADandgit diff HEADbeing empty, not by a exit code.Cost
Measured on the tree as it stands (1,384 pending changesets): ~1.1 s median, 1.24 s max, including node startup. One tree listing, one
git diff, and one batchedgit cat-file --batchfor the whole pending queue rather than a subprocess per file. No install, no build — which is why it lives beside the declaration gate rather than inci.yml.Why this workflow
changeset-presence.ymlcarries no path filter.changeset-guard.ymlcan afford one because a change that modifies a changeset touches.changeset/**by definition; this gate's subject is the opposite — an ordinary source change that falsifies somebody else's pending claim, under no obligation to touch.changeset/**at all. That absence is pinned in the test suite, because adding a filter there would blind this gate with no red anywhere.It is a second job, not a step, so a finding can never turn the declaration gate's context red. It is classified
NOT_A_GATEin the Dependabot merge gate with its reason — a check that cannot say no must not be able to stop a merge.dependabot-merge-gate.test.tsis what caught the omission.Verification
All run on
92ecb52c3.scripts/__tests__/check-changeset-claims.test.tsvitest run scripts/(whole gate suite)check-changeset-presence.mjs✅ No source or published contract of a released package changed in this range, so no changeset is owed.(5 files changed, 0 published source, 1 changeset added)check-changeset-no-major.mjs✅ No changeset declares a major bump.check-changeset-overwrite.mjs✅ No pre-existing changeset was modified or deleted.check-control-bytes.mjs✅ OK (scanned 7307 tracked text file(s))check-entry-guard.mjs✓ 89 scripts/ file(s) — no entry guard outside the baselinecheck-new-cross-file-line-citations.mjsVERDICT: 0 new citation(s) -> exit 0check-governed-queue-guard.mjs --test <the five paths>✅ NOT GOVERNED — none matchedeslint --no-inline-configon the changed scriptscheck-changeset-claims.mjson this PR✅ No pending changeset names a file this change touches.The changeset is an empty-frontmatter no-release declaration: the presence gate reports none is owed (nothing published changed), and the repo's rule is to declare that explicitly rather than to stay silent.
Not done here, deliberately
check-changeset-overwrite.mjsis untouched — not a byte, not a flag, not an exemption.node:builtins and the existing base-ref/frontmatter readers from the presence gate rather than growing a third copy of them.🤖 Generated with Claude Code
https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Generated by Claude Code