Skip to content

🐛 fix: explain Activity Monitor merge gates and sweep timing - #15081

Closed
thatguywob wants to merge 2 commits into
hivecommons:v5from
thatguywob:fix/15073-merge-gate
Closed

thatguywob wants to merge 2 commits into
hivecommons:v5from
thatguywob:fix/15073-merge-gate

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

A reviewed PR with pending CI currently reads “Ready for auto merge”, and its spinning glyph only means an agent is working. Nested soaking PRs also lose their countdown.

This change gives 060, 080, 095 and 100 distinct words, consistently shows a labelled merge-gate glyph, and labels agent activity separately. Client-owned sweep clocks publish the current PR evaluation, last completed pass and next scheduled floor pass; event-triggered passes can happen sooner. PR items and nested linked_prs carry merge-gate state, reason and soak timing, and nested soak pills show the time left. Section help, the dashboard guide and a changelog fragment explain the cues. The clocks are observational and do not change merge admission.

Validation: gofmt -l on changed Go files and git diff --check passed. Added regression coverage for all four lanes, concurrent evaluations, queued-pass timing, payload fields, distinct words, accessible glyphs and nested countdowns. Tests were not run locally, as required by AGENTS.md; CI runs them.

Fixes #15073

Hive-Run: #15073
Hive-Plan: merge-gate-observability
Hive-Spec: issue-15073#fix (the issue's Fix section)

— hive: backend=codex


🐝 Hive Agent: contributor | SHA: 39a8e50c8

Distinguish reviewed, ready, soaking and merging rows, expose merge-sweep clocks and preserve gate context on nested PRs. Label the gate glyph and agent activity separately.

Hive-Run: hivecommons#15073
Hive-Plan: merge-gate-observability
Hive-Spec: issue-15073#fix
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 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 hanthor 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login 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 Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Failing checks:

  • build-and-test

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.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

This PR conflicts with v5 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

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.

PR Title Relation Files
#15072 🐛 Adoption: re-adopt when the hive's superseding copy is closed unmerged same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15085 ✨ Activity Monitor: Adopt now and Reroute to another clanker for PRs waiting on a contributor's clanker same files src/cmd/hive/main.go
src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15067 🐛 fix: enable bulk delegation for multi-PR parent selections same files src/pkg/dashboard/static/index.html
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/cmd/hive/main.go
#14822 🐛 fix: preserve owner intent through PR decision paths same files src/pkg/github/automerge/automerge_contributor_lane.go
#15054 ✨ feature: show clanker presence on waiting-on pills same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15074 🐛 Activity Monitor: server-derived stage actor icons, one row per PR, Merged-today counter above the gate same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_ui_test.go
src/pkg/dashboard/static/index.html
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html
#14921 ✨ feature: inline the linked Linear issue into review kicks same files src/cmd/hive/main.go
#15070 ✨ Activity Monitor: presence indicator (clanker online / offline / none) on the waiting-on pill same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15087 🐛 Activity Monitor: Ready for human merge offers Approve & merge / let hive merge; every needs-human state has its action same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15057 🐛 fix: recover orphaned supersede adoptions same files src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
src/pkg/github/automerge/automerge_sweep.go

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob 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.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Decision needed: @clubanderson should decide whether #15081 or #15084 lands for #15073 — both implement the issue's Fix section and both create src/pkg/github/automerge/sweep_clock.go and src/pkg/dashboard/stage_tracker_merge_gate.go, so they cannot both merge.

This appears to duplicate #15084, which implements the same #15073 Fix section against v5. I read both diffs in full against their v5 merge-bases.

What I verified is the same in both:

  • /api/stage-tracker PR items gain merge_gate with state, reason, sweep_running, last_sweep_at, next_sweep_at, soak_until, soak_remaining_seconds (here via the embedded github.MergeSweepTimes in stage_tracker_merge_gate.go:11-17; in #15084 as flat omitempty fields).
  • Identical STAGE_TRACKER_ACTIVE_WORD map in static/index.html — 060 Awaiting merge gate, 080 Ready for auto merge, 095 Soaking, 100 Merging.
  • A sweep clock armed by the automerge lanes, feeding the dashboard.

Where they differ, so they conflict rather than merely overlap — both create the same two new files with different contents:

  • This PR keeps the clock in pkg/github (merge_sweep_clock.go, a MergeSweepClock field on github.Client, client.go) and reaches it from automerge through a transport type-assertion (sweep_clock.go:9-15); #15084 keeps a SweepClock/SweepState inside pkg/github/automerge (sweep_clock.go) and snapshots targeted PRs per pass.
  • #15084 also updates src/docs/api-reference.md for the server.go change and ships a 261-line merge-gate test table; this PR adds the cmd/hive wiring test and merge_sweep_clock_test.go.

Both build (go build ./pkg/dashboard/ ./pkg/github/... ./cmd/hive/). I have not formed a correctness judgement on either beyond that, because whichever one is not chosen is moot. #15084 is authored by the repository owner and is not behind v5, while this one is needs-rebase, so #15084 looks like the natural survivor — but that is the owner's call. I have not closed anything.

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

Decision needed: @clubanderson should decide whether #15081 or #15084 is the fix for #15073 that lands; both implement the same merge_gate payload and 060/080/095/100 vocabulary in the same files and cannot both merge.

This appears to duplicate #15084, which fixes the same issue (#15073) with the same change. I read both diffs in full:

Same semantic change (verified):

  • Same vocabulary: both set STAGE_TRACKER_ACTIVE_WORD 060 → Awaiting merge gate, 080 → Ready for auto merge, 095 → Soaking, 100 → Merging in src/pkg/dashboard/static/index.html.
  • Same payload: both add merge_gate to StageTrackerItem and nested linked_prs (src/pkg/dashboard/stage_tracker.go) with the same field names — state (gate-pending|ready|soaking|merging), reason, sweep_running, last_sweep_at, next_sweep_at, soak_until, soak_remaining_seconds (here: stage_tracker_merge_gate.go:11-17 + pkg/github/merge_sweep_clock.go:11-15; in #15084: stage_tracker_merge_gate.go:36-52).
  • Same files for the clock hooks: automerge_sweep.go, automerge_forgestate.go, sweep_clock.go, dashboard-sections.md, plus a changelog fragment each.

Where they differ — which is why they conflict rather than stack:

  • Clock location. This PR adds pkg/github.MergeSweepClock (per-lane, hung off the client, client.go) and wires it from automerge_contributor_lane.go and cmd/hive/main.go; #15084 keeps it inside pkg/github/automerge as SweepClock with a SweepState snapshot that also records the sweep cause and targeted PRs.
  • omitempty: this PR serialises every merge_gate field always ("last_sweep_at": null until a pass runs); #15084 omits empty ones.
  • Docs: #15084 also updates src/docs/api-reference.md and labels-and-control-signals.md; this PR adds a cmd/hive wiring test instead.
  • Merge state: this PR is dirty against v5; #15084 is blocked (checks), not conflicting.

Both were written from #15073's Fix section, so the overlap is expected, but only one can merge — the second will conflict in all of the shared files above. #15084 is the broader one (sweep cause, API reference) and currently applies cleanly, which points to it as the survivor; the one thing this PR has that #15084 lacks is the automerge_sweep_wiring_test.go check that both the event loop and the ticker arm the clock, which could be carried over.

Flagging for a maintainer: if you agree, this one could be closed in favour of #15084. I have not closed anything.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersession sweep found that this PR's claimed issue is already closed by another merged PR.

  • Claimed issue: hive#15073
  • Closing PR: #15084

Decision needed (@hivecommons): #15084 already merged and closed the claimed issue, but this PR touches files the merged PR did not. Recommended: keep open until the extra changes are reviewed, or close as superseded if they are not wanted. Another option: merge anyway.

Files the merged PR did not touch: changelog.d/fixed-15073-merge-gate.md, src/cmd/hive/automerge_sweep_wiring_test.go, src/cmd/hive/main.go, src/pkg/github/automerge/automerge_contributor_lane.go, src/pkg/github/client.go and 2 more.

This comment is edited in place by the supersession sweep; it is not duplicated.

@hivecommons-hive hivecommons-hive Bot added hive/supersession-pending needs-human stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 28, 2026
@Danathar

Copy link
Copy Markdown
Contributor

Closing as superseded by #15084 (merged 2026-10-28 20:22Z), which fixed #15073. #15084 covers everything the issue's Fix section asked for: merge_gate data on PR items and nested linked_prs fed by a sweep clock, the 060/080/095/100 pill vocabulary, a labelled leading glyph on every gated row, and the legend in dashboard-sections.md. This PR took a different route to the same result (client-owned sweep clocks), so it adds nothing #15084 is missing. Thanks @thatguywob.

@Danathar Danathar closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. hive/supersession-pending needs-human needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue

Projects

None yet

2 participants