Skip to content

test(bundle): drive the prow-commands alias canonicalization and unsupported-command arms through dist/index.js - #357

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-command-canonicalization
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-command-canonicalization

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/commandCanonicalization.test.ts (new file only; imports comment, helpersFor, repo, token from ./helpers, start from ./fakeGithub, runBundle from ./runBundle; no src/, dist/, helpers.ts or config change). Three issue_comment runs of the committed dist/index.js against fakeGithub reach the two prow-commands input arms of src/issueComment/handleIssueComment.ts no bundle suite drove:

run arm asserts
prow-commands: /remove-help, comment /help canonicalCommand alias arm L86 exit 0, GET labels → POST issues/1/labels {help wanted}, then the configuration reads
prow-commands: /help /remove-help /HELP, comment /help L86 + the Set dedup at L109 exit 0, exactly one label write
prow-commands: /foo_bar, comment /foo_bar unsupported-command arm L150 exit 1, ::error::TypeError: error handling issue comment: Error: could not execute /foo_bar. May not be supported - please refer to docs, zero api calls

Evidence (main @ 3fc21f2, Node v26.10.0, vitest 5.0.3, @vitest/coverage-v8, npm run test:coverage:e2e):

Disjoint from every open hold-gated bundle PR: #246 (/remove-help in the comment with /help configured, built-in /lifecycle), #343 (missing issue/pull number guards), #324 (command.ts Markdown guards), #242 (cron jobs input). None of them puts an alias or an unsupported name in the prow-commands input.

Verified locally: npx vitest run __tests__/bundle/commandCanonicalization.test.ts → 3 passed against the committed dist/index.js; npx eslint __tests__/bundle/commandCanonicalization.test.ts and npx tsc --noEmit clean.

Related Issue

Closes #356


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

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

…pported-command arms through dist/index.js

Adds __tests__/bundle/commandCanonicalization.test.ts: three issue_comment
runs of the committed bundle against fakeGithub reach handleIssueComment.ts
L86 (a configured /remove-help runs the /help module; duplicates collapse to
one run) and L150 (a configured /foo_bar fails the run naming it, no api
call). e2e lines 93.90 -> 96.34 %, branches 86.27 -> 90.19 %.

Closes #356

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@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 Oct 6, 2026
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 6, 2026 20:51
@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.

@github-actions

github-actions Bot commented Oct 6, 2026

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] handleIssueComment's prow-commands alias canonicalization (L86) and unsupported-command arm (L150) are never driven through dist/index.js

0 participants