agent/pkg/runner
Snider 53db749738 fix(runner): reserve slot on approval to prevent TOCTOU race
Runner now creates a reservation entry (PID=-1) in the workspace Registry
immediately when approving a dispatch. This prevents parallel requests
from all seeing count < limit before any spawn completes.

Reservations are counted by countRunningByAgent/ByModel (PID < 0 = always
count). Agentic overwrites with real PID via TrackWorkspace after spawn.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:23:04 +00:00
..
paths.go feat(runner): extract dispatch runner into independent Core service 2026-03-26 11:00:47 +00:00
queue.go fix(runner): reserve slot on approval to prevent TOCTOU race 2026-03-26 11:23:04 +00:00
queue_test.go fix(agentic): delegate runner/shutdown/poke to runner service 2026-03-26 11:19:45 +00:00
runner.go fix(runner): reserve slot on approval to prevent TOCTOU race 2026-03-26 11:23:04 +00:00
runner_test.go feat(runner): extract dispatch runner into independent Core service 2026-03-26 11:00:47 +00:00