Repository navigation
test: stop excluding docusaurus.config.ts from the coverage gate - #427
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
|
Important Ready for review: held for a maintainer 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 The hive's work on this PR is done. Hive will keep the |
✅ Deploy Preview for cncf-techdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. ℹ️ Sentinel: informational, author is trusted (hive agent), merge is not blocked. Head
No Reviewed by Reviewer notesThis looks correct to me — I verified the claims against the tree at head b4c428b rather than taking the body on faith:
No findings. One-line change plus its guard test; low risk, closes a real gate blind spot. |
|
|
@copilot resolve the merge conflicts in this pull request |
docusaurus.config.ts has been fully unit-tested since #404/#419 via lib/docusaurusConfigPreprocessor.test.mts and lib/docusaurusConfigBuildContext.test.mts, which import the real file directly. The test:coverage script's --exclude 'docusaurus.config.ts' flag predates those tests and is now a stale blind spot: c8 never instruments the file, so a regression or new untested branch added there would pass npm run test:coverage silently. Remove the exclude flag (verified locally: coverage stays at 100% stmts/branch/func/line for the file) and add a regression test guarding against the exclude quietly coming back. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
b4c428b to
f71df66
Compare
There was a problem hiding this comment.
Verified, not just read: cloned this head (f71df66) and ran npm ci && npm run test:coverage — the gate passes with docusaurus.config.ts instrumented at 100% stmts/branch/func/line, exactly as the PR body claims. The exclude was indeed stale: lib/docusaurusConfigPreprocessor.test.mts and lib/docusaurusConfigBuildContext.test.mts import the real docusaurus.config.ts via testHelpers/resolveExtensionlessTs.mjs, so c8 can gate it. The new regression test in scripts/coverage-thresholds.test.mjs follows the existing test in that file (reads package.json, asserts on the script string) and trivially fails on main's script, which still contains the exclude.
Looks correct to me — minimal, verified, and closes a real gate blind spot. Approval is a human's call; I have not approved.
Note for the maintainer (pre-existing, not this PR's fault): no CI workflow runs npm test/test:coverage, so this gate only bites locally until a test workflow exists.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
Test Improvement
Removes the stale
--exclude 'docusaurus.config.ts'flag from thetest:coveragec8 invocation inpackage.json. That file has been fully unit-tested since #404/#419 vialib/docusaurusConfigPreprocessor.test.mtsandlib/docusaurusConfigBuildContext.test.mts, which import the realdocusaurus.config.tsdirectly (seetestHelpers/resolveExtensionlessTs.mjs). The exclude flag predates those tests and left the file ungated: a regression or new untested branch added todocusaurus.config.tswould passnpm run test:coveragesilently because c8 never instrumented it.Verified locally: with the exclude removed,
npm run test:coveragestill reports 100% stmts/branch/func/line fordocusaurus.config.tsand every other file — no new unit tests were needed, this closes a gate-configuration blind spot only.Also adds a regression test to
scripts/coverage-thresholds.test.mjsasserting the script no longer excludes the file (fails without this fix, confirmed locally viagit stash).Related Issue
Refs #425 (this PR fixes only the
docusaurus.config.tscoverage-gate exclude-flag finding noted in my comment on that issue; #425's own deploy-preview e2e gap is tracked separately and addressed by PR #426, so this PR intentionally leaves #425 open)Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88