Skip to content

πŸ› dashboard: 085 row stops asking for an approval the head already has - #18950

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/085-approve-when-approved
Nov 18, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/085-approve-when-approved

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

A PR can sit at 085 for some other reason after a trusted merger has already approved its head. The Activity monitor row still asks for that approval: it shows the reviewer's requires_human question and an enabled Approve.

With this change, the stage pass records the head's trusted approval on the stage record. The 085 row reads it from there and does three things:

  • it skips the question the approval already answered;
  • it shows the real blocker instead;
  • it disables Approve and names who already approved.

This is the dashboard follow-up noted on #18849.

What happened

projectbluefin/utah-packages#1013, live on the board at 6:40 AM EST, 11-18:

  • Stage: 085, reason fork-guard:Canary.
  • Head: 4b9cac9, approved on GitHub by a trusted maintainer.
  • Row: asked "A reviewer handed this to a person: security requires human: …" and offered Approve, enabled.

#18849 fixed the 085 comment for this case. The row is still wrong because the dashboard learns human_approver only from the :human-approved@ reason suffix, which is written at 090. At 085 the reason is fork-guard:Canary, and the approval the stage pass read (obs.Detail.HumanApprover) was never persisted.

What changed

  • Stage record. New Record.ApprovedHead / ApprovedBy, set by Store.NoteHeadApproval. The stage pass writes them when the head's trusted approval is known, whether a lane noted it or the 085 route read it (headTrustedApproval, πŸ› stage: the 085 note stops asking for an approval the head already hasΒ #18849).
    • This is display evidence only. It is not a trust override like AdmittedBy, and no lane reads it.
    • Record.HeadApprover(head) returns nothing once the head moves.
  • Tracker row. At 085, when the reason carries no approver, human_approver comes from the record for the current head.
  • Decision popover (decisionForPR). With an approver on the row:
    • the reviewer's decision question, hand-off summary and "handed this PR to a person" wording are skipped, since that approval answers them, and the next question (fork guard, hold, …) is asked instead;
    • Approve is disabled with "@login already approved this head on GitHub; another approval does not clear what holds it here."
    • On a sentinel alert Approve stays enabled, because on the row it also clears the alert's label.

Tests

  • stage_tracker_085_approved_test.go:
  • store_head_approval_test.go: NoteHeadApproval and HeadApprover, covering a missing record, empty head or login, head match, and case.

Locally I ran only gofmt -l, since AGENTS.md bans local go test/go build/go vet. CI is the test run.

Not in this PR

  • Withdrawn approvals. A dismissed approval on the same head is not cleared from the record until the head moves. The stage pass only notes approvals it reads; it does not re-read for absence.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

At 085 the Activity monitor learned a head's trusted approver only from
the `:human-approved@` reason suffix, which is written at 090. A head a
trusted merger approved but that stays at 085 for another blocker
(projectbluefin/utah-packages#1013: fork-guard:Canary) kept showing the
reviewer's requires_human question and an enabled Approve.

- The stage pass records the head's trusted approval it found
  (obs.Detail.HumanApprover for the head) on the stage record:
  Record.ApprovedHead / ApprovedBy, display evidence only.
- The tracker row reads it at 085 when the reason carries no approver.
- decisionForPR skips the reviewer question the approval answered and
  disables Approve with the approver named, except on a sentinel alert,
  where Approve also clears the label.

Follow-up to hivecommons#18849.

Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 18, 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 clubanderson 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 Nov 18, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

@Danathar 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 is behind the base and Hive cannot update it; enable "allow edits by maintainers" or 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 (6 waiting): fixes are handed out before new work as soon as you have capacity.

@Danathar Danathar changed the title fix(dashboard): 085 row stops asking for an approval the head has πŸ› dashboard: 085 row stops asking for an approval the head already has Nov 18, 2026
OpenPrs holds any; vet refused the field access.

Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18945 πŸ› automerge: name held workflow runs and stop base-refreshing them same files src/pkg/dashboard/stage_tracker_decision_pr.go
src/pkg/github/automerge/automerge_stage_labels.go

@clubanderson clubanderson added the author/human A person pushed this PR themselves label Nov 18, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 7146d3c into hivecommons:v6 Nov 18, 2026
76 of 77 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Evidence bundle `#189507f33ab7` sha256:58e9c1ca7697aed2d242f1b1e8f22a83ba97361862567a40ba7c5b44637f8cdc β€” download from the dashboard or `hivectl review evidence #18950`.

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

Labels

author/human A person pushed this PR themselves dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants