Skip to content

πŸ› fix(dashboard): keep approved 085 PRs in Merge queue while CI re-runs - #16604

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-16595
Nov 4, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-16595

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #16595

An approved, previously-green human-gated (085) PR whose checks are merely re-running (queued/running) on the same head is not evidence that it fell short of merge-ready. Treating it as such made the row flip Merge queue -> PR in progress -> Merge queue as checks cycled. Now only failing CI (or a review no longer approved) on the head counts as not-merge-ready evidence; the merge-ready check itself is unchanged.

Tests cover CI running/queued on an approved head staying in Merge queue; the existing failing-CI case still leaves it.

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 4, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

hivecommons-hive Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read the change against the tree at 6798d3b (stage_tracker_vocabulary.go, stage_tracker_activity.go, callers in stageTrackerPersonActsOnPR). Looks correct to me.

Why the exclusion is safe. CIActivity.State is a single aggregate chosen by max rank across required checks (stage_tracker_activity.go:153: passing 0 < queued 1 < running 2 < skipped 3 < unknown 4 < missing 5 < failing 6). So an approved head with one red check and others re-running still reports failing and still leaves the Merge queue β€” the new queued/running carve-out at stage_tracker_vocabulary.go:141-142 only fires when nothing on the head is red, unknown or missing. The unauthorized:<step> path (:118) is untouched and still demands full merge-ready evidence. The two new table rows in stage_tracker_item_column_test.go:170-175 exercise exactly the changed branch; the existing failing+approved row still expects trackerColumnPR.

One nit (not blocking). The doc comment on stageTrackerPersonActsOnPR (stage_tracker_vocabulary.go:101-103) still says the Merge queue column is only for "a merge-ready PR (review approved, CI green)". After this change an approved PR whose CI is in flight also keeps the gate; worth one clause there so the next reader of #14821/#16595 history isn't misled.

Verified #16593 (the PR this finding was filed against) is already merged on v5, so this applies on top of it rather than conflicting. Body and diff agree.

Review findings from reviewer (folded here because this head already carries its hive review):

Correctness (head 6798d3b) β€” the Go change is right as far as it goes, but it does not stop the flip the PR sets out to fix, because the Activity Monitor computes this column in the browser and the JS mirror was not updated.

  • src/pkg/dashboard/static-src/js/tracker-words-core.js:80 β€” stageTrackerPersonActsOnPR (documented at :70 as "Mirrors stageTrackerPersonActsOnPR in Go") still returns (ci && ci.state !== 'passing'), so an approved 085 row with ci_activity.state of running/queued still evaluates true in the SPA.
  • static-src/js/tracker-row-anchor.js:50 places a PR row in STAGE_TRACKER_PR_COLUMN whenever that JS predicate is true, and the server's display_column is only honoured at tracker-row-anchor.js:25 when cur < 80 β€” an 085 row never takes that branch. So the Go stageTrackerNotMergeReadyEvidence change (stage_tracker_vocabulary.go:139-143) is not what the rendered board reads for this case.
  • Consequence: the row still cycles Merge queue β†’ PR in progress β†’ Merge queue as checks re-run, exactly as [reviewer] Review backlog (correctness): Merge-ready 085 flips columns while CI re-runsΒ #16595 describes; only server-side consumers (stage_tracker_merge_train_overlap.go:120, the Go column tests) see the new behaviour.

Suggested fix: apply the same queued/running exemption in tracker-words-core.js:80 (and stage_tracker_sentinel_lane_test.go:60 already loads that function from the built HTML, so a JS-side case for approved+running β†’ merge column can sit beside the Go table cases).

On the earlier intent-alignment comment about the exemption not being gated on an approved review: in production stage_tracker_build.go:537-551 always backfills ReviewActivity on the current head (state unknown when there is no evidence), and unknown != approved still returns true, so the ReviewActivity == nil path is only reachable from the test table β€” but gating on approved as suggested would make the code match the rule the comments state, and is cheap to do while touching the JS.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Evidence bundle `#166046798d3b` sha256:37f4e9a7b6c53dabc0033a3c2ff0379e14761892cbcb673471d431dfd733c8af β€” download from the dashboard or `hivectl review evidence #16604`.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 4, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me. Read stageTrackerPersonActsOnPR and both evidence helpers at 454580f.

  • The change is confined to stageTrackerNotMergeReadyEvidence (src/pkg/dashboard/stage_tracker_vocabulary.go:139); stageTrackerMergeReadyEvidence still requires passing, so a re-running head cannot be promoted into the gate on its own β€” it only stops being demoted out of it.
  • queued / running are the only two in-flight states stageTrackerCIActivity emits (stage_tracker_activity.go:135-138), so the exclusion list is complete; unknown, missing, skipped and failing still read as not-merge-ready, which keeps the #16524 case (CI unknown β†’ PR column) intact.
  • The hive:unauthorized branch (line 117-118) uses !stageTrackerMergeReadyEvidence, so it is unaffected.

One behaviour shift beyond the title to be aware of: a bare 085 row with no review track on the head and CI queued/running now also keeps the gate (previously it moved to PR in progress). That matches the "bare 085 keeps the gate" rule at line 177 of the test, so I think it is intended, but it is not covered by the two new cases.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intent alignment (head 6798d3b) β€” the fix addresses #16595 (approved 085 + CI re-run no longer flips columns) and the new tests cover approved+running/queued. One gap between the stated intent and the code:

Exemption is not gated on an approved review. The PR body and changelog.d/fixed-merge-queue-ci-rerun-flip.md:1 say an approved PR stays in Merge queue while CI re-runs, but src/pkg/dashboard/stage_tracker_vocabulary.go:139-143 drops queued/running from the CI clause unconditionally. The review clause only fires when there is review activity on the head that is not approved, so a 085 PR with ReviewActivity == nil (or review on a stale head) and CI running now returns false and sits in Merge queue β€” before this PR it went to PR in progress. That contradicts the rule the same file documents at stage_tracker_vocabulary.go:101-104 / 127-129 ("Merge queue … only for … a merge-ready PR (review approved, CI green)"). The test table at stage_tracker_item_column_test.go:150-200 has no case for CI running/queued without an approved review.

Suggested fix: exempt queued/running only when stageTrackerActivityOnHead(it, it.ReviewActivity) && it.ReviewActivity.State == "approved", add a table case ("decision with CI running, no review evidence" β†’ trackerColumnPR), and refresh the stale "only state" wording at lines 101-104/127-129.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit a514683 into v5 Nov 4, 2026
79 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-16595 branch November 4, 2026 14:46
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[reviewer] Review backlog (correctness): Merge-ready 085 flips columns while CI re-runs

0 participants