Repository navigation
[quality] meow.ts: the missing-issue-number throw and the response-body cancel fallback are untested #205
Copy link
Copy link
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmed
Description
Finding
src/issueComment/meow.ts is the only issueComment handler whose remaining uncovered lines are not already claimed by an open test PR (#175, #183, #185, #196 cover the others). Two branches have no test:
- line 35 —
meow()throwsgithub context payload missing issue numberwhencontext.payload.issueis absent. Nothing asserts the throw happens before the cat API is called. - line 112 —
cancelResponseBody()swallows a failingresponse.body.cancel()and logs viacore.debug. The existingcancels the response body before retryingtest only covers the success side of thattry, so a regression that let the cancel error propagate (and abort the retry loop) would go unnoticed.
Evidence
- Unit:
npx vitest run --coverageonorigin/main@ 187c5e3 →meow.ts | 96.96 | 95 | 100 | 96.87 | 35,112. Command is the same one CI runs (npm run test:coveragein.github/workflows/test.yml, latest greenmainrun 35910387179). - End-to-end: the bundled-action acceptance harness (
__tests__/bundle/bundle.test.ts, runsdist/index.jsagainstfakeGithub, same vitest invocation) exercises no/meowcommand, so these lines are covered by neither suite.
Recommendation
Add to __tests__/issueCommentTest/meow.test.ts:
- a test calling the exported
meow(context)withpayload.issuedeleted, asserting the rejection message and thatfetch/createCommentwere never called - a test that mocks
fetchwith a 503 whose body stream throws fromcancel(), followed by a good response, assertingcore.debuglogscould not cancel cat api response bodyand the retry still posts the cat image
Together these take meow.ts to 100% statements/lines/functions.
Priority
- Impact: low — both branches are defensive; the retry-on-cancel-failure one is the more valuable since a regression there would silently drop the cat and degrade to the outage note.
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 187c5e3
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmed
Activity
github-actions commentedon Sep 27, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.