Skip to content

test(bundle): drive meow.ts:28 (strict /meow re-check after the dispatcher's generic match) through dist/index.js - #397

Merged
mrbobbytables merged 3 commits into
mainfrom
quality/test-meow-command-shape
Oct 9, 2026
Merged

mrbobbytables merged 3 commits into
mainfrom
quality/test-meow-command-shape

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/meowCommandShape.test.ts, which drives src/issueComment/meow.ts:28 — the early return of the strict /meow re-check — through dist/index.js.

handleIssueComment admits /meow with the generic matcher (src/utils/command.ts:150-155, case-insensitive, arguments allowed); meow() then re-checks the line against src/issueComment/meow.ts:12 (/^[\t ]*\/meow[\t ]*$/) and returns at :28 when only the generic gate matched. Until now that arm was reached only by the unit suite (__tests__/issueCommentTest/meow.test.ts:97); on origin/main + all 36 held bundle heads, npm run test:coverage:e2e reported meow.ts 28,112 uncovered.

Three bodies run with prow-commands: /meow: /meow cat, /MEOW, and /meow please between other lines. Each asserts exit 0, no ::error::/::warning::, zero GitHub calls and — via catApiPreload.cjs fail-closed without CAT_API_URL — zero cat api calls.

  • npx vitest run __tests__/bundle/meowCommandShape.test.ts: 3/3 pass
  • e2e coverage of this file alone: DA:28,3 for meow.ts
  • npx eslint on the new file: clean

New file on purpose: __tests__/bundle/meow.test.ts is owned by held PR #372. No src/ or dist/ change.

Related Issue

Closes #396


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

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

…tcher's generic match) through dist/index.js

handleIssueComment admits /meow with the generic, case-insensitive,
argument-tolerant matcher; meow() then re-checks the line against its
own strict pattern and returns at meow.ts:28 when only the first gate
matched. The arm was reached only by the unit suite. The new file runs
/meow cat, /MEOW and a multi-line /meow please through the bundle and
asserts exit 0 with no GitHub and no cat api calls.

Closes #396

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 8, 2026 20:46
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 8, 2026
@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 keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: bbe7ec3

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

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind labels Oct 8, 2026

@jeefy jeefy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three rows reach only meow.ts:28.

  • meowCommandShape.test.ts:44: drop the /MEOW row. It locks in a bug: docs/commands.md:8 says commands are case-insensitive, but the pattern at meow.ts:12 has no i flag, so /MEOW is dispatched and then silently dropped.
  • :45: drop the "among other lines" row. Keep /meow cat (:43).

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Addressed in 9beaa55: dropped the /MEOW row (it pinned the missing i flag at meow.ts:12 against docs/commands.md:8) and the "among other lines" row; /meow cat stands alone as a plain it.


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9beaa55

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

@mrbobbytables
mrbobbytables merged commit d0b1d87 into main Oct 9, 2026
5 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-meow-command-shape branch October 9, 2026 18:00
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] meow.ts:28 (strict /meow re-check after the dispatcher's generic match) has no end-to-end coverage

2 participants