feat(site): site/ joins the coverage gate (#514) - #544
Merged
Conversation
DECISION-0032. `site/` was the one tested tree with no coverage command, so `tdd` Phase 5 and `refactor` Phase 2/6 reached it, found nothing to run, and took the no-tooling exemption on a tree with 438 real tests. That is the #507 failure mode by a different door - a gate that reads as satisfied without executing - and #513 could only make it visible, not close it. vitest 3 -> 4, matching the three plugin trees, with @vitest/coverage-v8 pinned to the same EXACT version. The two are peer-pinned, so a caret on one and not the other is precisely how they drift apart. The migration needed no source changes: 438 tests pass unmodified. Coverage `include` is scoped to `scripts/` - the generator, link-audit and rehype helpers the suites actually exercise. Deliberately NOT `src/`: those are Astro components rendered at build time and covered by the build plus the link audit, so counting them would report a large permanently-dark surface no test in this tree was ever meant to reach, and a number nobody can act on is worse than no number. Measured baseline, stage 2 (>= 70% on both): Lines 91.29% (619/678) Branches 84.85% (353/416) Clears on both, so there is no shortfall to track and no #511-shaped campaign to open. Recorded in tech-stack.md's baseline table. COVERAGE_EXEMPT is now EMPTY (AC-4), and its comment says an entry must cite the DECISION that put it there rather than an issue number - an issue number reads as "someone will get to it" and outlives everyone who would. The companion stale-entry test is unchanged and still guards it. What does NOT transfer: `site/` is the only tree with production dependencies (astro, starlight, markdown-remark) and is deliberately off the dev-inclusive CVE gate. Adding a coverage provider does not change that posture - the provider is a dev dependency and the audit scope is untouched. Verified: the production audit still reports 0 vulnerabilities against the regenerated lockfile. Per DECISION-0031 this tree carries no platform fork, so it stays single-host and needs no union. Verified per the standing rule for site changes: npm test (438), build (131 pages), typecheck, and link-audit (19026 links) all pass. Claude-Session: https://claude.ai/code/session_01WJgVfZw7J81PB7mwpHyUxx
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.
Closes #514. Implements DECISION-0032.
The gap
site/was the one tested tree with no coverage command, sotddPhase 5 andrefactorPhase 2/6 reached it, found nothing to run, and took the no-tooling exemption — on a tree with 438 real tests.That is the #507 failure mode by a different door: a gate that reads as satisfied without executing. #513 could only make it visible (via
COVERAGE_EXEMPT), not close it.The migration
vitest 3 → 4, matching the three plugin trees, with
@vitest/coverage-v8pinned to the same exact version. The two are peer-pinned, so a caret on one and not the other is precisely how they drift apart.It needed no source changes — all 438 tests pass unmodified.
Baseline (AC-3)
Clears the stage-2 floor on both, so there is no shortfall to track and no #511-shaped campaign to open. Recorded in
tech-stack.md's baseline table.Scope of the measurement
includeis scoped toscripts/— the generator, link-audit and rehype helpers the suites actually exercise.Deliberately not
src/: those are Astro components rendered at build time and covered by the build plus the link audit. Counting them would report a large permanently-dark surface no test in this tree was ever meant to reach, and a number nobody can act on is worse than no number.AC-4
COVERAGE_EXEMPTis now empty. Its comment says an entry must cite the decision that put it there rather than an issue number — an issue number reads as "someone will get to it" and outlives everyone who would. The companion stale-entry test is unchanged and still guards it.Removing the exemption is what forced the rest: the doc-contract test went red until
tech-stack.mdactually named the command, which is the guard working as designed.What does not transfer
site/is the only tree with production dependencies (astro, starlight, markdown-remark) and is deliberately off the dev-inclusive CVE gate, whose sweep lives indocs.yml.Adding a coverage provider does not change that posture — the provider is a dev dependency and the audit scope is untouched. Verified against the regenerated lockfile:
Per DECISION-0031 this tree carries no platform fork, so it stays single-host and needs no union.
Verification
Per the standing rule for
site/changes — not just the build:npm testnpm run buildnpm run typechecklink-audittest_ci_impact.py