docs(agents): state the hidden-tests rule as the invariant check:type-check-coverage enforces - #15340
Merged
os-zhuang merged 1 commit intoSep 4, 2026
Conversation
…nforces `AGENTS.md`'s hidden-tests bullet was exclude-shaped, but `check:type-check-coverage` enforces the invariant per file and spelling-agnostically: a test named by an `exclude` OR never reached by any `include` is hidden from the typecheck. The prose declared a narrower rule than the tree enforces, so an author who obeyed it to the letter could still hide a whole test tree by never including it. Restate the bullet as the invariant, name both spellings that break it, and name `check:type-check-coverage` as the enforcing instrument. Rewritten inside its existing 6 lines at the existing wrap width (widest line 87B before and after), so the ratcheted file line count is unchanged at 1161. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
os-zhuang
approved these changes
Sep 4, 2026
os-zhuang
marked this pull request as ready for review
September 4, 2026 12:39
os-zhuang
enabled auto-merge
September 4, 2026 12:39
os-zhuang
deleted the
claude/issue-14942-agents-hidden-tests-rule-wording
branch
September 4, 2026 13:18
This was referenced Sep 4, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #14942
AGENTS.md's hidden-tests bullet was exclude-shaped, but the gate that enforces it isnot.
check:type-check-coveragedecides the question per file and spelling-agnostically— a test file named by an
excludeor never reached by anyincludeis hidden from thetypecheck just the same. So the prose declared a narrower rule than the tree enforces: an
author who obeyed
AGENTS.mdto the letter could still hide a whole test tree by neverincluding it, and would then be stopped by a rule they were never told.
This is the declared-vs-enforced shape pointed the documentation way. The enforcement is
right and already spelling-agnostic; only the sentence was short. No new gate is added.
The change
One bullet in
AGENTS.md(the first of the three under "Three principles the ratchet'sinvariants encode"). Before:
After:
The lead is now the invariant rather than one spelling of its violation, both breaking
spellings are named, and the enforcing instrument is named. The
tsc --noEmitreason clauseand the "a green gate over source nothing read" phrase are kept.
The line budget, measured
AGENTS.mdsits at 1161 lines against a 1162 ceiling (check:pm-skill-ratchet), and asibling flight may need that last line. The rewrite is in place: the bullet occupies the
same 6 lines (75-80) at the same wrap width — widest line 87 bytes before, 87 after,
against the gate's 120-byte cap. No re-wrap bought room, nothing outside the bullet moved.
Two clauses were compressed to pay for the two added ones, both recoverable from the gate the
bullet now names — its failure text carries them verbatim: the condition on the sibling route
("when the build config must keep the exclusion") and the
packages/specworked-examplepointer. The operationally load-bearing half, named in the
typecheckscript, is kept.Verification
Gate set re-derived from the real change set at HEAD (
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 14 commands) and reconciled against thedispatched list — identical, nothing added. Every exit code captured before any pipe. All 14
green:
Landing regime, asserted rather than assumed:
The gate the prose now names, run to confirm it is real and green, and that it counts per file:
Control-byte self-scan beyond
check:nul-bytes:grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]' AGENTS.md-> no match (exit 1).Whole-repo
pnpm lint: narrowed, and the narrowing is measuredDeclared narrowing rather than a whole-repo scan, with all three pieces of evidence:
files:entry ineslint.config.mjsnames only{ts,tsx,mts,cts,js,jsx,mjs,cjs}. No markdown glob, nomarkdown processor.
--format json: eslint's own verdict on the single changed path isone result entry carrying
"message": "File ignored because no matching configuration was supplied.",errorCount: 0— 0 files of this diff are in the lint population.eslint.config.mjs:328states it outright — no
parserOptions.project, no typed rules; everyparserOptionsinthe file carries
ecmaVersion/sourceTypeonly), so a markdown edit in no tsc program canmove no verdict on any file it does not touch.
CI runs the whole farm regardless.
Landing
Governed surface, so this stays a draft: no seat flips it ready, enqueues it, arms
auto-merge, or requests review. Labelled
skip-changeset—AGENTS.mdpublishes nothing fromany package.
🤖 Generated with Claude Code
Generated by Claude Code
Generated by Claude Code