Decompose smolmachines launch and harden bringup sequencing #122
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracked from the complexity hotspot review in #117. Three issues in
smolmachines/launch.pyand its helpers:1.
launch()step ordering — 207-line function with 7 sequenced steps as inline comments. Dependencies between steps (CA paths must exist before bundle spec; bundle must run before port discovery; etc.) are implicit in the linear ordering. Each step is not individually testable.2.
time.sleep(1.5)for libkrun exec-channel race — Empirical sleep aftermachine_startbefore the filesystem-repair exec. If insufficient, the chown exec is SIGKILLed silently and the agent later fails withENOENT/EPERMon~/.claude.json.3. Loopback alias allocation is not concurrent-safe —
allocate()reads docker container state and returns the lowest free alias, but there is no lock between the read and the bundle'sdocker run. Two simultaneous launches can claim the same alias.