test(gates): give both document-count pins the third copy's non-vacuous floor, and census content/docs/** (non-zero, so no expansion) - #7968
Merged
Conversation
…third copy carries
`check-links-workflow.test.ts` asserts `prose.length > 400` before asserting the
header carries no document count. The two objectui#7448 twins did not. Without
the floor the count assertion is vacuous by construction: `documentCounts('')`
is `[]`, so a header the extraction has stopped reading — workflow renamed or
deleted, comment markers changed, path moved — passes the pin while nothing at
all was scanned.
Measured before writing, in characters rather than inferred from line counts:
`doc-fence-languages.yml` 4696 chars (11.7x the floor), `doc-component-types.yml`
4514 chars (11.3x). Latent, not live.
The extraction is lifted to module scope beside `POPULATION_COUNT` — unchanged
character for character — so the pin and its new emptiness control read one
definition, the same reason objectui#7914 lifted the pattern. Each file gains an
in-file positive control demonstrating that a comment-less workflow extracts to
'' , that the count half scores that identically to a clean header, and that the
floor is the half which rejects it.
Part of objectui#7901
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
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 #7901
Clause-②: noTwo things, in the order the card fixed: the floor lands, the coverage expansion does not. The census came back non-zero on both axes, so per this lane's standing rule the expansion is deferred to its own card and this PR carries the census plus a proposal.
1. The non-vacuous floor (landed)
check-links-workflow.test.ts— the third copy of objectui#7448's document-count pin — asserts the extracted prose is longer than 400 characters before asserting it carries no document count. The two twins did not.Without the floor the count assertion is vacuous by construction:
documentCounts('')is[], so a header the extraction has stopped reading — workflow renamed or deleted, comment markers changed, path moved — passes the pin while nothing at all was scanned. It is the same claim the scan-collapse assertions in both files already make about the document walk, applied to the one surface that had none.Measured in characters before writing, not inferred from line counts:
doc-fence-languages.ymldoc-component-types.ymlcheck-links.yml(third copy, for reference)Both twins clear the floor by an order of magnitude, so this is latent, not live. Nothing in the tree changes verdict today.
The extraction is lifted to module scope beside
POPULATION_COUNT, unchanged character for character, so the pin and its new control read one definition — the same reason objectui#7914 lifted the pattern a few hours earlier.Positive control A — in file
Each twin gains
the emptiness floor fires on a header this pin has stopped reading. It demonstrates on synthetic YAML that a comment-less workflow extracts to the empty string, that the count half scores that identically to a header carrying no counts, and that the floor is the half which rejects it. A near-empty (two-line) fixture is asserted too, so a header truncated gradually is not waved through by an emptiness-only check.Positive control B — the real headers mutated, restored by state
Each real workflow header was emptied on disk, the pin file re-run, and the header restored. The mutation was proven on disk by blob hash before the reading was taken, and the restore proven by state — never by an exit code.
doc-fence-languages.yml, header emptied (71 comment lines to 0, 5559 bytes to 838):doc-component-types.yml, header cut to two comment lines (68 to 2, 5304 bytes to 824):Exactly one test failed in each run, and it named itself and its surface. The near-empty leg is the one that matters:
62 to be greater than 400is the floor firing, not an emptiness check.Restore used
git checkout HEAD -- ABSOLUTE_PATHand was proven by state — blob back to the HEAD blob andgit diff HEADempty for that path — never by the exit code of the restore itself. A restore step's failure mode is exit 0 having done nothing.The three copies still hold one pattern
objectui#7943 proved this a few hours ago and the card requires it re-run after this change:
One distinct line, count 3, for the pattern and for the function that applies it. No divergence introduced.
2. The census of
content/docs/**— NON-ZERO, so no expansion hereThe half that could not be inherited from PR objectui#7915. That census covered 34
.github/workflows/*.ymlheaders; this card's whole subject is that no copy of the pin reads the published docs tree at all, so that half had to be measured fresh.Corpus, derived rather than hard-coded — the same derivation the third copy already uses for scope:
Hits — the family pattern fires: 6
content/docs/guide/ci-cd-pipeline.md:57618 guide filesmain@6422aa891". The gate prints20 guide file(s)today, so the figure has moved — but the sentence stays true, because it says which tree it measured.content/docs/guide/ci-cd-pipeline.md:781143 files889 type literal(s)today: the companion figure has drifted 558 to 889.content/docs/guide/ci-cd-pipeline.md:1083207 filescheck:shell-escape-residueprints206 file(s) ... examined in totaltoday. The strongest member: the word "today's" is the claim rotting out loud.content/docs/guide/ci-cd-pipeline.md:144073 filesscripts/__tests__/*.test.ts), but a test-file population, not a document population. See the proposal below.content/docs/guide/ci-cd-pipeline.md:165919 filesmain, 12 commits modified a pre-existing changeset (19 files)". Same class as #1.content/docs/fields/file.mdx:893 files// Renders: "3 files" or "document.pdf". The PM ruling of 2026-09-06 applies verbatim — this family governs prose assertions about a document population, not quoted program output.By segment: prose 5 · fenced code 1 · frontmatter 0.
Blind-spot reading: 18
Required by the card, and the reason a zero would have been believable. The definition mirrors the family's own pattern shape rather than a loose window — each category is a way a real count can be present and still be unreadable to this pattern:
B1 being zero is the load-bearing one: every file in the corpus was read and decoded, so the 6 above is a reading over the whole tree and not over the part that happened to parse.
B3 is dominated by fenced configuration (
max_files: 5,pageSize?: number; // Items per page (default: 10)) which the prose/fence split already separates. B4 contains one genuine word-spelled count —content/docs/guide/ci-cd-pipeline.md:304, "by which time five files had accumulated the defect".An earlier, deliberately over-inclusive pass (any numeral with a population noun within 60 characters) returned 112. The excess over 18 was ordered-list markers (
1. Reads ...), issue references, TS error codes, version numbers and the English quantifiers one / every / all / both. Both readings are recorded here so the tightening is visible rather than assumed.Ruling: report-only
Census 6, blind spot 18. Neither is zero, so the coverage expansion does not land here. Nothing was added to any exemption table — an exemption table records adjudicated exceptions, it is not a switch for turning a first run green.
3. Proposal for the expansion card
The expansion needs three criteria that the workflow-header version never needed, because docs prose is a different register. Each is measured above rather than anticipated:
files?catches test-file and source-file populations, not only document populations — member Add default props to all components to prevent collapse in designer #4 is the instance. Either narrow the noun set on the docs surface, or accept that the docs census governs all file populations and say so in the header.Members #2, #3 and #4 are live drifted counts on
content/docs/guide/ci-cd-pipeline.mdand must be cleared before the expansion can land, or the expansion reds on its first run. They are filed separately rather than ridden along here: the card's file surface is these two test files, andcontent/docs/is read-only for it.Filed out of this run, all three unassigned for PM triage:
content/docs/guide/ci-cd-pipeline.md, each measured against its own gate's verdict line. Also records the two neighbouring sentences that are stale-looking and correct, so nobody rewrites them.Blocked-by:objectui#7965, carrying the three criteria above and the blind-spot note.#markers the third copy strips, so a count wrapping across a comment line is invisible to both and visible to the third. Measured: markers kept scores[]on a wrapped184 / pages, markers stripped scores["184 pages"]. Latent — all three headers are clean under both extractions today.Verification
All from
f949c4381, the final commit on this branch, in the worktree/home/user/objectui-issue-7901. Every heavy run went through the shared verify lock; every exit code was captured after redirecting to a file, never through a pipe.pnpm exec vitest run scripts/__tests__RUN v4.1.10 /home/user/objectui-issue-7901·Test Files 107 passed (107)·Tests 3224 passed (3224)Test Files 2 passed (2)·Tests 82 passed (82)Test Files 2 passed (2)·Tests 84 passed (84)— the two new controlspnpm type-check:scriptstsc -p tsconfig.scripts.json, no outputpnpm lint:root32 problems (0 errors, 32 warnings), all pre-existing; neither edited file appearspnpm check:control-bytesOK (scanned 6414 tracked text file(s); skipped 85 binary)pnpm check:vi-mock-specifiersOK (4339 tracked source file(s), 2616 test-named ...)pnpm check:vi-mock-inheritOK (... 225 call site(s) judged ...)pnpm type-check:coverage45/46 via type-check·42/42 packages compile their testspnpm lint:coverage46/46 packages linted, 0 with outstanding errorspnpm check:unreferenced-sourcesEvery shipped source file in every covered package is reachable.The vitest banner reads
RUN v4.1.10 /home/user/objectui-issue-7901— the repository root, not a package directory (objectui#3378), and no argument was passed after a bare double dash (objectui#3288).Changeset.
node scripts/check-changeset-presence.mjs, verbatim:✅ No source or published contract of a released package changed in this range, so no changeset is owed.Two test files, nothing published. None added, not even an empty declaration.Session:
https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3🤖 Generated with Claude Code
https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
Generated by Claude Code
Generated by Claude Code