Skip to content

test(meow): cover the missing-issue-number throw and the response-body cancel fallback - #206

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-meow-error-branches
Sep 28, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-meow-error-branches

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds two tests to __tests__/issueCommentTest/meow.test.ts, the only file touched:

  • throws when the payload has no issue number — calls the exported meow(context) with payload.issue removed and asserts the github context payload missing issue number rejection fires before fetch or createComment run (src/issueComment/meow.ts:35).
  • still retries when cancelling the response body fails — mocks fetch with a 503 whose body stream throws from cancel(), then a good response; asserts core.debug logs could not cancel cat api response body and the retry still posts the cat image (src/issueComment/meow.ts:112, the cancelResponseBody catch).

meow.ts goes from 96.96% → 100% statements/lines/functions. npx vitest run __tests__/issueCommentTest/meow.test.ts → 38 passed; npx eslint clean.

Cluster: src/issueComment/meow.ts only — disjoint from #175 (assign/unassign/cc/uncc/reopen/close/retitle/lock), #183 (approve/milestone), #185 (trigger) and #196 (handleIssueComment).

Related Issue

Closes #205


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…y cancel fallback

Closes #205

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2026
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner September 27, 2026 14:15
@hivecommons-hive

Copy link
Copy Markdown
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 outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind failing-test or /kind cleanup.

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

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] meow.ts: the missing-issue-number throw and the response-body cancel fallback are untested

1 participant