Skip to content

test: stop excluding docusaurus.config.ts from the coverage gate - #427

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-coverage-gate-docusaurus-config
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-coverage-gate-docusaurus-config

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Removes the stale --exclude 'docusaurus.config.ts' flag from the test:coverage c8 invocation in package.json. That file has been fully unit-tested since #404/#419 via lib/docusaurusConfigPreprocessor.test.mts and lib/docusaurusConfigBuildContext.test.mts, which import the real docusaurus.config.ts directly (see testHelpers/resolveExtensionlessTs.mjs). The exclude flag predates those tests and left the file ungated: a regression or new untested branch added to docusaurus.config.ts would pass npm run test:coverage silently because c8 never instrumented it.

Verified locally: with the exclude removed, npm run test:coverage still reports 100% stmts/branch/func/line for docusaurus.config.ts and 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.mjs asserting the script no longer excludes the file (fails without this fix, confirmed locally via git stash).

Related Issue

Refs #425 (this PR fixes only the docusaurus.config.ts coverage-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

@hivecommons-hive hivecommons-hive Bot added the ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge. label Nov 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 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.

The hive's work on this PR is done. Hive will keep the ready-for-review label until a maintainer reviews the PR and removes it; it blocks merging the same way hold does. 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 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cncf-techdocs ready!

Name Link
🔨 Latest commit f71df66
🔍 Latest deploy log https://app.netlify.com/projects/cncf-techdocs/deploys/6afdd9dd5d1c4007c4dd5288
😎 Deploy Preview https://deploy-preview-427--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

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

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 b4c428b1a142 matched:

  • sensitive_path: changes 1 sensitive path(s) (package.json)

No sentinel-alert label was added. The finding is recorded in the dashboard Security tab and /api/sentinel; set sentinel.trusted_authors_block: true to block trusted authors too.

Reviewed by reviewer — no findings.

Reviewer notes

This looks correct to me — I verified the claims against the tree at head b4c428b rather than taking the body on faith:

  • lib/docusaurusConfigPreprocessor.test.mts, lib/docusaurusConfigBuildContext.test.mts, and lib/testHelpers/resolveExtensionlessTs.mjs all exist at this head and exercise the real docusaurus.config.ts.
  • Ran npm ci && npm run test:coverage on the PR head: 68/68 tests pass and c8 reports 100% stmts/branch/func/line for docusaurus.config.ts and every other file, so removing the --exclude tightens the gate with no threshold change needed.
  • The new assertion in scripts/coverage-thresholds.test.mjs (!script.includes('docusaurus.config.ts')) does fail against the pre-fix script, so it is a real regression guard.
  • Refs #425 (rather than Closes) is appropriate: this fixes only the exclude-flag finding; [quality] e2e suite never exercises the deploy-preview branch/repo wiring #425's deploy-preview e2e gap is tracked by test: cover deploy-preview branch/repo wiring in e2e link-rewrite suite #426.

No findings. One-line change plus its guard test; low risk, closes a real gate blind spot.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

⚠️ Hold-gate mergeability: this PR has a real conflict with its base

This PR is hold-gated and has fallen behind its base branch. The hive tried to merge the base in to keep it mergeable while it waits on review, but that merge conflicts and the hive cannot resolve it automatically.

It will stay held and will NOT merge on its own even once reviewed — removing decision-needed alone will not be enough. Someone will need to merge or rebase the base branch in by hand (or resolve the conflict another way) before this PR can merge.

@nate-double-u

Copy link
Copy Markdown
Member

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant