Skip to content

test(bundle): drive /approve cancel on a repository without OWNERS files through dist/index.js - #276

Merged
github-actions[bot] merged 1 commit into
mainfrom
quality/test-bundle-approve-cancel-no-owners
Oct 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
quality/test-bundle-approve-cancel-no-owners

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds one case to __tests__/bundle/bundle.test.ts, in the issue_comment /approve on a pull request describe beside the existing no-OWNERS /approve test (+34 lines, no helper copies — reuses routeOwners, runApprove, bot, membershipReads, expectCommandThenConfig):

  • /approve cancel by bob on a repository with no OWNERS files, with a GET …/pulls/1/reviews list holding two bot APPROVED reviews, a human APPROVED review and a bot DISMISSED one.
  • Asserts exactly one PUT …/pulls/1/reviews/12/dismissals (the last bot APPROVED review, not the human's or the dismissed one) with body { message: 'Canceled through prow-github-actions by @bob' }; no POST …/reviews, no label delete, no comment; exit 0, no ::error::; request sequence ownersReads → membership(bob) → GET reviews → PUT dismissal, then the post-command sweep's config/pr reads.

Files/functions claimed: __tests__/bundle/bundle.test.ts (issue_comment /approve on a pull request describe) only; production path src/issueComment/approve.ts cancel() + the isCancel arm of the no-OWNERS branch. Disjoint from #221 (unit, src/plugins/approve.ts), #263 (approve.github_review, OWNERS repositories) and the other held bundle PRs.

Evidence: with #274's test:coverage:e2e harness on main @ a270568, src/issueComment/approve.ts unreached statement lines go from 44,63,64,67,69,82,96,131,150,153,154,160,165,166,167,168,172,173,176,177,185 to 44,67,82,96,131,160,173,185 (only throw/catch arms remain). npx vitest run __tests__/bundle/bundle.test.ts → 89 passed; npx eslint __tests__/bundle/bundle.test.ts clean.

Related Issue

Closes #275


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

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

…les through dist/index.js

The legacy no-OWNERS path of src/issueComment/approve.ts (list reviews,
dismiss the bot's latest APPROVED one) was only reached by unit mocks.
One bundle case now runs it against the fake API and asserts the single
dismissal of the last bot APPROVED review, its message, and that no
review, label or comment is written.

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 3, 2026
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 3, 2026 13:38
@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 hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/kind cleanup


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

— 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 3, 2026
@jeefy

jeefy commented Oct 3, 2026

Copy link
Copy Markdown
Member

/kind cleanup
/lgtm
/approve
/hold cancel

@github-actions github-actions Bot added lgtm "Looks good to me", indicates that a PR is ready to be merged. 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 merged commit ed0b172 into main Oct 3, 2026
13 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-bundle-approve-cancel-no-owners 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

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

Development

Successfully merging this pull request may close these issues.

[quality] /approve cancel on a repository without OWNERS files never runs through dist/ — the legacy review-dismissal path has no bundle test

1 participant