From f4bc6dbc219ec531b07f48bec3f1152d08500e19 Mon Sep 17 00:00:00 2001 From: mrbobbytables Date: Thu, 8 Oct 2026 06:44:31 -0500 Subject: [PATCH] ci: ratchet the e2e source-region floor to 95 The last completion criterion of #1079: re-derive --check-source-regions from the corrected number after #1163 folded the crossing-region source-map drift the issue measured. A full local run of the pipeline (build:e2e:coverage, 340 passing specs, seal, report) at main measures source regions at 95.22% (438/460), up from the 80.98% that set the current floor of 91's predecessor. The three regions #1079 proved executed (MemberProfile.js 10 and 15, MemberCard.js 75) now fold, and MemberDirectory/index.js 31/34/40/43 are covered for real since #1060 merged. Following the established ratchet pattern (measured 91.63 -> floor 91 in #1105), the floor becomes floor(95.22) = 95. Updated in the same change, as tests/e2e-coverage-gate.test.mjs instructs: the workflow gate, the FLOORS guard and its fixtures, the workflow-scripts gating assertion, and the CONTRIBUTING.md recipe. Closes #1079 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables --- .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 2 +- tests/e2e-coverage-gate.test.mjs | 16 +++++++++------- tests/workflow-scripts.test.mjs | 10 ++++++---- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97ddba34..7b5251a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a68c517f..b24425db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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" diff --git a/tests/e2e-coverage-gate.test.mjs b/tests/e2e-coverage-gate.test.mjs index 7d7f47a2..db376793 100644 --- a/tests/e2e-coverage-gate.test.mjs +++ b/tests/e2e-coverage-gate.test.mjs @@ -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 @@ -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); } @@ -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/, ); }); diff --git a/tests/workflow-scripts.test.mjs b/tests/workflow-scripts.test.mjs index 9f5f531f..25acdbe6 100644 --- a/tests/workflow-scripts.test.mjs +++ b/tests/workflow-scripts.test.mjs @@ -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