Repository navigation
π tracker: merge-failed chevron is scoped to the head it failed on - #15612
Conversation
A refused merge call is recorded with the head it was made on. The stage tracker demotes a refusal to prior_head_merge_failed* hover history once the PR head moves or the record regresses below 080 to wait on CI after the refusal, so the chevron reads the live stage word and never contradicts its caption (hive#15574). Fixes #15611 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Looks correct to me. Read the head at the callers, not just the diff:
- SHA shapes agree.
stage_tracker.go:2320setsHead: pr.HeadSHA(full SHA) and every sweep path handsexecuteMergeEffectthe same fullheadSHA/evaluatedHeadSHAit evaluated, so theEqualFoldinstageTrackerMergeAttemptStale(stage_tracker_merge_gate.go:197) compares like with like; an emptyexpectSHAfrom the relay path (pullrequest.go:476) is treated as "unknown" and falls through to the stage-regression test rather than marking every relay refusal stale. - The stale branch cannot shadow a live merge. The
switchat:236testsInFlight() || Mergedfirst, so a new attempt on the current head always wins over history from an earlier one. - Regression test is narrow on purpose. Only
stage < 080and a CI-pending reason (required-check-pending*or whateverstageTrackerCIStateWordsmaps toCI running) andEnteredAt/RegressedAtafter the refusal counts; a 070 row whose maintainer requested changes keeps theMerge failedword. That matches #15611's scope. - Frontend tolerates the new shape. When no gate existed the stale case now emits a
merge_gatewith emptystateplus theprior_head_*fields;tracker-words.js:715already gates onmerge_gate.statebeing truthy, so no pill is invented and the hover note (stageTrackerPriorHeadMergeFailedNote) is the only visible effect.
TestStageTrackerMergeFailedScopedToHead / ...Node cover both the head-moved and the regressed-to-CI cases.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Looks correct to me. Read at e62083e and type-checked go build ./pkg/dashboard/ on the head.
stage_tracker_merge_gate.go:236-259: the stale case sits between the in-flight/merged case anda.Failed(), so a stale refusal leavesmg.Stateas whateverstageTrackerMergeGatederived from the live stage and only fillsPriorHeadMergeFailed*. The JS word table (tracker-words.js:94,:715) keys offmerge_gate.state, so the chevron cannot read "Merge failed" from that path.- Head comparison is safe: both
MergeAttempt.Headsources are full SHAs (pkg/github/pullrequest.go:476passesexpectSHA,automerge_sweep.go:3200the sweep head) andit.Headispr.HeadSHA(stage_tracker.go:2320), soEqualFoldmismatches only on a real head move β an abbreviated SHA on either side would have made every refusal stale. - The regression branch (
:200-204) requiresstage < 080, a CI-pending reason viastageTrackerCIPendingReason, andEnteredAt/RegressedAtaftera.EndedAt, so a refusal newer than the regression, or a regression for a non-CI reason, still shows the word.TestStageTrackerMergeFailedScopedToHeadhas controls for both. tracker-row.js:389-390only appends the prior-head note when!sg.cap, matching the existing actor/claimant lines.
Docs: the new paragraph in dashboard-sections.md:1217 explains the head scoping, but the table row just above ("any stage after the merge call drew N of M required status checks β Waiting for CI") now only holds while the record stays at β₯080; once it regresses with required-check-pending:* the chevron reads the live CI word instead. Not wrong, just worth a parenthetical if you touch that table again.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 060-reviewed β 050-review-pending: required-check-pending:Sign-off survives the squash |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Re-home the #15612 merge-failed chevron call-site change into stage_tracker_build.go. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Fixes #15611