Round 2's cold review found the previous commit had reproduced, one layer up,
the exact defect it was fixing: `expectedTrackedSources` — the function that
closes the dot-directory / case-divergence hole — had no clause proof. Measured:
replacing its body with `return []` left all 1249 tests green while the hole it
exists to catch went undetected, and deleting the `absentFromDisk` subtraction
(the whole point of the plugin's second field) was green too.
Three proofs added, each MEASURED red against the mutation it names:
- a direct fixture test pinning all four terms of `expectedTrackedSources`
(`return []` and dropping the subtraction now each redden it);
- an anti-vacuity floor INSIDE the shortfall test, so an empty expected set
cannot pass the comparison it feeds;
- a table pinning `isInScopeSourcePath`. That one closes a hole the review
measured separately: the walk and the index side applied the SAME scope
filters, so scope cancelled out of the equality between them — excluding
`src/components/` dropped 13 real files with the whole suite green. The two
copies of that predicate are now ONE named function, and the table is what
reddens a change to it, since no assertion comparing the two sides can.
Also corrected, all found by the same review:
- The comment justifying the `absentFromDisk` subtraction cited
`scripts/tests/tracked_files.py` as stating the rule it follows. That module
states the OPPOSITE and enforces it with `assert absolute.is_file()`. It is
now recorded as a deliberate DEVIATION with its reason (that population is a
handful of hooks where a missing file is remarkable; this one is ~260 SPA
sources a developer edits continuously), rather than as an instance of it.
- `absentFromDisk` is named for what it measures — no READABLE file — not for
its common cause. `existsSync` follows links, so a tracked BROKEN SYMLINK is a
committed, permanent state landing in that set, which "deleted in the working
tree" licensed subtracting without saying so.
- The Dockerfile comment claimed the `needs: [test, …]` edge alone guarantees no
image ships from an untested tree. `Test SPA` is also gated on `docs_only` and
the #420 revalidate skip, and `build` is not gated on `revalidate`; the
property survives via #420's byte-identical-tree argument, which the comment
now names instead of implying the wrong mechanism.
- `docs/testing.md`'s web row was falsified by this PR: `web/vite-plugins/**` is
a third collection root, and `npm test` now hard-requires a git checkout.
- Two prose slips: guard-inventory counted "the first of those" onto the wrong
file, and both `docs/spa-conventions.md` and the Dockerfile said "guards"
plural where exactly one derives a population.
Rebased onto 4b3f6f6c9 (#872), which rewrote `docs/guard-inventory.md`.
refs #819