Skip to content

🐛 Activity monitor: one rule for the human-gate pill and its verbs; name the real blocker - #18772

Merged
kubestellar-prow[bot] merged 3 commits into
v5from
fix/tracker-gate-truth
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 3 commits into
v5from
fix/tracker-gate-truth

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #18769

What was wrong

A tracker row showed Needs human · review with Approve, Request changes… and Let hive decide, and the click answered nothing to act on — #18667 is not waiting on that decision.

The pill and the action read two different sources:

  • the pill (stageTrackerHumanGateReasons) lit review whenever the cached reviewer verdict for the head was requires_human (review_activity.state == human_decision);
  • the action (runRowAction -> stageTrackerDecisionTarget / stageTrackerPRParked) acted only on a PR the hive had actually parked on a person.

A verdict never changes for a head. Once a person approved it the PR left 085, the action had no target, and the pill stayed. The same split made Needs human · decision appear on triage-needed and author-owned rows (flagged only by needs_human), and put Let hive decide on hold / sentinel pills of rows that are not parked.

What changed

  • One rule. stage_tracker_gate.go computes, per row, the reasons a person is owed something now, the verbs that would act, and what the item waits on when nothing is owed. The payload carries it as human_gate (rows and the linked PRs that mirror them). In the page, tracker-gate-truth.js gives the pill and runRowAction one shared mapping (stageTrackerGateTargets / stageTrackerGateAccepts): a verb is drawn only where the action has something to act on.
  • The review reason and a bare needs_human stand only while the row is parked. An answered sign-off shows a passive Approved by @login · waiting on … pill; triage and author-owned rows keep their own lead (Accept triage, Adopt).
  • The real blocker is named: conflict, author's turn, required checks failing / stuck / not reported (by name), CI running (n/m), review re-run on the new head, merge queue.
  • Stuck checks. A required check queued or in progress longer than HIVE_TRACKER_CHECK_STUCK_AFTER (default 2h) is listed in ci_activity.checks_stuck and reads stuck, not running; when every pending check is stuck the caption is CI stuck · … and the track stops pulsing.
  • Stale click. The toast says what the item is waiting on and the tracker re-reads the server.

Server endpoints are unchanged: they validate against live GitHub state as before. The refusal in the report came from the page's own target mapping.

Tests

  • testdata/gate_states.json: one table of gate states, run by both stage_tracker_gate_test.go (server rule) and stage_tracker_gate_truth.test.js (the shipped pill renderer and action mapping). Both assert offered <=> accepted for every verb.
  • The 🐛 automerge: refuse an unsigned squash only where the repo requires DCO #18667 shape end to end in Go (CI activity -> stuck checks -> gate) and in JS (no decision buttons, blocker named, stale-click toast and refresh).
  • Stuck threshold and env override; gate mirroring onto linked PRs.

Docs: activity monitor (Settling a human gate), API reference (human_gate, checks_stuck), env-var reference. Changelog fragment included.

🤖 Generated with Claude Code

…ame the real blocker

The gate pill lit 'Needs human · review' from the cached reviewer verdict
for the head while its verbs acted only on a PR the hive had parked on a
person, so a PR whose sign-off a person had already approved kept offering
Approve / Request changes / Let hive decide and every click answered
'nothing to act on' (#18667).

- stage_tracker_gate.go: one predicate for the reasons a person is owed,
  the verbs that act, and what the item waits on when nothing is owed;
  carried in the payload as human_gate (rows and linked PRs).
- tracker-gate-truth.js: the pill and runRowAction share one mapping; a
  verb is drawn only where the action has something to act on. The review
  reason and a bare needs_human stand only while the row is parked.
- Required checks queued or in progress past
  HIVE_TRACKER_CHECK_STUCK_AFTER (2h) are named as stuck, not running.
- A stale click says what the item is waiting on and re-reads the tracker.

Fixes #18769

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 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.

PR Title Relation Files
#18778 ✨ Governor PRs by model: rework per backend and a per-effort breakdown same files src/pkg/dashboard/static/index.html
#18779 ✨ Governor PRs by model: per-repository breakdown and weekly trend same files src/pkg/dashboard/static/index.html
#18780 ✨ Governor PRs by model: what each model's PRs cost the hive to review same files src/pkg/dashboard/static/index.html
#18781 ✨ Spend and contributor run stats by model: add the canonical model name same files src/pkg/dashboard/static/index.html
#18782 ✨ Governor PRs by model: split closed-unmerged PRs into superseded, duplicate and other same files src/pkg/dashboard/static/index.html
#18785 📊 PRs by model: list one model's pull requests same files src/pkg/dashboard/static/index.html
#18786 🐛 Claude model dropdown and price table: add Fable 5.2, Fable 5.1, Haiku 5.5 and the fable alias same files src/pkg/dashboard/static/index.html
#18783 ✨ Evidence summary: change failures (reverts, reopened issues) per model same files src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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

clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • overlap

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity monitor offers Approve / Request changes / Let hive decide on a row with no decision pending

1 participant