Skip to content

πŸ› [v6] contribute: never dispatch rework for a merged or closed PR - #17403

Merged
hivecommons-hive[bot] merged 5 commits into
hivecommons:v6from
Danathar:fix/v6-contribute-no-rework-for-merged-pr
Nov 9, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
hivecommons:v6from
Danathar:fix/v6-contribute-no-rework-for-merged-pr

Conversation

@Danathar

@Danathar Danathar commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The hive sent Danathar's relay a fix-pr task for #17385 more than an hour after that PR merged, and the relay then ran the one task twice. About 4.5 minutes were lost and nothing was pushed. Five separate bugs lined up to cause it: the fix queue stored the repo under the wrong name, so the entry was never cleared; nothing checked that a queued PR was still open; a fix handed out between tasks was sent to the relay twice; the relay accepted both copies; and the hub then revoked the run that should have survived. With this PR, a merged or closed PR leaves the fix queue instead of going to a relay, fix tasks name the repo as owner/name, a fix handed out between tasks is sent once and is not revoked, and the relay runs any one fix task in only one place.

What went wrong

Evidence from the hivecommons hive (hosted-kubestellar-hive-ojv6), checked on GitHub:

  • 12:32:00Z: the hive posted the stage-072 nudge on ✨ feat(settings): the GitHub API hourly caps per agent can be set from the dashboard and the admin MCPΒ #17385 (reason=conflicting head=6be425a… mode=queued, "Queued in your relay fix queue (1 waiting)"). That is the only nudge on the PR. Its comment was never edited afterwards.
  • New heads (f55e50d, then 9715e04) were reviewed at 13:05Z and 13:12Z. The PR merged at 13:13:58Z. The "merged by Hive trusted-author auto-merge" comment followed at 13:14:05Z.
  • Nothing happened on the PR after the merge. There were no reviews, issue comments, review threads or other timeline events after 13:14:07Z. So no post-merge nudge queued the fix.
  • At about 14:25Z the relay logged Task assigned for that PR (kind fix-pr, repo hive), Task prompt sent to CLI and spawning a parallel fix session (1/1). It then logged Task revoked: fix-danathar-1 β€” no active lease for this task. It also logged Ignoring authorized-repo candidate that is not shaped like owner/name: "hive".

I could not read that hive's log for the contributor nudged / fix queue enqueue lines, because I have no access to the hivecommons hive's logs. So I worked out from the code which path queued the fix. Only two code paths put a PR in a contributor's fix queue:

  1. The stage-072 nudge (automerge_contributor_nudge.go calls ContributeWSHub.Nudge). It runs only for an open PR that a sweep has just listed.
  2. An operator reroute (Reroute, from the repo-item decision API). It reads the PR first and refuses one that is not open.

Neither one can queue an already-merged PR. Here is what happened instead, step by step:

  • The 12:32Z nudge was stored under the wrong name. Its queue entry was keyed on the bare repo name hive, because Nudge uses the nudge's Display, the bare configured name on a hive whose repos are listed without the org.
  • The entry was never cleared. When the PR left stage 072, the stage engine called Resolve("hivecommons", "hive", 17385). Resolve looks up hivecommons/hive#17385, which does not match the stored name, so the entry stayed in the queue.
  • Dispatch never checked the PR's state. When the relay next asked for work (~14:25Z), the queue handed it the fix with no check that the PR was still open.
  • The task was sent twice. For a fix handed out when the relay asks for work, sendFixTask pushed the task_assign itself, and then the ready handler sent the returned copy as well. The relay ran the first copy as its primary task. The second copy arrived while that task was running, so it looked like a mid-task interrupt, and the relay spawned a parallel session for the same task_id.
  • The primary run was killed. Its progress report reached the hub, which had no lease for a fix task, and the hub answered task_revoke.

Refs #17385

What changes

  • Owner/name everywhere. A nudged PR is queued under owner/name. Resolve now finds it, and the fix task the relay receives carries hivecommons/hive, not hive.
  • Only open PRs are dispatched. Just before a queued fix is handed out, the hub checks that its PR is still open:
    • It uses the state cache when the cache holds the repo. That is free while the cached copy is within its freshness limit; an older copy costs one re-read.
    • Otherwise it makes one PR read, tagged hive:contribute_fix_dispatch.
    • A merged or closed PR is removed from the queue and logged as fix queue: dropped a PR that is no longer open.
    • If the state cannot be read, the fix is not dispatched on this pass and stays queued; the next pass tries again. A relay asking for its next task gets ordinary work meanwhile rather than sitting idle (follow-up commit ddaf859).
    • Only the PRs about to be dispatched are checked. A new fixqueue.Next previews them without taking them from the queue.
  • One copy per fix handed out between tasks. sendFixTask no longer pushes a fix that is handed out when the relay asks for work, because the ready handler already sends it.
  • No revoke for an in-flight fix. A progress report for a fix task in flight on the connection is no longer treated as an attempt to resume a lost task, so the hub no longer answers it with task_revoke.
  • Relay: one fix task, one place. A second task_assign with the task_id of a fix the relay is already running is ignored, whether that fix runs as the primary task, in a parallel session, as a preempting fix, or deferred. The log names where the fix runs, and a fix that becomes the primary task logs that too.

Out of scope: review-verdict routing and merge policy.

Files

  • src/pkg/dashboard/contribute_fixqueue.go: owner/name queueing, the open-state check, sending a fix handed out between tasks only once
  • src/pkg/dashboard/contribute_ws.go: progress reports for an in-flight fix are not revoked; test hook field
  • src/pkg/fixqueue/fixqueue.go: Next, plus the shared dispatch guards and coalescing rule
  • bin/contributor-relay.js: duplicate fix-pr guard and path logging
  • src/docs/contributor-relay.md, changelog.d/fixed-contribute-no-rework-for-merged-pr.md
  • Tests: contribute_fixqueue_closed_pr_test.go (new), fixqueue_test.go, contributor-relay.test.js; two existing tests adjusted for the new sendFixTask argument and a fixture PR the GitHub mock does not serve

Tests

No tests were run locally (repo policy); CI is the check. Each test below would fail on be24159c0:

  • TestFixQueueBareConfiguredRepoQueuesOwnerName: a nudge with Display: "hive" gets a task with repo hivecommons/hive, and Resolve clears the queued entry. On the tip, the repo is hive and the entry survives Resolve.
  • TestFixQueueBoundaryDropsPRThatMergedWhileQueued: a PR that merged while queued is dropped when the relay next asks for work. No task goes out, and the relay falls through to issue selection. On the tip, the fix goes out.
  • TestFixQueueDispatchSkipsClosedPRAndServesTheNextOpenOne: only the merged PR is dropped; the open PR behind it is still dispatched.
  • TestFixQueueNudgeForMergedPRDispatchesNothing: a nudge for a PR that has already merged queues nothing, and the nudge is reported as comment-only.
  • TestFixQueueHoldsDispatchWhenPRStateUnreadable: an unreadable state dispatches no fix and keeps it queued, selectFixTask returns nothing so the relay gets ordinary work, and the fix goes out once the state can be read again.
  • TestFixQueueBoundaryTaskIsSentOnce: a real ready over a websocket delivers exactly one task_assign. On the tip, it delivers two.
  • TestFixTaskProgressIsNotRevoked: progress for an in-flight fix task gets no task_revoke, while a task the hub never issued still gets one. On the tip, both are revoked.
  • TestNextPreviewsDispatchWithoutTakingIt (fixqueue): Next matches what Dispatch takes, and returns nil whenever Dispatch would.
  • Relay, #17385 a fix-pr task_id delivered twice runs once, as the primary task: on the tip, the second copy spawns a parallel session.
  • Relay, #17385 a fix-pr task_id already in a parallel session is not also started as the primary task: on the tip, the duplicate becomes the primary task.

Also seen on projectbluefin (follow-up test)

The same revoke hit a retried fix on the projectbluefin hive. On projectbluefin/utah-packages#972 (2026-11-09) the relay refused fix-karibhou-1, and the hub served it again at the relay's next ready as fix-karibhou-2, a boundary fix on the same connection. The relay's progress for it (14:50:21Z and 14:54:36Z, with an empty repo and client_gen 1870) was answered with task_progress resume rejected: no matching server-issued lease and task_revoke. The handleTaskProgress change above already covers this. The extra commit adds TestRetriedBoundaryFixProgressIsNotRevoked, which drives the real fail β†’ requeue β†’ boundary dispatch path and sends progress with no repo, as the relay did. It asserts that the retried task is never revoked, while the first task, which the relay failed, still is. On be24159c0 both would be revoked.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

hivecommons#17385 merged at 13:13:58Z; at ~14:25Z the hub still
handed Danathar's relay "fix-pr hive#17385", and the relay ran it twice.

Hub:
- Queue a nudged PR under owner/name, not the nudge's Display (the bare
  configured name on a hive that lists repos without the org). Resolve
  keys on owner/name, so the bare entry was never removed when the PR
  left stage 072, and the relay could not match the task's repo "hive"
  to an owner/name.
- Before dispatching a queued fix, check its PR is still open (state
  cache first, else one PR read tagged hive:contribute_fix_dispatch).
  Merged or closed PRs leave the queue with a log line; an unreadable
  state holds the dispatch for this tick. fixqueue.Next previews what a
  dispatch would take so only those PRs are checked.
- Send a boundary fix task once: the ready handler ships the returned
  message, so sendFixTask no longer pushes it as well.
- Progress for an in-flight fix task (a boundary fix runs as the relay's
  primary task) is not a resume claim and is no longer revoked.

Relay:
- A fix-pr task_id the relay already runs (primary, parallel, preempting
  or deferred) is ignored on a second task_assign, with a log line naming
  where it runs; a fix that becomes the primary task says so.

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 9, 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

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.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

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.

Failing checks:

  • check-failure

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.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Check report for the one red required check, test (agent 5/5) (job 129234528262):

Suggested action: no code change is needed in this PR for this check. A re-run of the test (agent 5/5) job (or a push after rebasing onto the current v6 tip) should clear it; the hive cannot rerun jobs on a fork branch. If the same test still fails 3/3 on a re-run, that is a signal the timing budget in kick_cancel_test.go needs widening on 26.04 runners rather than anything in this diff.

hive/awaiting-ci: fork PR β€” comment only; 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

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

Read the diff against v6 at be24159c0 plus the callers; this looks correct to me.

What I verified:

  • src/pkg/forgestate/store.go:334 β€” ReadThrough returns ok=false for a closed/merged/gone item and refuses with ErrNotReady/ErrStale rather than guess, so the mapping in fixPRStateOf (absent-after-fresh-read β†’ gone; stale/not-ready β†’ fall through to one REST read) matches the store's contract. bound=0 resolves to Options.FreshnessBound, as the body says.
  • src/pkg/dashboard/contribute_select.go:495 β€” selectTask returns selectFixTask's message to the ready handler, so a boundary dispatch is indeed already shipped there; sendFixTask(..., !boundary) removes the second send without touching the non-boundary callers (Nudge, completeFixTask, reroute), which still push.
  • src/pkg/dashboard/contribute_ws.go:4098 β€” the early return sits inside the currentTask == nil branch and only fires for a task_id in fixTasks, so the C4 resume gate still rejects unknown task IDs. Fix tasks hold no lease, so skipping lookupLease drops nothing they relied on.
  • src/pkg/fixqueue/fixqueue.go β€” Next and pop share coalesces and dispatchableLocked, so the preview can't disagree with the pop on the same queue state.
  • Nudge β†’ FixWorkFor (contribute_fixqueue.go:332) checks both in-flight and queued, so the offline-relay path (enqueued, not dispatched) still reports queued.

One open question, low severity, not a blocker: dispatchFixes calls sched.Next β†’ dropClosedFixes β†’ sched.Dispatch* without holding a lock across them (contribute_fixqueue.go:438-456). dispatchFixes is reachable concurrently from the sweep (Nudge), the ws session (selectFixTask, completeFixTask) and reroute. If another caller pops the previewed item in that window, this caller's Dispatch can hand out the next item without its state having been checked. The consequence is one dispatch with today's behaviour, not a regression, so I'd leave it unless you want the preview+pop fused into one scheduler call.

CI: the only red is test (agent 5/5) in pkg/agent, which this PR does not touch; every dashboard and shuffle shard passed.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Review findings from adjudicator (folded here because this head already carries its hive review):

Correctness review at head de04134. Read the diff plus contribute_fixqueue.go, contribute_ws.go (handleTaskProgress, both selectTask call sites), contribute_select.go, fixqueue.go, forgestate/store.go (ReadThrough), and the relay task_assign path. The five fixes line up with the body: nudgeFixRepo (contribute_fixqueue.go:343-352) keys on owner/name so Resolve (l.355-378) finds it; sendFixTask(..., !boundary) (l.463) stops the double send because both selectTask callers already ship the returned message (contribute_ws.go:2270, 3797); the fixTasks early-return in handleTaskProgress (contribute_ws.go:4098-4101) sits before lookupLease, so no task_revoke; fixPRRunningWhere covers all four relay places. No blocker. Two edge cases, both non-blocking:

1. (low) A 404 on the direct PR read is treated as "gone" and silently drops the fix β€” contribute_fixqueue.go:535-538. A PR cannot be deleted, so not found here is almost always a repo the hub token cannot see (GitHub answers 404 for a private repo without access) or a transient. That drops an open PR's fix with only an Info log, while every other read failure holds the dispatch. TestRepoItemReroutePickupLapseFallsBackToAdoptNow needed fixPRStateHook precisely because the mock's unknown org/other#1 would otherwise be dropped. Suggest holding (error) like other failures, or at minimum a Warn:

		if resp != nil && resp.Response != nil && (resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusGone) {
			// A PR cannot be deleted: 404 is usually a repo this token
			// cannot see. Hold rather than drop an open PR's fix.
			return fixPRStateUnchecked, "", fmt.Errorf("pr %s#%d: %w", repo, number, err)
		}

2. (low) Preview/pop window in dispatchFixes β€” contribute_fixqueue.go:438-459. Next previews under the scheduler lock, dropClosedFixes releases it to do GitHub I/O, then Dispatch/DispatchAtBoundary pops. dispatchFixes for the same user runs concurrently from the sweep goroutine (Nudge l.323, Resolve l.377) and the ws session goroutine (completeFixTask l.652, selectFixTask l.619), so the popped head can differ from the previewed one and an unchecked (possibly closed) PR goes out. Rare, and the worst case is the pre-PR behaviour, but a per-hub fixDispatchMu sync.Mutex held across the loop body in dispatchFixes would close it; alternatively compare d.Items keys against next after the pop and Requeue on mismatch.

Review findings from adjudicator-2 (folded here because this head already carries its hive review):

docs-currency (read at head de04134): the new doc paragraph in src/docs/contributor-relay.md:1762 and the changelog fragment match the code β€” log line text (contribute_fixqueue.go:493), REST tag hive:contribute_fix_dispatch (:65), state-cache-then-one-read path (:503-553), and owner/name keying via nudgeFixRepo (:345). No blocker.

One advisory, operator-facing: when a PR's state cannot be read, selectFixTask now holds by answering task_unavailable with reason fix_pr_in_flight (contribute_fixqueue.go:628), which the relay prints to the contributor even though nothing is in flight. The constant's comment (:47-49) still describes only the "every slot is busy" case. Cheapest honest fix is to widen the comment and name the reuse in the docs sentence you added:

	// taskUnavailableFixInFlight is the task_unavailable reason when a
	// contributor's queued fixes exist but none can go out this tick: every
	// slot is busy, or a queued PR's state could not be read (the dispatch
	// is held and the next `ready` asks again).
	taskUnavailableFixInFlight = "fix_pr_in_flight"

and in src/docs/contributor-relay.md:1762: "When the state cannot be read, nothing is dispatched that tick (the relay sees task_unavailable reason fix_pr_in_flight) and the next one asks again."

stage 080-awaiting-merge-admission β†’ 072-returned-to-contributor: check-failure

Reviewed by reviewer β€” no findings.

Reviewer notes

Read the diff against v6 7423d91 alongside the base dispatchFixes loop (contribute_fixqueue.go:377-417), pop/DispatchAtBoundary (fixqueue.go:434-466), FixWorkFor (contribute_fixqueue.go:698), selectTask (contribute_select.go:495) and forgestate.Store.ReadThrough (forgestate/store.go:334). Looks correct to me; each of the five links in the body is actually closed by the diff:

  • sendFixTask(..., !boundary) is safe: selectFixTask is the only boundary=true caller, the base loop already breaks after one dispatch at a boundary, and selectTask returns that message to the ready reply β€” so the single-push claim holds and nothing is left undelivered in-flight.
  • Scheduler.Next reproduces pop's item set exactly (head + coalesces), and dispatchableLocked keeps the base guards for both paths (the boundary path still ignores NotBefore, as before). So the preview the hub checks is the dispatch it will make.
  • fixPRStateOf maps ReadThrough's ok=false to gone, and treats ErrStale/ErrNotReady/ErrUnknownRepo as "fall through to one REST read" while any other error holds the dispatch β€” matching the store's documented contract. A read error never becomes "open".
  • nudgeFixRepo keys queue entries as owner/name, which is what Resolve already looks up (contribute_fixqueue.go:357), so the orphaned-entry path is closed on both sides.
  • The handleTaskProgress guard for fixTasks entries lands before the lease check, so a boundary fix running as the primary task no longer gets task_revoke.

The state read runs from the sweep goroutine / the ready handler, not under h.mu, so the 10s timeout cannot stall other WS sessions. No findings.

Evidence bundle `#17403556d812` sha256:c047ec3cd740af8a3c289bbf5b93f0b7e554b62fe33d46714a70d1266ce86f06 β€” download from the dashboard or `hivectl review evidence #17403`.

Danathar and others added 2 commits November 9, 2026 10:12
…tah-packages#972)

projectbluefin/utah-packages#972, 2026-11-09: the relay refused
fix-karibhou-1, the hub requeued it and served it at the next ready as
fix-karibhou-2 on the same connection, and the relay's progress for the
retry (repo empty, client_gen 1870) was answered with "no matching
server-issued lease" and task_revoke at 14:50:21Z and 14:54:36Z.

The handleTaskProgress change in this PR already covers it; this test
drives the real fail -> requeue -> boundary dispatch path and sends
progress without a repo, as the relay did, so the retried task id must be
tracked on the connection and never revoked.

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>
When a queued fix's PR state could not be read, selectFixTask answered
task_unavailable/fix_pr_in_flight, so the relay got no new issue either.
That happens when GitHub is struggling or the API budget is low, the time
the hive needs its contributors most. The fix now stays queued and is
retried on the next ready, and the relay takes ordinary work meanwhile.
Busy fix slots still answer task_unavailable as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>

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

Read the diff against the v6 tree plus the callers (contribute_select.go:495, forgestate/store.go:329-334, the relay's assignmentInScope). The five fixes each do what the body says; looks correct to me.

What I verified:

  • Open-state check (contribute_fixqueue.go, dropClosedFixes/fixPRStateOf): forgestate.Store.ReadThrough documents ok == false as "closed, merged or gone" (store.go:333), so treating a fresh-read miss as fixPRStateGone is right, and ErrStale/ErrNotReady/ErrUnknownRepo fall through to the direct PullRequests.Get rather than being reported as errors. A read error returns Unchecked with err, which dropClosedFixes turns into hold, so an outage never dispatches.
  • Next ↔ Dispatch parity (fixqueue.go): both go through dispatchableLocked, and pop and Next share coalesces(), so the preview is the set that would be taken. The dropped β†’ continue loop terminates because Remove is keyed on the same Repo/Number the preview returned.
  • Send-once at a boundary: sendFixTask(…, push=false) still registers c.fixTasks[d.ID]/fixTasksAt before skipping the websocket write, so failFixTask, handleTaskProgress and the ready handler all still see the task.
  • No revoke for an in-flight fix (contribute_ws.go:4094-4100): the early return is gated on s.contributor.fixTasks[msg.TaskID], a server-populated map of task IDs the hub issued to this connection; a client cannot assert an arbitrary task_id into it, so the C4 resume-claim protection below is not weakened.
  • nudgeFixRepo: the relay's scope gate derives the repository identity from the task URL (assignmentRepositoryID), not from the bare repo string, so sending owner/name cannot newly fail scope.
  • Relay dedupe: fixPRRunningWhere is checked after the polling-slot gate and before the currentTask interrupt branch; no conflict with #17405's exemption (trial merge of the two heads is clean).

One open question, info-level, not a defect: Next β†’ dropClosedFixes (a GitHub read, up to fixPRStateTimeout = 10s) β†’ Dispatch runs without the scheduler lock held across the three, so a Nudge that enqueues a higher-priority item during the read makes Dispatch pop an item the preview did not check. The consequence is bounded β€” a just-nudged PR is open by construction β€” so I would not change it, just noting the window exists.

β€” hive: agent=reviewer-2 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.

Read the diff at aa39520 against the v6 tree (2b549c8), including the callers. The change does what the body says, and the one place I expected a gap holds up. Looks correct to me.

What I checked:

  • Boundary task sent once. selectTask (contribute_select.go:495) returns selectFixTask's message and handleReady (contribute_ws.go:3816) sends it, so the old sendFixTask push at a boundary really was a second copy. dispatchFixes already breaks after one pop when boundary is true, so dropping the push leaves exactly one task_assign; no other caller passes boundary=true. The three non-boundary callers (Nudge, Resolve, contribute_reroute.go:191) still push via !boundary.
  • Cache path can't mistake a cache miss for "gone". forgestate.Store.ReadThrough (store.go:352-374) only returns ok=false with a nil error after it has fetched the item (ErrNotFound β†’ removed, or upserted and still absent). An absent cache entry triggers the fetch; it is not read as closed. Stale/not-ready fall through to the REST read as intended.
  • Progress early-return is not a trust regression. fixTasks is populated only by sendFixTask on the server side, so a relay can't use the new branch in handleTaskProgress to claim a task it was never issued; the branch just returns without minting anything, and the test still asserts not-mine is revoked.
  • Relay guard. fixPRRunningWhere covers currentTask in handleFixPRInterrupt (where currentTask is guaranteed set) and the parallel/preempting/deferred sets on the no-task path. The !currentTask branch is placed before the "Already has active task" reject, so a duplicate is silently dropped rather than failed back to the hub, matching the test.

Minor, not a defect: Next for boundary=true skips the NotBefore check, which matches DispatchAtBoundary's existing guard, so preview and pop stay consistent.

CI was still in progress when I looked; nothing red at this head.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit e67307b into hivecommons:v6 Nov 9, 2026
69 of 70 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 556d812.

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant