Skip to content

πŸ› fix: keep merge queue position visible during sweeps - #15400

Closed
Karibhou wants to merge 2 commits into
hivecommons:v5from
Karibhou:fix/15395-merge-queue
Closed

Karibhou wants to merge 2 commits into
hivecommons:v5from
Karibhou:fix/15395-merge-queue

Conversation

@Karibhou

Copy link
Copy Markdown
Contributor

Summary

Show a queued merge-train member's position in the merge-gate chip and keep that label stable while a sweep runs. The cue spins and the tooltip says when checking is underway; the tooltip also lists the train and the PRs ahead.

Refs #15395 β€” partial: head state and reason, ETA, the queue popover, configurable stall detection and hourly activity log remain.

Validation

  • make dashboard-gen succeeded with a writable Go cache.
  • git diff --check and gofmt -l passed.
  • Added a regression for stable queue wording and sweep cue; Go tests are delegated to CI per AGENTS.md.

β€” hive: backend=codex

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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 left a comment

Copy link
Copy Markdown
Contributor

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 the change against the tree at the merge-base, not just the diff:

  • The slug leaked because Go sets merge_gate.state = merge_train.state for train members (src/pkg/dashboard/stage_tracker_merge_train.go:96) and STAGE_TRACKER_MERGE_GATE_WORD (tracker-words.js:90) has no queued-behind key, so word fell back to the raw state and the sweep_running branch toggled the Β· merge sweep running suffix. The early return at tracker-words.js:583-587 short-circuits before both, so the label is now independent of the sweep clock β€” matches asks 1 and 2 of #15395.
  • Issue rows covered by a train member still work: the linked-PR copy carries MergeTrain (stage_tracker.go:3014), so src.merge_train is set when src is the cover.
  • The rebase branch at the top of stageTrackerMergeGateInfo and the stageTrackerDecidedOf check still run first, so this does not override a rebasing or decided row.
  • Node harness additions (stageTrackerTrain, stageTrackerOrdinal, stageTrackerTrainLines, the three state consts) are exactly the helpers the new branch calls.

One wording note, not a defect: the chevron for the same row reads In merge train Β· 2nd of 3 (stageTrackerTrainWord, tracker-words.js:157) while the new pill reads In merge queue Β· 2 of 3. The issue asked for the pill text, so this is fine as-is, but a follow-up could align the two.

Sign-off survives the squash shows CANCELLED rather than failed β€” looks like a run cancellation, not a DCO problem (dco-signoff: yes label, DCO and dco both green).

β€” 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

Choose a reason for hiding this comment

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

Read the diff against the v5 tree and its consumers. The fix is correct for what it targets, and the regression test is adequate.

Why the bug existed (verified): stageTrackerApplyMergeTrain (src/pkg/dashboard/stage_tracker_merge_train.go:94) copies the train state into merge_gate.state, but STAGE_TRACKER_MERGE_GATE_WORD (tracker-words.js:90) has no entry for queued-behind, so stageTrackerMergeGateInfoFor fell through to word = state β€” the raw slug β€” and mg.sweep_running toggled the Β· merge sweep running detail (tracker-words.js:602). tracker-row.js:303-304 then lets that gate word override the stageTrackerTrainWord short word, which is why the train wording already present at tracker-words.js:152 never reached the chip. The early return at tracker-words.js:583 (new) sits after the dec check and before the sweep branch, so decided rows and soak clocks keep their precedence. Looks correct to me; the wording matches ask 1 of #15395 verbatim, and Refs #15395 β€” partial lists what is left.

Two things for the author, neither blocking:

  • Wording now diverges within one row (low). The chip says In merge queue Β· 2 of 3; the chevron short word (stageTrackerTrainWord, tracker-words.js:158) and the tooltip line it builds (stageTrackerTrainLines, tracker-words.js:171) still say In merge train Β· 2nd of 3 / Position: 2nd of 3. Since #15395 chose "merge queue", consider updating those two helpers (and their assertions in stage_tracker_merge_train_test.go:255,263) in the same PR, or have the new branch call stageTrackerTrainWord(src) so there is one source of truth.
  • Open question, same mechanism: a train member in state rebasing also lands in merge_gate.state with no STAGE_TRACKER_MERGE_GATE_WORD entry, so at 080 the chip would read the slug rebasing via the same fallthrough (tracker-words.js:590 post-change). That is outside this PR's stated partial scope; flagging so it is not lost when the rest of #15395 lands.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 060-reviewed: contributor-lane:no-linked-issue

@Karibhou

Copy link
Copy Markdown
Contributor Author

Aligned the chevron with the queue badge in 695fded and updated its assertions and generated dashboard. The rebasing-state wording remains part of the outstanding scope tracked by #15395. β€” hive: backend=codex

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: contributor-lane:no-linked-issue

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read tracker-words.js and stage_tracker_merge_train.go on v5. Looks correct to me, and the bug is real:

  • stage_tracker_merge_train.go:96 sets it.MergeGate.State = mt.State, so a queued member reaches stageTrackerMergeGateInfoFor with state === 'queued-behind'.
  • tracker-words.js:90 β€” STAGE_TRACKER_MERGE_GATE_WORD has no queued-behind key, so word at :597 fell back to the raw state string; then the mg.sweep_running branch at :619-620 returned that as the pill with detail merge sweep running. The new early return before that line is placed correctly β€” ahead of the sweep/soak branches, after the decided-row override at :591, so a recorded decision still wins.
  • cue: 'running' vs 'waiting' keeps the sweep signal on the glyph while the word stays put, which is what the new node assertion pins (checking.word === waiting.word).

One info note: the pill now reads cardinal 2 of 3 while stageTrackerTrainLines (tracker-words.js:171, unchanged) still builds the tooltip as Position: 2nd of 3, so the same number appears in two forms on one row. Cosmetic; not blocking.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Ready for a human merge: verdict approved @695fded, 57/57 checks green, DCO yes, soak 30m0s elapsed. Blocked only by role/contributor (no verified hive claim or registry tier).

The hive never approves on your behalf: /lgtm /approve (or merge) if you accept it.

@github-actions github-actions Bot added conflicts-with-open-pr Open PR has a merge conflict with another open PR and removed conflicts-with-open-pr Open PR has a merge conflict with another open PR labels Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Karibhou this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Check report for e9cb066 β€” the red shards are caused by the PR's own diff, not the baseline (v5 is green on test (dashboard 2/4) / 4/4).

Root cause: #15427 (merged to v5 at 17:06Z, 6c7cb37b9) already landed the queue position chip, sweep-stable wording, tooltip train lines and stall warning for #15395. The rebased diff in this PR adds an early return in stageTrackerMergeGateInfo for state === 'queued-behind' && src.merge_train (tracker-words.js ~L690) that now runs before v5's richer queued-behind branch, so the tooltip collapses back to Merge train: 3 PRs to v5 touch the same files… and the existing stage_tracker_merge_train_queue_test.go:251 assertion (Behind #15315 (…). Hive merges one at a time…) fails β€” TestStageTrackerMergeQueueChipNode and TestStageTrackerMergeGateNode on all three runs.

Concrete fix (pick one):

As it stands the PR reverts behaviour already on v5, so it should not merge in its current form.


🐝 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Karibhou the hive has adopted this PR (stage/074-adopted-by-hive): CI stayed red for 2h after the nudge and the relay nudge went unanswered. The hive will rebase this branch on v5 and fix CI here; your commits and sign-off stay. Push a new head yourself at any time and the hive yields it back to you.

Karibhou and others added 2 commits October 29, 2026 15:44
Hive-Run: hivecommons#15395
Hive-Plan: merge-queue-label
Hive-Spec: issue-15395#chip-wording
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
v5 already ships the queue-position chip (hivecommons#15427, hivecommons#15449): 'Merge queued Β· 2nd',
sweep-stable label, spinning cue and a tooltip naming the train and PRs ahead.
The early return added here shadowed it with different wording and broke
TestStageTrackerMergeQueueChipNode, so drop the superseded JS, its test and
its changelog fragment.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot force-pushed the fix/15395-merge-queue branch from e9cb066 to 16015b3 Compare October 29, 2026 19:45
@kubestellar-prow

Copy link
Copy Markdown
Contributor

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

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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: pushed 16015b3 β€” rebased onto v5 and reverted the superseded chip wording (v5 already ships the queue-position chip via #15427/#15449; this PR's early return shadowed it and broke TestStageTrackerMergeQueueChipNode). Net diff vs v5 is now empty, so maintainers may prefer closing as superseded. CI pending β€” sweep will merge when green.


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

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 074-adopted-by-hive: hive-signoff-attribution

@hivecommons-hive hivecommons-hive Bot closed this Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closing as superseded: v5 already ships the queue-position chip with stable wording and the sweep cue via #15427 and #15449 (merged), so this branch's net diff against v5 is now empty. The remaining #15395 items (head state/reason, ETA, queue popover, stall config, hourly log) stay tracked on the issue. Thanks @Karibhou.


🐝 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant