This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(scripts): refuse a verification claim on a doc fragment the gate never compiles - #7831
Merged
os-sam merged 1 commit intoSep 6, 2026
Merged
Conversation
…never compiles (#7505) A `declared` fragment is the one block `check-doc-snippet-types` does not compile, so a marker reason asserting the block agrees with a shipped artifact is an assertion the gate structurally cannot re-verify. It goes silently false the day the thing it names changes, and it is worse than no marker: it converts a reader's correct instinct — go check this against the source — into a step they skip. Measured: `content/docs/utilities/data-objectstack.mdx` declared a signature excerpt "checked against the shipped dist/index.d.ts ... with the same type". True when written; false from #7503, which widened the factory's return from `DataSource<T>` to `ObjectStackAdapter<T>`. Three independent readers hunting for exactly that falsehood missed it. The gate now refuses the COMBINATION, never the exemption: exempting a fragment from compilation stays legitimate, and a verification claim stays legitimate on a block the gate actually compiles. Only the two together are refused, and the author has two ways out — say why the block cannot compile without asserting it was checked, or move the block into the compiled tier where the claim becomes one this gate re-verifies on every commit. No exemption list: an exemption here would be a second unverifiable assertion about an unverifiable assertion. Census before the change, which is what decided the route: 2 of 158 declared fragments carried a claim, spelled `verified` and `hand-checked`, both on the page the card sampled. So the marker vocabulary IS enumerable — the card's own stated precondition for this route — and the verb list is closed. `type-check` is excluded because it names this gate's own action, a claim that does re-run on every commit. Both instances are repaired here, and so is a second falsehood found by reading today's shipped `dist/index.d.ts` as the card directs: the config excerpt was missing `systemCapabilities?: string[]`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
This was referenced Sep 6, 2026
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 #7505
What changed
check-doc-snippet-types.mjsnow refuses one combination: adeclaredfragment whose written reason claims the block was checked against something.
A
declaredfragment is the single block this gate never compiles. A reasonasserting the block agrees with a shipped artifact is therefore an assertion the
gate structurally cannot re-verify — it goes silently false the day the thing it
names changes, and a reader cannot tell the two apart because both arrive in the
same marker.
⭐ The exemption is not the defect and is untouched. Exempting a fragment
from compilation stays legitimate; a verification claim stays legitimate on a
block the gate actually compiles. Only the two together are refused, and the
author has two ways out, both named in the failure text: say why the block
cannot compile without asserting it was checked, or move the block into the
compiled tier where the claim becomes one this gate re-verifies on every commit.
⛔ No exemption list. An exemption here would be a second unverifiable assertion
about an unverifiable assertion.
The census, which is what chose the route
The card asked for this before any gate change, and it decided the shape:
content/docs/utilities/data-objectstack.mdx, the page the card sampledverified·hand-checked⇒ The card's stated precondition for this route — "needs the marker vocabulary
to be enumerable; if 'checked against' is free prose, this becomes a phrase hunt
with false positives" — tests positive. The vocabulary is a closed list, and
the check reads only the marker's reason field (a small structured field this
gate already validates for length), never the page's prose.
Two corpus reasons deliberately stay legal, and both are pinned as tests:
plugin-calendar.mdxnames the same authority to say the opposite — itsblock "cannot compile against the SHIPPED prop type". Anchoring the match on
"against the shipped" would have flagged it; anchoring on a verb does not.
component-registry.mdsays its literal is "type-checked on the completeexample at the end of the page, which does compile".
type-checknames thisgate's own action, so that is a claim backed by a check that re-runs every
commit — the shape the rule wants, not the shape it refuses.
meaning.
type-checked by handwould pass it. It closes the spelling that hasactually been written here and turns a silent gap into a red build on the commit
that reintroduces it.
Ablation — the proof, not "I added a check and CI is green"
The falsified marker's own historical wording, put back on the same
declaredfragment. Mutation proven on disk before the run; restoration proven by state.
The gate names itself in the finding (
[verification-claim-on-fragment]) andleaves through exit 1 — a verdict about the document — not exit 2, which
would say it never judged anything. A test pins that distinction.
The page repair that ships with it
content/docs/utilities/data-objectstack.mdx, read against today's shippedpackages/data-objectstack/dist/index.d.tsrather than against the card's text.Two things, not one:
named defect — the return type — was already repaired on
mainby fix(data-objectstack): createObjectStackAdapter declares the adapter it returns #7503, sothat premise arrived stale. But the config excerpt was still missing a member
the shipped declaration carries:
systemCapabilities?: string[](ADR-0066).Added, with the shipped doc comment's own wording. The marker's old claim that
"every config member declared there with the same type" had been checked was
false again, in a second way, at the moment it was read.
⇒ That is the card's thesis reproducing itself inside its own sampling point.
Tests
scripts/__tests__/check-doc-snippet-types.test.ts: 70 → 78 passing.The 8 new pins cover the refusal and its edges, because a suite that only
proved "the claim turns it red" would not notice the check growing into a phrase
hunt: the measured spelling turns red and names itself · it is a document verdict
not a precondition · the same words on a compiled block are untouched · a
reason naming the same authority to say the opposite stays legal ·
type-checkedstays legal while
hand-checkedstill trips · every verb in the closed listtrips it, so the list cannot rot in silence · this repository's own 158 declared
fragments carry no claim (guarded against going vacuous) · the header states the
rule so it cannot drift out of the source.
Gates run, all at
e16a473a8check:doc-snippets(this gate)check:doc-types·check:doc-fences·docs:check-links·check:doc-example-readerstype-check:scriptslint:root(the scope that coversscripts/), full runlint:coverage·type-check:coveragecheck-control-bytesnode scripts/check-changeset-presence.mjsverdict, verbatim:⇒ No changeset added, and ⛔ no
skip-changesetlabel applied — in this repothat label is read by nothing and exempts nothing; the gate's verdict line is the
authority.
Not run: the full
turbo run lint/turbo run type-checkpackage fan-out(no package source changed — the root scope is what covers
scripts/); anybrowser or runtime verification (nothing here runs in a browser); CI itself.
Scope
Exactly the three files the dispatch named.
UNGATED_DOCSis byte-identicalto
HEAD— verified, not assumed — so there is no collision with #7417, which isediting that ledger's
README.mdentry. The scan population is unchanged at 158declared fragments and 456 compiled blocks, confirming this did not quietly move
any fragment into the compiled tier.
Generated by Claude Code