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
I’ll implement this directly. One required note first: use of
AGENTS.mdis experimental, with no guarantees of backward or future compatibility; I’ll treat the disclaimer as acknowledged per your instruction to proceed autonomously. I’m locating the worker-disconnect and admitted-workload lifecycle now. - Assistant
rgisn’t installed in this environment, so I’m using targetedfind/grepsearches and will keep the scope to production code and focused tests. - Assistant
The failure is in MultiKueue’s timeout anchor: the grace period is measured from when the admission check became Ready, so a long-running workload can be retried immediately on disconnect. I’m changing the anchor to the actual connection-loss time for the assigned worker, while preserving the existing behavior for a genuinely missing remote workload.
- Assistant
The first focused test attempt hit the container’s process limit during Go compilation, not a code failure. I’m rerunning it with serialized package compilation and reduced concurrency.
- Assistant
The serialized package test is still running cleanly with no output; this package has a sizable test suite. The implementation now records loss per remote client, so one disconnected worker’s grace window is independent of all other connected workers.
- Assistant
Compilation has completed and the tests remain active without failures. I’m letting the focused suite finish, then I’ll inspect the exact diff and run the required whitespace validation.
- Assistant
I found one restart edge case worth covering: an admitted workload can encounter a client already marked reconnecting before an in-memory loss timestamp exists (for example after controller restart). I’m making the first observation initialize that timestamp, which guarantees the full configured grace period instead of falling back to the old admission time.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.