test(docs): cover the English view-roster name column, not just the body - #1567
Merged
os-sales merged 1 commit intoSep 3, 2026
Merged
Conversation
The English coverage rule asks `body.includes(label)` — does the name appear anywhere in the roster section, prose and bullets included. That is a pure existence question, so it is blind to multiplicity by construction and blind to an omission whenever the section's prose still names the dropped view. Measured on the tree #1561 landed: `service/cases.mdx`'s **Escalated Cases** row renamed to **All Cases** leaves the name column naming *All Cases* twice and never naming *Escalated Cases*, row count unchanged, and the file ran `Tests 11 passed (11)`. Nine of the fifty-five English name cells echo their view name in the section body outside their own table row, so those nine rows had no rule protecting them. This adds the name-column coverage rule the translated faces got in #1557, reusing `nameColumns('')` and `expectNameColumnIsReadable` unchanged so it inherits the `revenue/approvals` exclusion and the vacuity floor structurally. The body-shaped rule is kept, and is now labelled for the job it does. Measured, it is not the wider net it was taken for: name-column coverage strictly implies body coverage, so every label the body rule reports missing is one the new rule reports missing too. It stays as a diagnostic — both firing means the view is named nowhere in the section, only the new rule firing means it is named in prose but has no row — and the header says that rather than claiming coverage it does not add. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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 #1562
The English view-roster coverage rule asks
body.includes(label)— does the name appear anywhere in the roster section, prose and bullets included. That is a pure existence question, so it is blind to multiplicity by construction and blind to an omission whenever the section's prose still names the dropped view. #1557 closed that shape on the two translated faces; the English rule was the original of it and kept the hole.This adds the symmetric name-column coverage rule, reusing
nameColumns('')andexpectNameColumnIsReadableunchanged, so it inherits therevenue/approvalsexclusion and the vacuity floor structurally. 11 tests to 12. File surface istest/docs-view-rosters.test.tsplus a changeset — nocontent/docs/**page and nosrc/metadata moved.The hole, reproduced before anything was written
On
mainat7db21456(PR #1561's merge),service/cases.mdx's Escalated Cases row renamed to All Cases in its table row only — the name column then names All Cases twice and never names Escalated Cases, row count unchanged:Green over the defect. Body coverage passed because the bullets below the table still say Escalated Cases; name exactness passed because All Cases is a lawful label; the count rule passed because no row moved. Blob
2e2ac02toaec1304,**Escalated Cases**3 to 2,**All Cases**1 to 2, restored to an emptygit diff HEADwith the blob back at2e2ac02.The 9-of-55 figure re-derived, not carried forward on trust: 9 of the 55 English name cells echo their view name in the section body outside their own table row — All Accounts, All Contacts, Open Deals, Closing This Quarter, All Tasks, All Quotes, Service Workflow, Escalated Cases, All Contracts. Re-measured independently on each face: 9/55 on English, 9/55 on zh-Hans, 9/55 on zh-Hant.
The card and the file both read the body rule as the wider net: the one that still catches a view named nowhere on the page at all, prose included. Measured, that is false, and the body rule is not deleted — it is kept and relabelled for the job it actually does.
Name-column coverage strictly implies body coverage.
boldNamereturns a substring of the name cell, the name cell is a substring of its table row, and the row is part of the section body — so a label the name column names is a labelbody.includesfinds, always. Contrapositive: every label the body rule reports missing is one the new rule reports missing too. There is no page and no label on which the body rule fires alone.Measured in both directions, not argued only:
service/cases.mdxEscalated Cases → All Cases (prose still names it)revenue/products.mdxProduct Catalog → All Products (name then absent from the section entirely)So the name-column rule is the detector, and the body rule is kept as a diagnostic — labelled as one in the header and at the rule itself rather than dressed up as coverage it does not add. When both fire, the view is named nowhere in the section and the page needs writing; when only the new rule fires, the view is named in prose but has no row, and the table needs a line. Folding them into one message loses that split.
The
:950question the seat askedNo third instance of the body-shaped blindness. That binding is consumed only by
entryCount→tableBodyRows, which keeps lines matching/^\|/less the header and delimiter — a structural row count, never a substring search. The singlebody.includes(label)in the file is the body coverage rule. Measured rather than read: a prose bullet naming a lawful view name injected intoservice/cases.zh-Hans.mdx's roster section leaves all rules green — blob3799917toc0397b4, injected anchor 0 to 1 while the removed anchor stayed 3 to 3, which is why an insertion is read by its hash and its injected count.Ablation
Every mutation confirmed on disk by blob hash and anchored counts on removed and injected text; every restore proved by state — blob back at its HEAD value and an empty
git diff HEAD, never by exit code.1 failed | 11 passed (12), only the new rule red:content/docs/service/cases.mdx never names "Escalated Cases" in its name column, which crm_case ships2 failed | 10 passed (12), both coverage rules red. This is the measurement behind the subsumption above.## Standard list viewsheading onrevenue/products.mdxfires the reused guard inside the new rule:English: roster sections this rule read no name column out of: content/docs/revenue/products.mdxVerification
pnpm verifygreen end to end on4d1f70db— validate, typecheck, lint,lint:i18n-gate(0i18n/missing-*), hygiene (✓ source hygiene clean),hygiene:tokens(✓ source token ratchet clean), build, and the full suite:No roster page changed, so the guard and its subject did not move in the same round.
🤖 Generated with Claude Code
https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t
Generated by Claude Code