Repository navigation
[quality] a committed e2e data overlay that patches nothing has no symptom: the overlay guards enumerate files by hand #1099
Description
Finding
Nothing in the repository reads tests/e2e/fixtures/data/ or
tests/e2e/fixtures/data-variants/ to find out what is committed there. Both
guards over the committed overlays carry hand-written lists:
| guard | tests/e2e-data-fixtures.test.mjs |
lists |
|---|---|---|
| the variant build clears the fields the ordinary build keeps | lines 180-196 | awards.json, metrics.json |
| every committed overlay still applies to its data file | lines 218-248 | community-groups.json, community-people.json, members.json |
grep -n readdir tests/e2e-data-fixtures.test.mjs returns nothing, and no
other module enumerates either directory — tests/tools/e2e-data-fixtures.cjs
only maps one data/<name>.json to one <dir>/<name>.json on demand.
What the hand-written list cannot see
applyOverlay is strict about paths: an overlay naming a field a regenerated
data file no longer has throws, and npm run build:e2e:coverage fails loudly.
That is the failure mode the existing guards were written for, and it is
already covered.
The failure mode with no symptom at all is the opposite one — an overlay
that applies cleanly and changes nothing:
- a
setwriting the value the data already carries; - an
appendof a record a collector has since started producing itself.
The build succeeds. The coverage build compiles a document identical to the
real data. The branch the overlay exists to reach simply stops being reached,
and from CI that is indistinguishable from a branch that was never covered.
Reproduced at 8afaa67: replacing tests/e2e/fixtures/data-variants/awards.json
with a no-op that sets verifiedAt to the value data/awards.json already
carries leaves npm run test:unit green (1941 passed, 0 failed).
A list is also exactly what cannot notice the file nobody added it to. The two
lists happen to be complete today; nothing holds them that way as overlays are
added.
Evidence and provenance
npm run test:unit(TZ=UTC node --test, node v26.10.0) run locally on
2026-10-05 at8afaa67: 1941 passed, 0 failed, both with and without the
no-op overlay above.npm run test:unit:coverage(TZ=UTC node tests/tools/coverage-report.mjs)
at the same revision:tests/tools/e2e-data-fixtures.cjsis at 100% lines
and 100% regions. This is not a coverage-gap finding — the machinery is
fully covered; what is missing is a guard over the data committed beside it.
Recommendation
Derive the cases from the directory contents instead of naming the files, and
assert the weaker property the directory alone can establish: each overlay
names a real data file, still applies to it, and still changes it.
- A test reads both fixture directories and holds every committed overlay
to those properties, so a newly committed overlay is checked without
anyone remembering to register it - Replacing a committed overlay with a no-op fails
npm run test:unit
Coordination
The guard lands in a new file, tests/e2e-data-fixture-integrity.test.mjs,
and edits nothing. It deliberately does not touch
tests/e2e-data-fixtures.test.mjs, which #1034 (lines 178-215) and #1078
(lines 78-91) are both editing, and it does not duplicate those guards: they
pin applyOverlay's behaviour against overlay documents built inline, which
the directory sweep does not and should not do.
Folding the two hand-written lists into the directory sweep — so the
per-branch assertions (awards.json clears verifiedAt, community-groups.json
still has an archived group) are also held against the directory — does require
editing that occupied file, and is deliberately left out of scope here. It
should be picked up once #1034 and #1078 land.
Distinct from #1097, which is RadarReports' uncovered arms and touches no
file in common.
Priority
- Impact: medium (a silent hole in the mechanism three components' e2e branch
coverage depends on) - Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 8afaa67
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
Activity
test: hold every committed e2e data overlay to the directory, not a l…