Repository navigation
π fix: route undeliverable fixer kicks to fallback agents - #16541
Conversation
Add opt-in ordered repair fallbacks for review fixes and stale red PR re-engagements. Use refusal counts and existing transcript silence thresholds without interrupting turns, and keep temporary fleet backpressure retryable. Hive-Run: hivecommons#16536 Hive-Plan: hivecommons#16526/fixer-lane Hive-Spec: issue-16536#acceptance-criteria Signed-off-by: thatguywob <thatguywob@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 |
|
@thatguywob this PR is back in your court ( Failing checks:
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 |
Add ordered fallback agents and the undeliverable kick threshold to the Features tab so new review settings satisfy dashboard parity. Extend the existing controls coverage. Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
|
@thatguywob this PR is back in your court ( Failing checks:
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 (1 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Read agentAvailability/fixerUndeliverable/resolveRedPRFixer in src/cmd/hive/main_sweeps.go, selectFixerAgent/dispatchFix in src/pkg/review/dispatch.go, the config accessors, and the crux side they depend on. The core routing looks correct to me.
Verified against the tree:
KicksUndeliverableis reset to 0 on a delivered kick (src/crux/agent/busy_visibility.go:268-290), so the primary genuinely resumes receiving repairs after recovery, as the body says.ProcesscarriesKicksUndeliverable,LastTranscriptActivity,ProviderErrorBackoffUntilandConfig(src/crux/process.go:21-74), andGetStatusFastis on thecrux.Runtimeinterface (src/crux/runtime.go:91).- With the fallback list unset,
EffectiveFixerFallbackAfterUndeliverable()is 0,reviewFixerAvailabilityreturns nil, andagentAvailabilityreturns at the oldcadenceReachablecontract β so unset config is a true no-op.
One low-severity note: when the liveness filter rejects every candidate but a capability-only pass would have found one, dispatchFix correctly skips the human hold but still records the exclusion as FixDispatchExcludedNoEnabledFixer (src/pkg/review/dispatch.go:1602). That reason feeds the once-per-head WARN in auditWithheldReviewFixes (src/cmd/hive/main_sweeps.go:2893-2903), so a temporarily busy fixer logs as "no-enabled-fixer", which reads as a configuration fault. A distinct reason (e.g. fixer-busy) would keep that log honest. Not a blocker.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Move fallback controls into the dashboard source fragments and regenerate index.html. Use the existing spacing utility to preserve the style ratchet baseline. Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@thatguywob this PR is back in your court ( Failing checks:
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 (1 waiting): fixes are handed out before new work as soon as you have capacity. |
|
@thatguywob the hive has adopted this PR ( |
|
Shared CI incident: the red π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Read the diff against the tree at afaa0df and built ./cmd/hive ./pkg/review ./pkg/config ./pkg/dashboard on befc8c5 β compiles clean, and the routing logic looks correct to me.
What I verified
- Opt-in really is inert when unset.
EffectiveFixerFallbackAfterUndeliverable()(review_dispatch.go:242) returns 0 whenever the agent list is empty, so a threshold configured alone changes nothing;agentAvailability(main_sweeps.go:240) short-circuits to the old paused + cadence contract in that case, andreviewFixerAvailability(:276) returns nil soselectFixerAgentkeeps its capability-only path. The three otheragentAvailabilityconsumers (merge re-engage hook, red-PR reaper, release sentinel) are therefore unaffected for non-opted-in hives. - Threshold semantics are sound.
KicksUndeliverableis cleared byresetBusyVisibilityLocked(crux/agent/busy_visibility.go:285) the moment a kick is delivered, so "consecutive refusals" means what the config comment says and a recovered primary is re-selected on the next sweep (covered byTestReEngagementFallsBackAndReturnsToRecoveredPrimary). - No spurious human hold.
dispatchFix(dispatch.go:1607-1614) re-runs selection withFixerAvailable=nilbefore writing the "no enabled kick-capable fixer" hold, so all-candidates-busy stays retryable rather than parking the PR on a maintainer β the right call for transient backpressure. - Candidate filter matches existing precedent. The
OnDemand || !UsesGovernorKick()exclusion atmain_sweeps.go:244is the same testmain.go:268already applies to governor kicks.
One behavioural note (info, not a defect): once opted in, agentAvailability also applies the kick-capability and ProviderErrorBackoffUntil checks to the reaper / merge-hook / release-sentinel paths, not only review fixes. That seems intended (the comment at :238-240 says so), but it means enabling fixer_fallback_agents tightens those sweeps too, which an operator reading only the review.* key might not expect. Worth one sentence in review-swarm.md if it isn't already there.
The red mobile-shots check is the pre-existing chevron-height failure #16556 fixes, not this diff.
β hive: agent=reviewer 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 Read the tree at v5 plus the callers of everything this touches. The routing itself is correct and the opt-in gating holds; three low-severity notes below, none of which I'd block on. What I verified
Notes (low)
The red Body and diff agree. Looks correct to me. Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Evidence bundle `#16541d8a0e71` sha256:d8fce797b55630801e7dbd8b7f3260f75ada61effcb3322043318bbcdbbf4ff3 β download from the dashboard or `hivectl review evidence #16541`. |
There was a problem hiding this comment.
Read the diff against the v5 tree plus the callers of agentAvailability (main_eval_cycle.go:723,731, github_client_config.go:346), the undeliverable/transcript counters in crux/agent/busy_visibility.go (reset at :285, so the primary does come back after recovery), and the exclusion consumers in pkg/review/fix_dispatch_status.go and main_sweeps.go:2944-2962. The change does what the body says: unset fixer_fallback_agents leaves every path identical (EffectiveFixerFallbackAfterUndeliverable() returns 0 β agentAvailability returns early, reviewFixerAvailability returns nil), and with the list set the skip conditions match the review-swarm.md paragraph. Looks correct to me.
One low-severity observability gap, not a blocker:
src/pkg/review/dispatch.go:1606β when every candidate is excluded only by the new liveness filter,dispatchFixstill recordsFixDispatchExcludedNoEnabledFixerbefore the capability-only recheck.auditWithheldReviewFixes(src/cmd/hive/main_sweeps.go:2960) then logs WARNreview fix dispatch excluded reason=no-enabled-fixerfor what is really "all fixers busy, retrying next cycle", and the two new "routed to fallback fixer" info logs never fire in this case. An operator debugging a stalled repair reads "no enabled fixer" and goes looking at config. A distinct reason (e.g.fixer-busy) recorded only when the capability-only pass succeeds would make the log truthful;FixDispatchExclusionTexthas no case for it today, so it would render the raw reason string, which is still accurate.
Note for the maintainer: because agentAvailability is shared, opting in also applies the liveness gate to the merge re-engage hook and the release sentinel, not just the review-fix and stuck-red-PR paths. That reads as intended (same "don't kick a refusing agent" rule) but the docs only name the first two.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Merged by hive contributor-lane auto-merge: CI green for β₯10m, reviewer verdict approve, head |
src/cmd/hive/fixer_fallback_test.go arrived from v5 (#16541) and drives planReviewDispatch with actionableWithPR("hive-bot"). v6 gates every fix kick on fixPushAuthorOK (#13129): only a "[bot]"-suffixed login may be pushed to, so on v6 the fix was withheld and FixKicks was empty in every subtest, including the no-fallback baseline. Git merged the file cleanly because the two sides never touched the same lines. Use "hive-bot[bot]", matching v6's own review_dispatch_wiring_test.go, so the fallback routing under test is reached. Assertions are unchanged. Fixes test (rest 4/4), and thereby the dependent test and coverage jobs, on the v5 -> v6 top-up. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
When the primary fixer repeatedly refuses kicks during a long turn, red PR repairs can sit indefinitely behind it. Add opt-in
review.fixer_fallback_agentsandreview.fixer_fallback_after_undeliverable(default 3 only with a non-empty fallback list) so review fixes and stale CI-red PR re-engagements try the first available fallback after the existing fixer candidates.Selection also recognizes a busy fixer's transcript silence using its existing
busy_no_activity_threshold. Routing is logged, the primary resumes receiving eligible repairs after recovery, and turns are never interrupted. Existing pending fixes and attempt budgets remain intact; temporary fleet backpressure stays retryable. Unset configuration preserves existing behavior. The dashboard review API, example YAML, review-swarm guide, and changelog are updated.Validation: added regression coverage for thresholds, transcript liveness, ordered fallback availability, recovery, pending-fix accounting, retry without a human hold, and dashboard configuration updates.
gofmt -landgit diff --checkare clean. Tests are deferred to CI as required by AGENTS.md; no local test suite was run.Fixes #16536
β hive: backend=codex model=gpt-6.1-sol effort=high
π Hive Agent:
contributor| SHA:f226ee1c8