fix(acp): retry a transient shared runtime spawn - #9022
Conversation
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of The review contract requires my final message to be the structured review itself, with nothing after the marker. All evidence gathered: the fix is real, the base confirms the added First-Principles-Verdict: CONCERNS An inert What this change shipsIntent: keep a shared ACP runtime start from failing when a kiro-cli self-update briefly replaces the executable — a FIX.
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] b344bfb |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Bounded, single-retry recovery placed at the one point before any runtime state is recorded — the right boundary, documented in the same commit. Suggestions
[DESIGN-REVIEWED] b344bfb |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
d72aeb5 to
f3f3c2c
Compare
A Kiro CLI self-update can replace its executable while a shared runtime is starting. Retry one OSError under the existing cold-start admission gate, but leave authentication, protocol, and configuration failures terminal.
f3f3c2c to
b344bfb
Compare
Problem / Motivation
A Kiro CLI self-update can briefly replace the executable while
AcpRuntimestarts. The shared-runtime path treats that process-creationOSErroras terminal.Why it matters
The shared runtime serves interactive, scheduled, subagent, background, and review work. A short replacement race should not fail startup.
What changed
Retry one process-creation
OSErrorafter two seconds while retaining the cold-start permit. The retry occurs before runtime state is recorded, so partial initialization is never replayed. Authentication, protocol, and later initialization failures remain terminal.Pattern harvest
Rule candidate: retry shared startup only at an atomic pre-state mutation boundary; holding admission does not make replaying partial initialization safe.
Tests
python -m pytest -q test/test_acp_runtime.py test/test_acp_spawn_offload.py— 323 passed.What changed (motivation → approach → change)
N/A — covered by the existing
## What changedsection.Manual verification
N/A — focused automated coverage is sufficient.
Related Issues
N/A.
Checklist
Contribution License Agreement
N/A — template placeholder; no CLA wording is supplied.