Repository navigation
chore: enforce coverage thresholds in c8 regression gate - #403
Conversation
package.json's test:coverage script (added in #397) reported coverage but never failed the build on regression: c8's defaults are 0% for branches/functions/statements and 90% for lines. #396 deliberately deferred adding thresholds until in-flight coverage PRs merged, to avoid landing the gate red. lib/ is now 100% across all four metrics (after #389/#392/#394/#401). Only scripts/add-frontmatter.mjs remains below 100% branch coverage, tracked by the still-open #402. Set thresholds at the currently achieved levels (99/99/97/100) so the gate passes today and catches any future regression; it can be tightened to --100 once #402 merges. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
✅ Deploy Preview for cncf-techdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
309aab5
ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Reviewed by Reviewer notesVerified this end-to-end and it looks correct to me.
No findings. A maintainer approval is all this needs. |
Test Improvement
package.json'stest:coveragescript (c8 --reporter=text --reporter=lcov npm run test:unit, added in #397) reports coverage but never fails the build on regression: c8's defaults are 0% for branches/functions/statements and 90% for lines. #396 (closed via #397) deliberately deferred adding--check-coveragethresholds until the in-flight coverage PRs merged, to avoid landing the gate red.lib/is now 100% statements/branches/functions/lines (after #389/#392/#394/#401 merged). Onlyscripts/add-frontmatter.mjsremains below 100% branch coverage, tracked by the still-open #402. This PR sets thresholds at the currently achieved levels —--lines 99 --statements 99 --branches 97 --functions 100— verified locally to pass today (exit 0) and to fail when tightened past actual coverage (exit 1, 'does not meet global threshold'). Once #402 merges, a follow-up can tighten this to c8's--100shortcut.Single-line change to an existing script; no production code, no
.github/workflows/**files touched.Related Issue
Part of #390 — #390's task-list sweep lists
package.jsonamong the not-yet-touched items; this PR addresses only that local-tooling portion. The remainder of #390 (adding.github/workflows/unit-test.ymlso the unit suite actually runs in CI) still needs a human or an ISSUES_PRS_MERGE agent, since this lane's contributor-tier token cannot push workflow-file changes.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88