[quality] generate-cncf-missions.mjs: +15 branch tests (30.56% → 32.93% lines, 40.38% → 45.08% branches) - #3230
Conversation
…uildResolutionSummary/generateMission
Adds targeted branch coverage for three exported helpers that were
under-exercised by the existing test suites:
* buildDescription bug arm — the errorMatch capture group for
error:/ERROR:/panic:/FATAL:/failed to: patterns, plus the
community-reported vs "affects N+ users" suffix split when the
error pattern does not match.
* buildResolutionSummary — all three arms of buildResolutionFallback
(pr URL, issue URL, generic) plus the sentence-truncation happy
path that must NOT emit the fallback text.
* generateMission end-to-end — top-level document shape, linkedPR
presence/absence propagation to metadata.sourceUrls.pr, non-K8s
project prerequisites via PROJECT_CLI_MAP (harbor), and the
3-snippet cap on resolution.codeSnippets.
Coverage on generate-cncf-missions.mjs:
lines 30.56% -> 32.93% (+2.37)
branches 40.38% -> 45.08% (+4.70)
Full suite: 1108 -> 1123 tests, all green.
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 15 targeted branch tests for three exported helpers in
scripts/generate-cncf-missions.mjsthat were under-covered by the existing suites (generate-cncf-missions.test.mjs+.scoring-branches+.format-branches).What is covered
buildDescriptionbug arm — theerror:/ERROR:/panic:/FATAL:/failed to:capture group that emits "Users encounter: …", plus the community-reported vs "affects N+ users" suffix split when no error pattern matches.buildResolutionSummary— all three arms of the privatebuildResolutionFallback(prURL,issueURL, generic), the sourceUrls=undefined guard, and the sentence-truncation happy path that must NOT emit the fallback.generateMissionend-to-end — top-level kc-mission-v1 document shape, linkedPR presence/absence propagation tometadata.sourceUrls.pr, non-K8s project prerequisites viaPROJECT_CLI_MAP(harbor →docker-compose), and the 3-snippet cap onresolution.codeSnippets.Coverage delta (v8 provider)
Full scripts/ suite: 1108 → 1123 tests, all green (25s).
Refs #3165
Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-opus-4.7