test: cover the last unclaimed uncovered regions in three scripts - #825
Conversation
|
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 Hive will automatically remove the |
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>
babe85b to
c4a0943
Compare
🔒 Hold-gate integrity: branch changed while hold-gated — fresh review requiredThis PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was Commits not present in the hold-time snapshot (1):
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. |
Test Improvement
A merged V8 range analysis of the unit suite (
NODE_V8_COVERAGEoverTZ=UTC node --test, unioning every child-process record per source offset)leaves exactly three reachable uncovered regions in
scripts/that no open PRclaims. 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— adata/case-studies.jsonthat lacksthe
caseStudieskey 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. Coversscripts/collect-case-studies.mjs:23.tests/import-architectures.test.mjs—docs/architectures/index.mdsurvivesan import while a stale imported page beside it is pruned. Covers
scripts/import-architectures.mjs:79.tests/validate-architecture-assets.test.mjs— the shallowstatic/imgwalkdoes 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:checkpasses, andsrcregion coverage rises from98.46% to 98.63%.
Scope
Claims
tests/collect-case-studies.test.mjs,tests/import-architectures.test.mjsand
tests/validate-architecture-assets.test.mjs, and the three script regionsnamed 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