Skip to content

test: cover the last unclaimed uncovered regions in three scripts - #825

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-last-unclaimed-script-regions
Sep 29, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-last-unclaimed-script-regions

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

A merged V8 range analysis of the unit suite (NODE_V8_COVERAGE over
TZ=UTC node --test, unioning every child-process record per source offset)
leaves exactly three reachable uncovered regions in scripts/ that no open PR
claims. Each one guards real behaviour that nothing currently pins. This PR adds
one test per region, using the harnesses the suite already provides.

  • tests/collect-case-studies.test.mjs — a data/case-studies.json that lacks
    the caseStudies key is read as an empty list, so the "nothing changed"
    comparison still holds against an empty upstream and the file is left
    byte-for-byte alone instead of getting a fresh generatedAt. Covers
    scripts/collect-case-studies.mjs:23.
  • tests/import-architectures.test.mjs — docs/architectures/index.md survives
    an import while a stale imported page beside it is pruned. Covers
    scripts/import-architectures.mjs:79.
  • tests/validate-architecture-assets.test.mjs — the shallow static/img walk
    does not descend into a subdirectory that is not an asset root, so an asset
    nested inside one is neither validated nor counted. Covers
    scripts/validate-architecture-assets.mjs:146.

Tests only; no production code is touched. Full suite green (1426 tests),
npm run test:unit:coverage:check passes, and src region coverage rises from
98.46% to 98.63%.

Scope

Claims tests/collect-case-studies.test.mjs, tests/import-architectures.test.mjs
and tests/validate-architecture-assets.test.mjs, and the three script regions
named above. Deliberately disjoint from the open hold-gated PRs: #810 and #812
(scripts/import-architecture-issue.mjs), #818
(scripts/lib/svg-active-content.mjs) and #820
(tests/architecture-catalog-contract.test.mjs).

Related Issue

Closes #824


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

@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. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

A merged V8 range analysis of the unit suite leaves exactly three reachable
uncovered regions in scripts/ that no open PR claims. Each guards real
behaviour that nothing currently pins:

- collect-case-studies.mjs:23 falls back to an empty list when an existing
  data/case-studies.json lacks the caseStudies key, which is what keeps the
  no-change comparison from rewriting generatedAt.
- import-architectures.mjs:79 skips repo-authored pages when pruning, so
  docs/architectures/index.md survives an import that deletes stale ones.
- validate-architecture-assets.mjs:146 stops the shallow static/img walk at a
  subdirectory that is not an asset root.

Adds one test per region using the harnesses the suite already provides.
Raises src region coverage from 98.46% to 98.63%.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
@mrbobbytables
mrbobbytables force-pushed the quality/test-last-unclaimed-script-regions branch from babe85b to c4a0943 Compare September 29, 2026 16:09
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

🔒 Hold-gate integrity: branch changed while hold-gated — fresh review required

This PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was babe85b02ad5, but the branch now sits at c4a0943c5e8f. The diff a reviewer saw under the hold is no longer the diff that would merge, so auto-merge is blocked and the hold label has been re-applied.

Commits not present in the hold-time snapshot (1):

  • c4a0943c5e8f by hivecommons-hive[bot] — test: cover the last unclaimed uncovered regions in three scripts

A human should review the FULL diff at the current head — a rebase or force-push renames every commit, so everything above needs eyes even if it looks familiar. Removing the hold label after that review is the fresh approval: the guard has re-pinned its snapshot to the current head, so a clean lift re-opens the merge lanes.

@mrbobbytables
mrbobbytables added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 99eb4ff Sep 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Cover the last three unclaimed uncovered regions in collect-case-studies, import-architectures and validate-architecture-assets

1 participant