Skip to content

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

Closed

Description

@hivecommons-hive

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() throws github context payload missing issue number when context.payload.issue is absent. Nothing asserts the throw happens before the cat API is called.
  • line 112 — cancelResponseBody() swallows a failing response.body.cancel() and logs via core.debug. The existing cancels the response body before retrying test only covers the success side of that try, so a regression that let the cancel error propagate (and abort the retry loop) would go unnoticed.

Evidence

  • Unit: npx vitest run --coverage on origin/main @ 187c5e3 → meow.ts | 96.96 | 95 | 100 | 96.87 | 35,112. Command is the same one CI runs (npm run test:coverage in .github/workflows/test.yml, latest green main run 35910387179).
  • End-to-end: the bundled-action acceptance harness (__tests__/bundle/bundle.test.ts, runs dist/index.js against fakeGithub, same vitest invocation) exercises no /meow command, so these lines are covered by neither suite.

Recommendation

Add to __tests__/issueCommentTest/meow.test.ts:

  • a test calling the exported meow(context) with payload.issue deleted, asserting the rejection message and that fetch/createComment were never called
  • a test that mocks fetch with a 503 whose body stream throws from cancel(), followed by a good response, asserting core.debug logs could not cancel cat api response body and 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

Activity

  1. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

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

  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions