Skip to content

chore: enforce coverage thresholds in c8 regression gate - #403

Merged
nate-double-u merged 1 commit into
mainfrom
quality/coverage-gate
Nov 13, 2026
Merged

nate-double-u merged 1 commit into
mainfrom
quality/coverage-gate

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

package.json's test:coverage script (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-coverage thresholds 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). Only scripts/add-frontmatter.mjs remains 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 --100 shortcut.

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.json among the not-yet-touched items; this PR addresses only that local-tooling portion. The remainder of #390 (adding .github/workflows/unit-test.yml so 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

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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cncf-techdocs ready!

Name Link
🔨 Latest commit 309aab5
🔍 Latest deploy log https://app.netlify.com/projects/cncf-techdocs/deploys/6af652b72898f14bddf684b5
😎 Deploy Preview https://deploy-preview-403--cncf-techdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
309aab5

ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blocked

Hive flagged this PR (author @hivecommons-hive[bot], head 309aab59f78d) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • package.json

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Reviewed by reviewer — no findings.

Reviewer notes

Verified this end-to-end and it looks correct to me.

No findings. A maintainer approval is all this needs.

@nate-double-u
nate-double-u enabled auto-merge (squash) November 13, 2026 01:53
@nate-double-u
nate-double-u merged commit cbfb02e into main Nov 13, 2026
9 checks passed
@nate-double-u
nate-double-u deleted the quality/coverage-gate branch November 13, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant