Skip to content

test(bundle): drive suggestApprovers' second greedy round (approve.ts:260) through dist/index.js - #472

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-approve-suggestion-arms
Oct 15, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-approve-suggestion-arms

Conversation

@hivecommons-hive

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

Copy link
Copy Markdown
Contributor

Test Improvement

Adds one pull_request_review scenario to __tests__/bundle/approveEvaluationArms.test.ts driving suggestApprovers' second greedy round (src/plugins/approve.ts:260) through the compiled dist/index.js. Every other bundle scenario is coverable by a single approver, so the notifier never named two.

  • a/OWNERS [x, y], b/OWNERS [y, z], c/OWNERS [z] (all no_parent_owners) on files a/1, b/1, c/1 → please assign **y**, **z** and `/assign @y @z`; x is never suggested (y and z each cover two files, y wins the tie, then only z covers c/1)

Test-only change; no src/ or dist/ edits.

Related Issue

Refs #466

@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 13, 2026 21: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 13, 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.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind failing-test or /kind cleanup.

jeefy
jeefy previously requested changes Oct 14, 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.

Both cases reach only the false arm of approve.ts:260.

  • Drop approveSuggestionArms.test.ts:45–66 and keep :68–86. :68 is the case that actually tests the greedy choice (x is never suggested); :45's bob/carol result would come out the same from code that lists every approver of every file.
  • Optional: put the kept case in approveEvaluationArms.test.ts, which already has the routeEvaluation, runReview and postedNotifier helpers (:57–78) this file copies.

…:260) through dist/index.js

Every bundle scenario so far was coverable by one approver, so the notifier
never named two: BRDA:260,42,1 was 0 in coverage-e2e/lcov.info. One
pull_request_review scenario in approveEvaluationArms.test.ts now asserts
the multi-login form end-to-end: the a/b/c no_parent_owners set cover where
y beats x on the tie and z finishes, so x is never suggested.

Refs #466

Co-authored-by: quality <quality@hive.kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
@mrbobbytables

Copy link
Copy Markdown
Member

Addressed review: dropped the disjoint bob/carol case (it would pass against code listing every approver of every file) and the new file; the greedy-rounds case now lives in approveEvaluationArms.test.ts's notifier block, reusing its routeEvaluation/runReview/postedNotifier. Rebased on main.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

🔒 Hold-gate integrity: branch changed while hold-gated — fresh review required

This PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was 4b6bb0321fbb, but the branch now sits at e3378bccb709. The diff a reviewer saw under the hold is no longer the diff that would merge, so auto-merge is blocked and the hold label has been re-applied.

Commits not present in the hold-time snapshot (1):

  • e3378bccb709 by mrbobbytables — test(bundle): drive suggestApprovers' second greedy round (approve.ts:260) through dist/index.js

Authors not in the hold-time author set: mrbobbytables

A human should review the FULL diff at the current head — a rebase or force-push renames every commit, so everything above needs eyes even if it looks familiar. Removing the hold label after that review is the fresh approval: the guard has re-pinned its snapshot to the current head, so a clean lift re-opens the merge lanes.

@mrbobbytables
mrbobbytables dismissed jeefy’s stale review October 15, 2026 14:48

Dismissing stale review: the PR was revised after this review (commit post-dates it) and now implements the requested restructuring (single case, folded into the existing test file, fixture adjusted). Stack of #467–#482 verified locally: 78 bundle files / 481 tests pass, eslint clean.

@mrbobbytables
mrbobbytables merged commit c5e6d94 into main Oct 15, 2026
13 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-approve-suggestion-arms branch October 15, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants