Repository navigation
[quality] meow.ts:28 (strict /meow re-check after the dispatcher's generic match) has no end-to-end coverage #396
Description
Finding
meow.ts:28 — the early return of the strict /meow re-check — has no end-to-end coverage; it is green in the unit report only.
handleIssueComment admits /meow with the generic matcher (src/utils/command.ts:150-155: ^\s*/meow(?:\s+(.*))?\s*$, flag i), while meow() re-checks the line against its own pattern (src/issueComment/meow.ts:12: /^[\t ]*\/meow[\t ]*$/, case-sensitive, no arguments) and returns at meow.ts:28 when only the generic one matched. So /meow cat, /MEOW and /meow please pass the dispatcher, reach the handler and leave it silently: no cat api call, no comment, exit 0.
Evidence (main @ aa6a0f8, Node v26.10.0, vitest 5.0.3):
- Unit:
npx vitest run --coverage→ 100 % lines;meow.ts:28is reached by__tests__/issueCommentTest/meow.test.ts:97(does not trigger for '/meow cat'), through the realhandleIssueComment. - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of all 36 open hold-gated bundle PRs (test(bundle): drive root-OWNERS authorization on an issue and the OWNERS-based /lgtm refusal through dist/index.js #283 … test(bundle): drive parseProwConfig's empty-document arm (config.ts:373) through dist/index.js #395; 57 files / 430 tests pass) → 97.8 % lines ofsrc/;meow.tsreports28,112uncovered. The existing bundle caseignores /meow inside a fenced code block(__tests__/bundle/meow.test.ts:215) never callsmeow()at all — the dispatcher'scommandLinesfilter drops the fenced line first — so it does not reach line 28. test(bundle): drive /meow's parseCatImage refusals and dropped-connection retry through dist/index.js #372 (parseCatImage / dropped-connection arms) is merged into that scratch branch and leaves line 28 cold too. - Reachability check: a bundle run with
prow-commands: /meowand body/MEOWexits 0 with zero GitHub calls and zero cat api calls (DA:28,3in the lcov of the companion PR's new file alone).
Observation for maintainers, not part of this issue's deliverable because it is a behaviour choice: every other command is case-insensitive (/LGTM, /Kind cleanup work), but /MEOW is accepted by the dispatcher and then ignored by meow.ts:12. Either the strict pattern should get the i flag, or the dispatcher should use it, so that the two gates agree.
Recommendation
One deliverable:
- drive
meow.ts:28throughdist/index.js:prow-commands: /meowwith bodies/meow cat,/MEOWand/meow pleaseon another line; assert exit 0, no::error::/::warning::, no GitHub calls and no cat api call (thecatApiPreload.cjsfail-closed path withoutCAT_API_URLguarantees the latter)
Kept in a new file (__tests__/bundle/meowCommandShape.test.ts) so it does not touch __tests__/bundle/meow.test.ts, which held PR #372 owns.
Priority
- Impact: low (e2e-only gap; the arm is reached in unit tests)
- Effort: low
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: aa6a0f8
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
github-actions commentedon Oct 8, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.test(bundle): drive meow.ts:28 (strict /meow re-check after the dispa…