Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:
--input "$RUN_DIR" \
--build build \
--check-source 100 \
--check-source-regions 91 \
--check-source-regions 95 \
--require-source-files \
--json coverage/e2e/report.json \
--text coverage/e2e/report.txt
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ node tests/tools/e2e-coverage-run.mjs seal \
--dir "$RUN_DIR" --status passed
npm run report:e2e:coverage -- \
--input "$RUN_DIR" --build build \
--check-source 100 --check-source-regions 91 \
--check-source 100 --check-source-regions 95 \
--require-source-files \
--json "coverage/e2e/$RUN_ID-report.json" \
--text "coverage/e2e/$RUN_ID-report.txt"
Expand Down
16 changes: 9 additions & 7 deletions tests/e2e-coverage-gate.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ const REPORT_SCRIPT = 'report:e2e:coverage';
const COVERAGE_JOB = 'e2e-coverage';

// Measured on the suite this commit ships: the e2e-coverage job renders with
// `--check-source 100 --check-source-regions 91` and the run clears both; the
// `--check-source 100 --check-source-regions 95` and the run clears both; the
// full suite measured 100.00% source lines and 81.43% source regions when the
// region gate landed (#1026, #1031), and 91.63% source regions when the floor
// was ratcheted to 91 (#1105).
// region gate landed (#1026, #1031), 91.63% source regions when the floor was
// ratcheted to 91 (#1105), and 95.22% (438/460) when it was ratcheted to 95
// after #1163 folded the crossing-region source-map drift and #1060 covered
// the member-directory toolbar arms (#1079).
const FLOORS = {
'--check-source': 100,
'--check-source-regions': 91,
'--check-source-regions': 95,
};

// Present-or-absent guarantees, which carry no percentage. --require-source-files
Expand Down Expand Up @@ -188,10 +190,10 @@ test('a job that never invokes the reporter fails the guard', () => {
// fixture text it edits is its own line, so it gets its own staleness guard
// and its own proof the floor can go red.
function weakenedRegions(replacement) {
const original = ' --check-source-regions 91 \\\n';
const original = ' --check-source-regions 95 \\\n';
assert.ok(
workflowText.includes(original),
'fixture is stale: ci.yml no longer renders with --check-source-regions 91',
'fixture is stale: ci.yml no longer renders with --check-source-regions 95',
);
return workflowText.replace(original, replacement);
}
Expand All @@ -204,7 +206,7 @@ test('a lowered --check-source-regions fails the guard', () => {
weakenedRegions(' --check-source-regions 50 \\\n'),
),
),
/--check-source-regions is 50, below the 91/,
/--check-source-regions is 50, below the 95/,
);
});

Expand Down
10 changes: 6 additions & 4 deletions tests/workflow-scripts.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,15 @@ test('browser coverage is isolated in a visible gating job with a source floor',
// uncovered ternary arm or short-circuit that shares a line with covered
// code is invisible to --check-source. The region floor is the granularity
// the line gate cannot give. The gate landed at 80, just under the 81.43%
// a full run of the suite measured at the time, and was ratcheted to 91
// a full run of the suite measured at the time, was ratcheted to 91
// under the 91.63% measured after the 2026-10-07 coverage merges (#1105),
// the same ratchet pattern as the unit lane's region floors.
// and to 95 under the 95.22% measured after #1163 folded the
// crossing-region source-map drift (#1079) -- the same ratchet pattern as
// the unit lane's region floors.
assert.match(
coverageCommands,
/--check-source-regions\s+91\b/,
'the e2e coverage report must gate on --check-source-regions 91',
/--check-source-regions\s+95\b/,
'the e2e coverage report must gate on --check-source-regions 95',
);
// #992: the ratio is computed over observed files only, so a src module the
// bundle drops vanishes from numerator and denominator alike. The file-set
Expand Down
Loading