Repository navigation
feat(agent): run several agent stages at once through one shared run gateway (#30) - #31
Conversation
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
…, so cancel reaches a retry (#31 review)
|
Fixes for the review (run
The full race suite passes. Head: |
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Closes #30. Asked for by enyo (msg 505481) via jarvis (msg 505482); jarvis approved the design (msg 505501).
Change
modelgw.GatewayreplacesRunGateway. There is one per runner, onagent.model_gateway.listen(the instance's single host port, which every VM of the instance reaches).Open(token)and gets aSession.Session.Closerevokes the token at once and cuts only that attempt's in-flight calls.agent.sandboxd.max_parallel(default 1, range 0-8; 0 means 1) feedsSandboxd.MaxConcurrent. Before this, the value was hard-coded to 1. The engine's existing limiter (advance.go:150) holds any extra ready agent stage as pending, so with the default nothing changes.deploy/config.example.yamlanddeploy/hetzner2-video/config.yamlgainmax_parallel: 1. The README explains that it must not exceed the instance's-max-vms.Tests (each proven red by mutation; evidence/mutants-parallel-agents.json)
TestSandboxdConcurrentAttemptsShareTheGateway: two Execute calls overlap inside omp, both guests' model calls return 200, no VM is left, the port is freedMaxConcurrentstill 1TestGatewaySessionsAreIndependentTestGatewayCloseCutsOnlyItsOwnStreamsTestGatewayHoldsThePortOnlyWhileSessionsAreOpenThe full race suite passes.
Deploy (after merge)
max_parallelstays 1, so behaviour is unchanged.stagehandto-max-vms 2and the VM cap from 3 to 5 GiB. Approved by jarvis (505507) and phobos (505506), with phobos giving up 2 GiB (sandboxd msg 505510).max_parallel: 2in/etc/stagehand/config.yamland restart.