test(validators): cover the seven uncovered fallback-label regions - #688
Closed
hivecommons-hive[bot] wants to merge 1 commit into
Closed
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
Line coverage is 100% across this repository's source files, so the remaining unit gaps are sub-line regions. Seven of them form one cluster: the fallback labels the validator scripts attach to an error when the record that caused it has no natural identifier, plus the two || [] guards that keep a missing array from becoming an iteration TypeError. Drive each arm from the four existing validator test files: - validate-architectures: an id-less catalog record, asserting both 'path: record.id || "<unknown>"' sites label the error <unknown> - validate-case-studies: an entry with a slug but no id reaches the slug arm; one with neither reaches the 'unknown' literal - validate-launch-metrics: a file with no signals key is reported as a count failure rather than a crash, and an id-less signal is filed under '(missing id)' - validate-metrics: a file with no metrics key is reported by its real failure rather than an iteration TypeError All four files now report 100% region coverage. Closes #687 Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
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 Hive will automatically remove the |
This was referenced Sep 26, 2026
Closed
Member
|
Superseded by #750, which consolidates this and 14 other test-only coverage PRs into a single reviewable change (commit cherry-picked unmodified, authorship and DCO preserved). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Line coverage is already 100% for every source file in this repository, so the
remaining unit-test gaps are all sub-line regions. This PR closes one
coherent cluster of seven of them: the fallback labels the validator scripts
attach to an error when the record that caused it has no natural identifier,
plus the two
|| []guards that keep a collector output missing its arrayfrom turning a validation failure into an iteration
TypeError.Regions covered (file / line / region):
scripts/validate-architectures.mjs|| '<unknown>'scripts/validate-architectures.mjs|| '<unknown>'scripts/validate-case-studies.mjs?? entry.slugscripts/validate-case-studies.mjs?? 'unknown'scripts/validate-launch-metrics.mjs|| []scripts/validate-launch-metrics.mjs|| '(missing id)'scripts/validate-metrics.mjs|| []Tests are appended to the four existing validator test files and use the
established
runScriptWithFixturessandbox; no production code changes, nonew test helpers, no new files.
The assertions pin the observable behaviour rather than the coverage number:
each test checks the exact
[error] <label>: <message>line a maintainerwould read, and asserts the label is not
undefined— and for the two|| []guards, that stderr carries the real validation failure rather than aTypeError.Verification
Region coverage for the four files, measured before and after with
tests/tools/coverage-report.mjs:scripts/validate-architectures.mjsscripts/validate-case-studies.mjsscripts/validate-launch-metrics.mjsscripts/validate-metrics.mjsScope
Files touched:
tests/validate-architectures.test.mjs,tests/validate-case-studies.test.mjs,tests/validate-launch-metrics.test.mjs,tests/validate-metrics.test.mjs.Deliberately disjoint from the open hold-gated PRs: #678 (import-architectures
regions), #680 (svg-active-content regions), #686 (fetch-community-people
regions), #674 (the region-coverage gate in
package.json), #684(
validate-projects-born,validators-smoke). No file, script, or region inthis PR is claimed by any of them.
Related Issue
Closes #687
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88