Skip to content

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

Merged
nate-double-u merged 1 commit into
mainfrom
quality/test-coverage-gate-docusaurus-config
Nov 20, 2026
Merged

nate-double-u merged 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the update that includes docusaurus.config.ts in the coverage gate.

No open issues 🎉

What changed in this PR

Closes a coverage-gate blind spot by including the already unit-tested docusaurus.config.ts in the existing 100% coverage checks. Deploy-preview end-to-end coverage remains separate, addressed by PR #426.

Changes:

  • Removes the configuration file’s exclusion from the c8 coverage command.
  • Adds a regression test guarding against reintroducing the explicit exclusion.
File Description
scripts/​coverage-thresholds.test.mjs Adds an assertion that the coverage script does not name docusaurus.config.ts.
package.json Removes the docusaurus.config.ts exclusion while preserving coverage thresholds and helper exclusions.

Review effort: Balanced

@nate-double-u
nate-double-u merged commit 5f79670 into main Nov 20, 2026
10 checks passed
@nate-double-u
nate-double-u deleted the quality/test-coverage-gate-docusaurus-config branch November 20, 2026 01:31
hivecommons-hive Bot added a commit that referenced this pull request Dec 1, 2026
- #481, #428, #359 in dragonflyoss/d7y.io are open pull requests that
  already add the missing reference content, not issues requesting it;
  reframe recommendations/issues as 'review and merge' rather than
  'write content' or 'add labels and bodies'.
- Correct the open-issue count: the docs repo has 2 open issues
  (#427 mobile bug, already labeled bug; #348 Netlify build, unlabeled)
  and 4 open PRs (#486 dependabot, #481, #428, #359), not six open
  issues.
- Retarget the triage/labeling recommendation at #348, the only open
  issue lacking an effort/expertise label.
- Link #481/#428/#359 as /pull/ URLs instead of /issues/.

Verified against the live dragonflyoss/d7y.io repo via the GitHub API.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Dec 2, 2026
…ts in Dragonfly analysis

Per the second manual /verify pass on PR #458:

- Rewrote the #427 bullet to state the finding directly instead of
  narrating its own prior correction (open, unattended bug; dropped the
  'project-acknowledged' framing text as unnecessary history).
- Fixed 'graduated-level' to 'Incubating-level' for the 'stakeholders and
  personas identified' website guidelines item, per
  docs/analysis/criteria.md#incubating.
- Changed the checklist lead-in from 'walking the checklist item by item'
  to 'checked against the applicable items', since the paragraph does not
  cover every checklist item (origin-company reference, enterprise-support
  leads, support-company links, CNCF logo placement).
- Fixed the dead blog link (d7y.io/blog/dragonfly-lightweight-deployment,
  404) to the dated path the post is actually served at (200).
- Guarded the cSpell:ignore front-matter directive with # prettier-ignore
  (matching the litmuschaos analysis precedent) so Prettier no longer
  folds it onto a continuation line, which silently broke cspell's
  directive parsing and turned 12 ignored words into false positives.
- Aligned issue 08's title with the issues.md table row ('Add meeting
  information to the existing Community section').
- Aligned the issues.md table row for issue 05 with its own title and
  body text ('...as the end-to-end tutorial').
- Reworded issue 01's #427 annotation so it no longer contradicts the
  surrounding text ('unattended since 2026-06-17' instead of 'consider
  re-prioritizing').

Verified: npx prettier --check ., npx markdownlint-cli2, npx cspell, and
npm run build (onBrokenLinks: throw) all pass; markdown-link-check
confirms the fixed blog URL returns 200.

Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
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.

2 participants