[quality] validate-schema.mjs: cover runValidation (0% -> 53%) - #3233
hivecommons-hive[bot] merged 1 commit into
Conversation
Adds 10 tests for runValidation, the exported dispatcher used by the schema-validation CI workflow. Previously the only test file for this module (__tests__/validate-schema.test.mjs) only exercised scanner's validateMissionExport, leaving runValidation at 0% coverage. Covers: - valid JSON mission → success path - .yaml / .yml missions dispatched to yaml.load - extensionless files → JSON-first, YAML fallback - read-file error → invalid count + stderr message - JSON parse error → invalid count + 'Parse error' - YAML parse error → invalid count + 'Parse error' - schema-validation failure → per-error bullets on stderr - mixed batch aggregates counts correctly - empty file list → zeroed counts Coverage of validate-schema.mjs: 0% -> 53.03% lines, 35.48% branches. Refs #3165 Signed-off-by: kubestellar-hive[bot] <223556219+Copilot@users.noreply.github.com>
|
Important Held for human sign-off on the direction, not on the code. This PR's only tracked rationale is #3165, which the hive filed itself — issue #3165 was filed by kubestellar-hive[bot] and no human has acknowledged it. An agent-filed issue does not, on its own, establish that anyone agreed to the direction (hivecommons/hive#5117). The change may well be right; nothing here is a review of it. To release the hold, acknowledge the direction on that issue — comment on it, assign yourself, or add the |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Direction acknowledged by hub admin ( |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Test Improvement
Adds 10 tests for
runValidation, the exported dispatcher used by the schema-validation CI workflow.Previously the only test file for this module (
__tests__/validate-schema.test.mjs) only exercisedscanner.mjs'svalidateMissionExport, leavingrunValidationat 0% coverage.Covers
.yaml/.ymlmissions dispatched toyaml.loadCoverage
scripts/validate-schema.mjs: 0% → 53.03% lines / 35.48% branches. The remaining 47% isdiscoverMissionFilesandmain(), both driven byprocess.argv/process.exitand better exercised via a follow-up.Refs #3165
Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-opus-4.7