Repository navigation
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
Conversation
…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>
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 Hive will keep the |
Contributor
|
Please add a kind label with |
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
__tests__/bundle/commandCanonicalization.test.ts(new file only; importscomment,helpersFor,repo,tokenfrom./helpers,startfrom./fakeGithub,runBundlefrom./runBundle; nosrc/,dist/,helpers.tsor config change). Threeissue_commentruns of the committeddist/index.jsagainstfakeGithubreach the twoprow-commandsinput arms ofsrc/issueComment/handleIssueComment.tsno bundle suite drove:prow-commands: /remove-help, comment/helpcanonicalCommandalias arm L86GET labels→POST issues/1/labels {help wanted}, then the configuration readsprow-commands: /help /remove-help /HELP, comment/helpSetdedup at L109prow-commands: /foo_bar, comment/foo_bar::error::TypeError: error handling issue comment: Error: could not execute /foo_bar. May not be supported - please refer to docs, zero api callsEvidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.3, @vitest/coverage-v8,npm run test:coverage:e2e):src/issueComment/handleIssueComment.tse2e lines 93.90 % → 96.34 %, statements 94.04 % → 96.42 %, branches 86.27 % → 90.19 %. Remaining lines 45 (/meow, held test(bundle): drive /meow through dist/index.js against a stubbed cat api #244), 188 (held test(bundle): drive the configured hold and sweep sections through dist/index.js #293) and 207 (removeFixedLabels, held test(bundle): drive removeFixedLabels' no-op and failed-labels-read arms through dist/index.js #300) are each already claimed.Disjoint from every open hold-gated bundle PR: #246 (
/remove-helpin the comment with/helpconfigured, built-in/lifecycle), #343 (missing issue/pull number guards), #324 (command.tsMarkdown guards), #242 (cronjobsinput). None of them puts an alias or an unsupported name in theprow-commandsinput.Verified locally:
npx vitest run __tests__/bundle/commandCanonicalization.test.ts→ 3 passed against the committeddist/index.js;npx eslint __tests__/bundle/commandCanonicalization.test.tsandnpx tsc --noEmitclean.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