Repository navigation
[quality] e2e accepted-region staleness does not distinguish a moved span from a vanished one #1811
Description
Finding
An accepted-regions entry whose source line shifts is reported with the same
words as one whose region is genuinely gone, and the lane's failure text tells
the reader to delete it.
A local end-to-end coverage run at 8abcb3f (362 chromium specs passed;
npm run build:e2e:coverage, npm run test:e2e:coverage,
npm run report:e2e:coverage) reproduces the six stale entries now failing the
End-to-end coverage / Render e2e coverage report gate. All six are line
shifts introduced by #1807 — identical start and end columns, identical height,
one line lower:
| entry span | region the run reports |
|---|---|
DirectoryFreshness.js 18:66-18:71 |
20:66-20:71 |
DirectoryFreshness.js 29:12-29:28 |
31:12-31:28 |
DirectoryFreshness.js 43:12-43:31 |
45:12-45:31 |
DirectoryFreshness.js 48:8-48:41 |
50:8-50:41 |
profile-links.mjs 68:9-68:23 |
69:9-69:23 |
profile-links.mjs 68:23-68:31 |
69:23-69:31 |
Every one of those regions is still present, still zero-count, and still
unreachable for exactly the reason its entry records. Only the line moved.
The reporter says not a region this run reports, and the lane fails with
... are stale; remove them. Nothing distinguishes a moved region from a
vanished one, so the message reads as an instruction to delete the rationale.
Measured against the same run:
- entries re-pointed →
src files | 100.00 | 100.00 | 2292/2292 lines | 660/660 regions, no uncovered-region list - entries deleted →
654/660 regionsand six entries back under Uncovered regions
The second outcome is the standing defect noise the ADR 0007 accepted-regions
amendment was written to remove (#1676, #1692, #1736). The gate still passes
either way against the 96% floor, so nothing catches the regression — the
registry just quietly loses an entry on every edit above an accepted region,
and this will recur on the next one.
ADR 0007 is not wrong here: a stale entry must stop matching and fail the lane.
What is missing is that the tool knows which case it is looking at and does not
say so.
Recommendation
Teach tests/tools/e2e-coverage-report.mjs to detect the shift and name it.
When a stale entry's file reports exactly one uncovered region with the same
start column, same end column and same height at a different line, report:
not a region this run reports; the same span is uncovered at 20:66-20:71 -- re-point this entry rather than deleting it
and carry the span as a shiftedSpan field on the JSON artifact. Change the
lane's failure heading from are stale; remove them to
no longer match this run; re-point the ones whose span moved and remove the rest.
The match must stay strict — identical columns, identical height, exactly one
candidate — because a guessed span in this registry silently excuses a region
nobody triaged. Where no single candidate matches, the message is unchanged.
Scope is one file plus its tests; this is a single deliverable and a single PR.
Not in scope
Re-pointing the six committed entries is #1809 / #1810's ground and is
deliberately excluded here, so the two changes do not collide over
tests/e2e/fixtures/accepted-regions.json. This issue touches
tests/tools/e2e-coverage-report.mjs and its tests only.
Priority
- Impact: medium — the gate stays green, but the triage registry erodes silently and the uncovered-region list refills
- Effort: low
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 8abcb3f
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
Activity
hivecommons-hive commentedon Oct 23, 2026
Folded finding. This was filed as a separate issue, but 1 open agent-filed issue (plus 3 closed as completed in the last 14 days) already cite
tests/tools/e2e-coverage-report.mjs, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] e2e-coverage-run.mjs's one unreachable region carries no residual note and no premise test
Finding
tests/tools/e2e-coverage-run.mjshas exactly one uncovered region — the re-throw inreadProvenance:That arm is unreachable, not untested. The
trywraps onlyJSON.parse(raw);rawis bound fromreadFile(..., 'utf8'), so it is always a string; andJSON.parseapplied to a string throws nothing butSyntaxError(probed on Node 26 with 500k-deep nested arrays and objects, a lone surrogate, and truncated input — every one aSyntaxError). The reachable half, theSyntaxErrorwarning, is already exercised bytests/e2e-coverage-runtime.test.mjs.Two things are missing around it:
tests/tools/e2e-coverage-report.mjscarries a residual note that names each unreachable arm by function and expression, explains why no probe could close it, and totals the regions.e2e-coverage-run.mjscarries nothing, so its 99.15% gets re-investigated from scratch every cycle.tryto wrap thereadFile, or a validator call, makes the re-throw live — and nothing fails.tests/e2e-coverage-error-arms.test.mjsis the repository's established answer to exactly this shape, and it has no counterpart here.This also leaves the harness gate argued from half its evidence.
tests/coverage-gate-thresholds.test.mjsderives the--check-harness-file-regionsfloor frome2e-coverage-report.mjs's note alone, asserting it is "the lowest harness file" — bute2e-coverage-run.mjssits at the same percentage with no note, so a probe that closed the report's residuals would let the floor be raised past an undocumented ceiling and break the gate.Measured on
main(8abcb3f), Node v26.12.0,npm run test:unit:coverage:src/is at 100% lines and 100% regions, so this is the remaining harness residual, not a source coverage gap. No end-to-end claim is made: this is a harness module and is not reachable from the browser lane.Recommendation
tests/tools/e2e-coverage-run.mjsin the same formtests/coverage-gate-thresholds.test.mjsalready parses —"Together they are N regions, which caps this file at P% regions"— naming the arm by function and expression rather than by line.tests/e2e-coverage-error-arms.test.mjs, that fails if the premise stops holding: thatreadProvenance'stryblock wraps nothing but theJSON.parseassignment, thatrawis bound from a'utf8'read, and thatJSON.parseof a string throws onlySyntaxError.tests/coverage-gate-thresholds.test.mjsso the--check-harness-file-regionsfloor is argued against every harness file that carries a residual note, taking the lowest ceiling, instead of assuming one file is the lowest.Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5n31| SHA:8abcb3f— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
mrbobbytables commentedon Oct 23, 2026
Closing as not planned under ADR 0008 rule 2: the finding's only effect is a repository metric (accepted-region staleness reporting in the e2e coverage harness), which is out of agent remit. The paired PR #1812 is closed on the same basis. Under rule 4 this decision binds later findings on the same rule or file; leave a comment here rather than re-filing.