Skip to content

[quality] generate-cncf-missions.mjs: +15 branch tests (30.56% → 32.93% lines, 40.38% → 45.08% branches) - #3230

Merged
hivecommons-hive[bot] merged 1 commit into
masterfrom
quality/gen-cncf-missions-desc-clean-1788687131
Sep 11, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
masterfrom
quality/gen-cncf-missions-desc-clean-1788687131

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds 15 targeted branch tests for three exported helpers in scripts/generate-cncf-missions.mjs that were under-covered by the existing suites (generate-cncf-missions.test.mjs + .scoring-branches + .format-branches).

What is covered

  • buildDescription bug arm — the error:/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 private buildResolutionFallback (pr URL, issue URL, generic), the sourceUrls=undefined guard, and the sentence-truncation happy path that must NOT emit the fallback.
  • generateMission end-to-end — top-level kc-mission-v1 document shape, linkedPR presence/absence propagation to metadata.sourceUrls.pr, non-K8s project prerequisites via PROJECT_CLI_MAP (harbor → docker-compose), and the 3-snippet cap on resolution.codeSnippets.

Coverage delta (v8 provider)

Metric Before After
Lines 30.56% 32.93%
Branches 40.38% 45.08%

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

…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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 approved-direction label — and remove the hold label here.

@hivecommons-hive hivecommons-hive Bot added the hold label Sep 6, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 6, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 6, 2026
@clubanderson clubanderson removed the hold label Sep 11, 2026
@clubanderson

Copy link
Copy Markdown
Member

Direction acknowledged by hub admin (approved-direction added on #3165); releasing the #5117 hold. This hive runs at ACMM L6 and may act on its own findings.

@hivecommons-hive
hivecommons-hive Bot merged commit 1f5a64b into master Sep 11, 2026
9 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/gen-cncf-missions-desc-clean-1788687131 branch September 11, 2026 16:54
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants