Skip to content

🐛 fix(dashboard): name the blocking PR on tracker rows and keep webhook unblocks from being overwritten - #14965

Closed
hivecommons-hive[bot] wants to merge 2 commits into
v5from
scanner/fix-14952
Closed

hivecommons-hive[bot] wants to merge 2 commits into
v5from
scanner/fix-14952

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Two Activity Monitor problems from #14952.

The blocked pill never named its blocker. Review-backlog spin-offs carry <!-- hive:blocked-on pr=owner/repo#N -->, and the enumeration files them with the reason blocked on owner/repo#N. The tracker still showed a bare blocked pill with the caption "No stage recorded yet". The stage tracker now parses the marker from the issue body, or from the filtered reason when it has no body, into a new additive blocked_on_pr: {repo, number, url, state} field. state comes only from what the hive already holds: the response's open PR rows (status snapshot plus forgestate overlay) and the recent-merge ring. It never makes a GitHub call. blocked_on (the GitHub dependency list from #14765) is unchanged. In the UI the pill reads blocked on #N and links to the PR. Its tooltip/aria-label reads Blocked on PR owner/repo#N (open) — lifts when it merges; re-triage if closed unmerged, the caption reads Blocked on PR #N — lifts when it merges, and the row tooltip carries the same text.

Rows stayed blocked after the hive's own unblock. A reconcile pass that started before the unblock and finished after it stored its pre-unblock copy with lastActionable.Store, overwriting the webhook-patched snapshot. Now the snapshot patcher remembers each applied webhook re-read on the snapshot (WebhookReads, in-memory only). Before a reconcile pass (eval cycle or manual rescan) publishes its result, it replays the reads fetched after the pass started onto that result. This is a compare-and-swap, and the patcher now swaps the same way, so a patch that lands in between is not lost either. The existing monotonic updated_at guard now also covers sidelined rows (WorkDetailsByRepo), so a replayed read can never move a newer listed copy backwards.

The other half of part 2 (an ItemRefreshHook on every hive-side blocked removal that queues a targeted re-read) is tracked in a child issue. The root cause is fixed here without it.

Closes #14952

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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

@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
#14921 ✨ feature: inline the linked Linear issue into review kicks same files src/cmd/hive/main.go
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/cmd/hive/main.go
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html
#14821 🐛 fix: preserve supersession decisions across stage reconciliation same files src/cmd/hive/main.go
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html

@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 Oct 28, 2026
…ok unblocks from being overwritten

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot changed the base branch from v6 to v5 October 28, 2026 14:25
@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

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 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.

Decision needed: @clubanderson should decide whether #14965 is closed in favour of #14957, which carries the same blocked_on_pr / CAS-publish change for #14952 plus the ItemRefreshHook and docs this PR defers.

This appears to duplicate #14957, which makes the same change for the same issue (#14952) and conflicts with it on src/pkg/dashboard/stage_tracker.go, src/pkg/github/webhook_item_patch.go, src/cmd/hive/eval_cycle_source.go, src/cmd/hive/main.go, src/cmd/hive/repos_rescan.go, src/pkg/github/issue_blocked.go, src/pkg/github/client.go and static/index.html. Both cannot merge.

What I verified by reading both diffs in full:

  • Identical design, down to names: both add StageTrackerItem.BlockedOnPR *StageTrackerBlockedOnPR with JSON blocked_on_pr: {repo, number, url, state} immediately after BlockedOn, the same caption Blocked on PR #N — lifts when it merges, the same pill text blocked on #N and the same tooltip string. Both add a marker-or-reason parser in issue_blocked.go (ParseBlockedFilterReason here, ParseBlockedOnReason/BlockedOnTarget in #14957).
  • Same fix for the stale-blocked race: both turn snapshotPatcher.apply into a CompareAndSwap loop and replace the two lastActionable.Store sites (main.go, repos_rescan.go) with a publish helper that replays remembered webhook re-reads newer than the pass's GeneratedAt onto the result. This PR remembers them as a 2h-pruned slice (WebhookReads, pruneWebhookReads); #14957 as a 4096-bounded map (WebhookPatches, evictOldestWebhookPatch).
  • Where they differ, #14957 is a superset: it also adds pkg/github/item_refresh_hook.go + (*Client).unblockIssue at the hive-side blocked removals (this PR's body explicitly defers that to a child issue), resolves a closed state via ForgeState (this PR only resolves open/merged), ships the operator docs (docs/dashboard-sections.md, docs/labels-and-control-signals.md) and a JS UI test. On the survivor I also checked the call order: finish() sets modBlocked before stageTrackerBlockedOnPR runs (stage_tracker.go hunk @1571), and resp.RecentlyMerged is filled at stage_tracker.go:1328 before the state resolver captures it.

Flagging for a maintainer: if you agree, this one could be closed in favour of #14957 — same change, broader scope, authored by the repo owner. I have not closed anything.

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

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 28, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue 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 Author

Needs a decision, not a merge:

Head: verdict requires_human @2b1f7f8, 64/65 checks green, 1 pending, DCO yes, soak 0s of 30m0s.

What to do: approve this head (2b1f7f8) to merge as-is, or leave a changes requested review (or reply /hive decision <what to change>) and the hive will push the fix.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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

  • Claimed issue: hive#14952
  • Closing PR: #14957

This PR touches files the merged PR did not, so the hive is resolving it itself, but GitHub refused to update head 2b1f7f8 onto v5 (merge conflict between base and head). The fix lane owns the rebase; the sweep re-measures the diff once a new head lands.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Closed as superseded by #14957 by @clubanderson from the Hive dashboard.

@hivecommons-hive hivecommons-hive Bot added the hive/superseded Closed by Hive: a different merged PR already landed this change label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot closed this Oct 28, 2026
@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/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 28, 2026
hivecommons-hive Bot pushed a commit that referenced this pull request Oct 28, 2026
…als out of the merge gate (#15011)

* Close superseded hive PRs automatically and re-stage adopted originals out of the merge gate

A hive-authored PR whose closing targets are all closed, one of them by a
different merged PR, and whose head conflicts with the base (or whose files
that PR already covers) is now closed by the hive itself as hive/superseded
with a notice naming the superseding PR: in the self-authored auto-merge
lane before any review is dispatched, in the supersession sweep when the
rebase is refused for a conflict, and in close-on-merge of the superseding
PR. New knob governor.auto_close_superseded (default on); human-authored PRs
are never auto-closed.

A contributor PR adopted in supersede mode leaves stage/085-needs-decision
in the adopting pass when the park was only the review swarm's
requires_human verdict, renders in the CI/Review column with an
'Adopted -> #N' pill, and the duplicate-fix sweep no longer closes the
superseding App PR as a duplicate of the PR it supersedes.

Evidence: #14965 (closed by #14957 for #14952), #14975 -> #14980,
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
#14947 -> #14977.

* Move changelog fragment to repo-root changelog.d

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

---------

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
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. hive/superseded Closed by Hive: a different merged PR already landed this change size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: blocked pill never names the blocking PR, and hive's own unblock leaves rows blocked until the next enumeration

0 participants