Skip to content

ci(e2e-coverage): gate region coverage per source file and ratchet the aggregate to 96 - #1315

Merged
mrbobbytables merged 1 commit into
mainfrom
ci/e2e-per-file-region-floor
Oct 11, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
ci/e2e-per-file-region-floor

Conversation

@mrbobbytables

Copy link
Copy Markdown
Member

Finding (#1232)

The e2e-coverage job gated browser coverage on two aggregates over all of src/**, so roughly one region in twenty could be uncovered anywhere and nothing required that slack to be spread out: a single component could fall to nothing while the job stayed green. The unit lane already closed the same hole with --check-source-file-regions; #1233 taught the e2e reporter the flag, but the workflow never passed it (Half 2 of the issue, which needed workflow-write permission).

What changes

site before after
.github/workflows/ci.yml render step --check-source-regions 95 --check-source-regions 96, plus --check-source-file-regions 66
tests/e2e-coverage-gate.test.mjs FLOORS 100 / 95 100 / 96 / 66, with lowered and deleted fixtures for the new flag and the measurement note refreshed
tests/workflow-scripts.test.mjs matches 95 matches 96 and the per-file literal
CONTRIBUTING.md snippet 95 96 + per-file flag (the prose says these are the flags CI enforces)

Where the numbers come from

A full local coverage run at main (via the non-root sysroot in #1311): 344 passed, sealed passed, capturedScripts: 202, uncapturedScripts: [].

src files | 100.00 | 97.26 | 2099/2099 lines | 639/657 regions

Lowest files: PeopleFreshness/index.js 66.67% (2/3, zero at :22), DirectoryFreshness.js 69.23% (9/13), GroupLinkStatus/index.js 83.33%, RadarReports/index.js 85.71%. PeopleFreshness's one zero is in the documented union residual (#1256), so 66 is bound by the data, not chosen as a target, matching the ceiling the gate test already named. The aggregate stops at 96 rather than the sanctioned 97 because 97 would leave one region between floor and ceiling (0.97 × 657 = 637.3 vs 639 covered); 96 leaves eight.

Verification

  • Rendering the local run with the exact new flag set: E2E coverage: ok, exit 0.
  • Rendering with --check-source-file-regions 70 fails naming both low files (DirectoryFreshness.js 69.23%, PeopleFreshness/index.js 66.67%), so the floor is live and reports by file name.
  • node --test on e2e-coverage-gate, workflow-scripts, contributing-e2e-setup, ci-supply-chain: 46 pass. With the ci.yml hunk reverted, 7 fail.
  • check:format, check:spelling: clean. The PR's own e2e-coverage job is the final confirmation against CI's chromium.

Closes #1232

…e aggregate to 96

The e2e-coverage job gated browser coverage on two aggregates over all of
src/**, so one region in twenty could be uncovered anywhere and nothing
required that slack to be spread out: a single component could fall to
nothing while the job stayed green. The unit lane already closed the same
hole with --check-source-file-regions, and #1233 taught the e2e reporter the
flag, but the workflow never passed it.

Pass --check-source-file-regions 66 in the render step, and ratchet
--check-source-regions from 95 to 96. Both numbers come from a full local
coverage run at main (344 passed, 202 scripts captured, none uncaptured):
97.26% aggregate (639/657) and PeopleFreshness at 66.67% (2/3) as the lowest
file, whose one zero is in the documented union residual (#1256), so 66 is
bound by the data rather than chosen as a target. The aggregate stops at 96
because 97 would leave one region between floor and ceiling.

Coupled edits: tests/e2e-coverage-gate.test.mjs records the new floors and
measurement and gains lowered/deleted fixtures for the per-file flag;
tests/workflow-scripts.test.mjs matches both literals; the CONTRIBUTING.md
snippet carries the same flags CI enforces, as its prose promises.

Closes #1232

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit 443af96 Oct 11, 2026
7 checks passed
@mrbobbytables
mrbobbytables deleted the ci/e2e-per-file-region-floor branch October 12, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] the e2e coverage gate has no per-file region floor, so one src file can regress invisibly

1 participant