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 and test this directly. Note: use of the repository’s AGENTS.md instructions is experimental and carries no backward/forward compatibility guarantees; per your task instructions, I’m treating that disclaimer as acknowledged and proceeding.
- Assistant
rgisn’t installed in this workspace, so I’m using focusedfind/grepsearches instead. I’m narrowing the issue to worker lifecycle and admitted-workload state handling before editing. - Assistant
The failure path is clear: the grace period is measured from when the admission check became Ready, which can be long before the worker disconnects. Also, a disconnected worker is removed from the workload’s client set, and reconnection does not explicitly wake its admitted workloads. I’m changing the lifecycle tracking so only workloads assigned to that worker are awakened, timed from the actual disconnect, and awakened again after reconnection.
- Assistant
The first focused test run hit the container’s process limit while Go was compiling dependencies; this is environmental rather than a test failure. I’m rerunning with constrained build parallelism, then I’ll inspect race-sensitive behavior and the final diff.
- Assistant
The focused package tests now pass. Before final verification, I’m applying the repository’s reviewer runbook (required by AGENTS.md for code changes), especially its race-condition guidance, because this fix coordinates watcher goroutines with workload reconciliation.
- Assistant
The race review found a real publication gap: connection status and disconnect time could be observed from different transitions. I’m tightening them into a single locked snapshot while retaining the existing atomic status for unrelated fast-path checks.
- Assistant
The locked state snapshot now also handles manager restarts/initial reconnect attempts by recording the first observed unavailability, so an old Ready timestamp cannot trigger an immediate retry. The race-enabled build is still compiling the Kubernetes dependency graph under constrained parallelism; the normal focused suite already passes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.