Repository navigation
π fix(labels): a later hive/verified-open or hive/already-done replaces the other - #16842
Conversation
β¦ogether projectbluefin/testsuite#1023 got hive/already-done (11-04 01:47Z) then hive/verified-open (03:13Z) and the inbox offered it as "verified done but could not close". The relay's verified-open now removes the done labels, a verified already-done removes verified-open (both best-effort), and the issue stage sweep settles an issue already wearing both from its label events: the later add stands, the other comes off through the write-back gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
docs-currency β read at head c5f842d. The new paragraph under hive/verified-open (src/docs/labels-and-control-signals/reference.md:653) matches the code (issue_request_watcher.go:869-878, contribute_verdict_settle.go:301-304, done_verdict_labels.go:23-57). The surrounding operator text was not brought along, though:
-
reference.mdstill says only a human removes either label. Both "Release or override" lines are unchanged β verified-open at line 659 (post-diff; 657 pre) "Human removes when the issue is really done, or close-on-merge closes the issue", already-done at line 673 "Human removes/reopens or confirms reporter-gated bugs" β and the summary-table rows at lines 134β135 ("Removed by" column) say the same. The#### hive/already-donesection (line 663ff) says nothing about verified-open removing it. An operator reading the already-done entry, or the table, will not learn that the hive now takes already-done off on a later verified-open (relay or sweep).**Release or override.** Human removes when the issue is really done, or close-on-merge closes the issue. Hive removes it when a later contributor verified already-done verdict lands, or when the issue stage sweep finds `hive/already-done` added after it (`src/pkg/github/done_verdict_labels.go`).and for the already-done section:
**Release or override.** Human removes/reopens or confirms reporter-gated bugs. Hive removes the default `hive/already-done` when the label relay adds a later `hive/verified-open`, or when the issue stage sweep finds `hive/verified-open` added after it (`src/pkg/github/done_verdict_labels.go`).Please mirror the same in the "Removed by" cells of rows 134β135 (and add
issue stage sweep, label relayto the verified-open row's "Checked by"/"When", since the sweep now reads it). -
src/docs/dashboard.md:623-626and:814-817describe an issue wearing both as a steady state ("Other done labels still apply"; "hive/already-doneandhive/covered-by-prare unaffected"). The band rule is indeed unchanged, but after this PR the pair is transient β one sentence noting that the stage sweep settles it (later verdict stands) would stop an operator expecting #1023-style rows to persist in the confirm & close band. -
(low)
src/docs/github-write-surface.md:102-104says the hive "removes those labels itself" forhive/likely-done/hive/covered-by-pron a verified-open add; it now also removeshive/already-doneβ worth adding to the list.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Style review at c5f842d (read the diff plus 1. 2. Review findings from Correctness review @ c5f842d 1. The sweep heal β the only path that fixes an issue already wearing both labels β is gated more strictly than every sibling label write in the same loop, so it is likely a no-op on the very issue that motivated the PR. (
That gate is not what the rest of this loop applies to issue labels: Suggested fix β treat it like - item, err := client.WritebackItemForNumber(ctx, in.Repo, in.Number)
- if err != nil {
- return false
- }
- if d := client.WritebackAllowed(owner+"/"+name, item, writeback.KindStageLabel, stale); !d.Allowed {
- return false
- }
- if err := client.RemoveLabelsFresh(ctx, in.Repo, in.Number, stale); err != nil { // writeback:gated
+ // Same policy as healBackendClaimedByLabels one line above: the labeler
+ // gates PRs; an issue's hive-owned labels are the intake pipeline's.
+ if err := client.RemoveLabelsFresh(ctx, in.Repo, in.Number, stale); err != nil { // writeback:gated(and drop the now-unused Minor, no action needed: after the heal, Review findings from HUMAN DECISION NEEDED β Security perspective, read at head c5f842d. Agent-initiated removal of a hive-controlled verdict label (in-scope, medium)
Why this is a trust-boundary change rather than cleanup:
The sweep path ( If the intended policy is "later verdict wins regardless of who issued it", that's a role/trust decision a maintainer should own explicitly (and the (and drop Review findings from Read the diff against the tree at the PR head ( One low note:
The docs changes match the behaviour. CI is still pending at |
|
@Danathar this PR is back in your court ( Review asks:
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 (8 waiting): fixes are handed out before new work as soon as you have capacity. |
Docs-currency review on hivecommons#16842: the reference rows and detail sections name the relay and the issue stage sweep, dashboard.md says the sweep keeps the later verdict, and the write-surface page lists hive/already-done among the labels the relay removes on a verified-open add. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
Docs-currency review addressed in 86f250e:
I merged v6 in as 86f250e. Docs citations (2006), the writeback ratchet and the relay and reconcile tests pass. |
|
Correction to my last comment: the v6 merge in it had hit a conflict in |
Conflict in src/docs/dashboard.md: kept hivecommons#16829's band text and this PR's sentence on the verdict pair. Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
Correction: my previous two comments are wrong. Neither the docs commit nor the v6 merge has reached this branch: GitHub rejects every push to it with |
There was a problem hiding this comment.
Read against the v6 tree. Looks correct to me.
What I verified:
- All three paths write through
RemoveLabelsFresh(src/pkg/github/stage_labeler.go:119), which re-reads the item and skips labels not present β so the relay'sRemoveLabelsFresh(already-done, likely-done)after a verified-open add is a no-op on issues that never wore them, not a 404. reconcileDoneVerdictLabels(done_verdict_labels.go) only reaches the events API whenin.Labelscarries both labels, bails on a tie or a missinglabeledevent, and gates the write withWritebackAllowed(KindStageLabel)β consistent with the body's "the later add stands; failed lookup does nothing".- Nothing else in
SyncIssueStageLabelsWithreadsAlreadyDoneLabel/VerifiedOpenLabel, so the stalein.Labelssnapshot after the removal does not affect the rest of that iteration. go build ./pkg/github/ ./pkg/dashboard/passes; onlytideis still pending on this head.
Not a defect, just confirming the scope note: markAlreadyDoneIssue adds the configured label but removes the default VerifiedOpenLabel, and the sweep reconciles only the default hive/already-done β matches what the Notes section says.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read the three write paths against the tree at merge-base (76d0ed0, base v6). Looks correct to me.
What I verified
- The sweep (
src/pkg/github/done_verdict_labels.go:23-50) only reads issue events when both labels are worn, bails on a read error, a missing add, or equal timestamps, and goes throughWritebackAllowedbefore the remove.KindStageLabelfor a hive-owned non-stage label matches the existing use forneeds-humaninsrc/cmd/hive/dependency_bot_conflicts.go:364and the kind's own doc ("hive-owned ownership label",pkg/writeback/kinds.go:40-42). latestLabeledAt(:60-84) paginates and keeps the latest add per label, so a re-added label wins β the test matrix exercises both re-add orders.- Both best-effort removals (
issue_request_watcher.go:869-877,contribute_verdict_settle.go:301-304) useRemoveLabelsFresh, which re-reads and skips absent labels (stage_labeler.go:116-137), so the common case where the other verdict is not present costs one read and no write, and no spurious warning. - Hook placement in
SyncIssueStageLabelsWith(issue_stage_labels.go:445) is next tohealBackendClaimedByLabels, inside thepolicy.Enabledgate, and counts towardres.Writes. - Docs updated in all three places that describe the pair (
dashboard.md,github-write-surface.md,labels-and-control-signals/reference.md), and the reference explicitly scopes the sweep to the defaulthive/already-donespelling, which matches the code (AlreadyDoneLabelconstant, nothub.contribute_already_done_label).
Observation, not a defect
"Later verdict wins" means a contributor's API-verified already-done can take off an agent's earlier hive/verified-open even when both cite the same merged PR. The reference doc now states that rule plainly, so it is a decided policy rather than an open question β noting it only so a maintainer skimming the diff sees the trade-off was intentional.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Executive summary
projectbluefin/testsuite#1023 wears both
hive/already-done(11-04 01:47Z) andhive/verified-open(03:13Z, scanner: "Nothing more can be implemented here until #706"). The inbox offers it as CLOSE, "verified done but could not close".The two verdicts contradict each other, and nothing ever took the older one off. Now each verdict removes the other as it lands, and the issue stage sweep settles issues already wearing both: the later add stands.
What
hive/verified-openhive/already-doneandhive/likely-done(best-effort)hive/verified-openstayshive/verified-open(best-effort)Why
bands_verified_open_11722_test.gosays "already-done + verified-open stays done".hive/verified-opencancels only the heuristichive/likely-done.How
issue_request_watcher.go: after the relay's add, if the request addedhive/verified-open,RemoveLabelsFresh(already-done, likely-done). A failure is logged, not returned: the verdict landed, and the sweep settles the pair.dashboard/contribute_verdict_settle.go: after the already-done label lands,RemoveLabelsFresh(verified-open).done_verdict_labels.go:reconcileDoneVerdictLabels, called from the issue stage sweep's per-issue loop.labeledevent. If either is missing or they tie, it does nothing.WritebackAllowed(KindStageLabel).Tests
TestReconcileDoneVerdictLabelsKeepsTheLaterVerdict(6 rows, incl. #1023's order, re-adds, missing events)TestSyncIssueStageLabelsSettlesDoneVerdictPair(through the sweep)TestLabelRelayVerifiedOpenRemovesDoneLabelsTestVerdictSettleGH_MarkAlreadyDone_RemovesVerifiedOpengo test ./pkg/github/... ./pkg/writeback/ ./pkg/dashboard/check-docs-citations.py src/docsNotes
hive/already-doneis reconciled. A hive that renamedhub.contribute_already_done_labelkeeps today's behaviour for that label; the docs say so.hive/already-donethere, provided the write-back gate allows the write.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1