Skip to content

🐛 fix: serve continuous re-kicks between busy cycles - #14824

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
thatguywob:fix/14820-continuous-rekick
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
thatguywob:fix/14820-continuous-rekick

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

Summary

  • Check for due continuous re-kicks between run-loop iterations so pending cadence and webhook events cannot starve the wake timer. Run these cached evals without rotation, sweeps, or maintenance lanes; retain the existing minimum gap and stalled-schedule hold.
  • Return a typed busy deferral when prompt readiness fails during a live turn. The dispatcher leaves failure/backoff accounting untouched and defers the rest of that agent's lane after a busy bounce or successful delivery, preserving fix-kick priority.
  • Add regression coverage for a due re-kick competing with a pending cadence tick, lean-cycle maintenance counts, busy versus genuine delivery failures, and the runtime's busy error propagation. Include a changelog fragment.

Related issues

Fixes #14820

Testing

  • Not run locally: CI runs validation for agent-authored PRs (AGENTS.md forbids local builds/tests in agent panes).
  • gofmt -l on all changed Go files: no output.

Contributor checklist

  • Changelog fragment added at changelog.d/fixed-14820-continuous-rekick.md.
  • Targets v5; title follows the repository emoji convention.
  • Commit includes matching DCO sign-off, issue-author attribution, and Hive trailers.
  • No secrets, credentials, or local runtime state committed.

— hive: backend=codex


🐝 Hive Agent: contributor | SHA: 256ef585f

Check due continuous re-kicks between loop iterations and run a cached eval without maintenance sweeps. Defer remaining same-agent kicks after delivery or a live-turn bounce, without recording busy deferrals as governor kick failures.

Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>

Hive-Run: hivecommons#14820
Hive-Plan: continuous-rekick-wake-and-busy-deferral
Hive-Spec: issue-14820#expected
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 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 kellyaa 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 Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026

@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 v5 tree and the callers; the change does what #14820's "Expected" section asks and I found no defect. Looks correct to me.

What I verified:

  • src/cmd/hive/main.go run loop: serveContinuousWake() now runs at the top of every iteration before the select, so a due re-kick is served whichever channel woke the loop. Hot-loop risk is bounded by the existing continuousWakeMinGap check in continuousWakeDecision (src/cmd/hive/continuous_wake.go:72) and lastWake = now; the stall backoff via wakeHold.observe is retained. The lean cycle takes cfgReloadMu like tick does and intentionally skips restartCrashed, watchdog, rotation and sweeps — the cadence tick still runs those.
  • src/crux/agent/manager_kick.go:196,290 wrap the not-ready error in crux.ErrAgentBusy only when kickUndeliverableTranscriptLiveness (busy_visibility.go:235) says the transcript is live; m.mu is held at both call sites as kickNotReadyErrorLocked requires. kickDispatchDeps.sendKick is wired directly to agentMgr.SendKick (main.go:7678), so errors.Is in eval_cycle_seams.go:582,596 sees the sentinel unwrapped.
  • eval_cycle_seams.go:596: a busy bounce ends the span with nil and skips onFailed, so RecordKickFailure no longer doubles continuousBackoff for a merely busy agent.

One thing worth a maintainer's glance (not a defect): this deliberately replaces the contract pinned by the old TestDispatchAgentKicks_SameAgentStaysOrdered — after a successful fix kick, the governor kick to the same agent in that cycle is now deferred rather than typed in behind it. Given the old behaviour was a guaranteed 120s prompt-timeout failure per the issue, the deferral is the right call, and the test rename makes the change explicit.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

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
#14821 🐛 fix: preserve supersession decisions across stage reconciliation same files src/cmd/hive/main.go
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/cmd/hive/eval_cycle_seams.go
src/cmd/hive/main.go
src/crux/agent/manager_kick.go

@hivecommons-hive hivecommons-hive Bot added stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 6aa5b19 into hivecommons:v5 Oct 28, 2026
71 of 75 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#14824256ef58` sha256:e3513a75216f5e766d19f9eb68fb65dfda9bdd2369282ad11f4e3b081b77e222 — download from the dashboard or `hivectl review evidence #14824`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Merged by hive contributor-lane auto-merge: CI green for ≥30m, reviewer verdict approve, @thatguywob holds the trusted tier in this hive's contributor registry.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted labels Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off 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.

Continuous re-kick wake never fires on a busy run loop; busy-agent kick bounces escalate continuous backoff

1 participant