Skip to content

test(bundle): drive handleIssueComment's prow-commands input arms and per-command error isolation through dist/index.js - #252

Merged
github-actions[bot] merged 1 commit into
mainfrom
quality/test-bundle-dispatcher-arms
Oct 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
quality/test-bundle-dispatcher-arms

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/dispatcherArms.test.ts with the three handleIssueComment arms the bundle suite did not reach:

  • prow-commands missing → exit 1, error contains please provide a list of space delimited commands / jobs to run, no api call
  • prow-commands of only whitespace → same (second it.each row)
  • /remove foo + /hold in one body with a non-collaborator → /remove fails (commenter is not authorized to remove a label), /hold still writes { labels: ['do-not-merge/hold'] }, exit 1

Errors are asserted as fragments (errors.some(e => e.includes(...))), and comment/repo/token come from the shared __tests__/bundle/helpers.ts. The unmatched-command, unsupported-name, alias, /remove-hold and /remove authorization cases from the first revision were dropped on review (covered by handleIssueComment.test.ts, hold.test.ts:103/172, remove.test.ts:28–100 and bundle.test.ts:803/866).

Verification on main @ a270568: npx eslint, npx tsc --noEmit, npx vitest run __tests__/bundle/dispatcherArms.test.ts — 3 pass.

Related Issue

Closes #251


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

@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 1, 2026 01:16
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 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 automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@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.

This repeats handleIssueComment.test.ts, hold.test.ts:103/172 and remove.test.ts:28–100. The bundle tests already cover hold-alias removal (/unhold, bundle.test.ts:866) and /remove (:803).

  1. Keep only the missing/whitespace prow-commands input cases and the "one failing command doesn't stop another" case.
  2. Check error fragments (.some(e => e.includes(...))) instead of pinning the full TypeError: error handling issue comment: Error: … string in four places.
  3. Use a shared config-read list and comment() instead of copying them.

… per-command error isolation through dist/index.js

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot force-pushed the quality/test-bundle-dispatcher-arms branch from aafa1cf to 6215491 Compare October 3, 2026 05:19
@hivecommons-hive hivecommons-hive Bot added the agent/quality Created by Hive for agent-filed issue provenance label Oct 3, 2026
@hivecommons-hive hivecommons-hive Bot changed the title test(bundle): drive handleIssueComment's prow-commands input arms, the /hold aliases and /remove through dist/index.js test(bundle): drive handleIssueComment's prow-commands input arms and per-command error isolation through dist/index.js Oct 3, 2026
@hivecommons-hive hivecommons-hive Bot added the hive/hosted-available-lke648397-260827-5q9t Created by Hive for agent-filed issue provenance label Oct 3, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Addressed all three: kept only the missing/whitespace prow-commands rows and the one-failing-command case; errors are fragment checks; comment/repo/token come from the shared helpers.ts (the copied config-read list is gone — none of the remaining cases reach the sweep). 212 → 46 lines. Rebased on main @ a270568.


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

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

@jeefy

jeefy commented Oct 3, 2026

Copy link
Copy Markdown
Member

#273 is merged: __tests__/bundle/helpers.ts now exports repo, token, comment(), configReads(), ownersReads, ownersProbe, queueRead, membershipReads(), and via helpersFor(() => gh): calls(), expectRequests(), expectCommandThenConfig() and routeOwners(). Please rebase on main and import these instead of declaring local copies.

@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.

Asks addressed, thanks.

@jeefy

jeefy commented Oct 3, 2026

Copy link
Copy Markdown
Member

/kind cleanup
/lgtm
/approve
/hold cancel

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 3, 2026
@github-actions github-actions Bot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-kind labels Oct 3, 2026
@github-actions
github-actions Bot merged commit 6698760 into main Oct 3, 2026
16 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-bundle-dispatcher-arms branch October 9, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/quality Created by Hive for agent-filed issue provenance hive/hosted-available-lke648397-260827-5q9t Created by Hive for agent-filed issue provenance kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged.

Projects

None yet

1 participant