ci: make hot-path coverage gates required PR checks (#921)

* ci: make hot-path coverage gates required PR checks

Remove continue-on-error from frontend and Rust coverage jobs now that
the hot-path lists have stabilized; update docs and script headers.

* docs: note hard coverage gates in changelog and credits (PR #921)

* chore: drop credits entry for CI-only PR #921

Contributor credits are for user-visible work, not infra toggles.
This commit is contained in:
cucadmuh
2026-05-30 01:04:35 +03:00
committed by GitHub
parent 5377f3b737
commit 7b06be5ba2
9 changed files with 22 additions and 41 deletions
+2 -7
View File
@@ -3,13 +3,8 @@
# Mirrors `.github/hot-path-files.txt` for the Rust crates. Each entry is a
# workspace-relative path; the gate script (`scripts/check-frontend-hot-path-
# coverage.sh`) reads `coverage/coverage-summary.json` produced by
# `vitest run --coverage` and warns when a listed file drops below the floor.
#
# Soft today (warnings only — the workflow carries `continue-on-error: true`).
# Flip to a hard PR-blocker by removing `continue-on-error` from the
# `frontend-tests` workflow at the start of M4 in the pre-refactor testing
# plan (2026-05-11), once Phase 13 characterization tests have proven the
# gate stable on a handful of real PRs.
# `vitest run --coverage` and fails the frontend-tests coverage job when a
# listed file drops below the floor.
#
# Curation rule (mirrors the backend list): a file belongs here when its
# hot-path code dominates the file and ≥70 % is a reasonable floor. Files
+1 -2
View File
@@ -20,8 +20,7 @@
#
# Each line is a path relative to the workspace root (so `src-tauri/...`).
# `#` for comments. CI runs cargo-llvm-cov + this gate; PRs that drop
# any listed file below the threshold get a warning annotation today
# and (after watching it run cleanly) eventually a hard fail.
# any listed file below the threshold fail the rust-tests coverage job.
# ── psysonic-syncfs ──────────────────────────────────────────────────
src-tauri/crates/psysonic-syncfs/src/cache/fs_utils.rs
+1 -6
View File
@@ -61,12 +61,7 @@ jobs:
coverage:
name: vitest --coverage (baseline + hot-path file gate)
# Two-layer gate: the script exits 1 when any listed file drops below the
# threshold (warning annotations show in the PR checks panel), but
# `continue-on-error: true` keeps it from BLOCKING merges. Drop the flag
# to flip the gate hard once we've watched a few PRs run cleanly.
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
@@ -78,7 +73,7 @@ jobs:
- run: npm ci
- name: vitest run --coverage
run: npx vitest run --coverage
- name: hot-path file coverage soft gate
- name: hot-path file coverage gate
run: bash scripts/check-frontend-hot-path-coverage.sh
- uses: actions/upload-artifact@v4
with:
+1 -7
View File
@@ -59,13 +59,7 @@ jobs:
coverage:
name: cargo llvm-cov (baseline + hot-path file gate)
# Layered: the gate script exits 1 when any hot-path file drops below
# threshold (see scripts/check-hot-path-coverage.sh) — the failure is
# visible in the PR's checks panel. `continue-on-error: true` keeps it
# from BLOCKING merges. Drop continue-on-error to flip the gate to a
# PR-blocker once we've watched a few PRs run cleanly.
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- uses: actions/checkout@v5
- name: install Linux build dependencies
@@ -89,7 +83,7 @@ jobs:
mkdir -p target/llvm-cov
cargo llvm-cov --workspace --lcov --output-path lcov.info
cargo llvm-cov --workspace --json --output-path target/llvm-cov/cov.json
- name: hot-path function coverage soft gate
- name: hot-path file coverage gate
run: bash scripts/check-hot-path-coverage.sh
- uses: actions/upload-artifact@v4
with: