Admitted workloads are requeued too early when a worker disconnects An admitted workload…
- User
Admitted workloads are requeued too early when a worker disconnects
An admitted workload must remain ready during a temporary worker disconnect and be retried only after the configured worker-loss timeout. Reconnection with the same configuration must restore processing without affecting other connected workers.
Interface
No new interfaces are introduced.
- Assistant
Investigating how worker disconnects and workload requeuing interact in the codebase.
- Assistant
Implementing the fix:
SetAdmissionCheckStatedoesn't refreshLastTransitionTimewhen the state staysReady, so the worker-loss timer uses admission time instead of last contact or disconnect time. - Assistant
Implementing the fix and adding tests.
- Assistant
Note: Usage of
AGENTS.mdis experimental, without guarantees of backwards or future compatibility.Problem
Admitted MultiKueue workloads were requeued immediately when a worker disconnected, instead of staying
ReadyforworkerLostTimeout.Two causes:
-
Stale heartbeat —
syncReservingRemoteStatetried to refreshLastTransitionTimeon each successful sync, butSetAdmissionCheckStateonly updates that field when the state changes. For long-running admitted workloads, the timestamp stayed at admission time, so the loss timer had already expired when a disconnect occurred.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.