You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runtime-host control endpoint hardcodes /tmp and sweeps same-rootId directories on startup #2133
The parallel test runner assigns each workspace an isolated TMPDIR (run-workspace-tests-parallel.mjs:87) — this path bypasses it.
removeStaleEndpointDirectories() (endpoint.ts:94) deletes ALL /tmp directories matching the same rootId prefix before each host start. Measured up to 6 concurrent m-<uid>-… endpoint dirs during a parallel run. Two hosts with the same rootId starting concurrently: the later one deletes the earlier one's live socket directory. Tests currently survive only because each withHostPaths uses a distinct mkdtemp rootId — safety by coincidence, not by design.
Ask: read os.tmpdir() (honoring TMPDIR), and scope stale-cleanup to provably-dead directories (pidfile/lock heuristic) rather than same-prefix sweep.
Endpoint root from os.tmpdir(), falling back to /tmp when the socket path would not fit the portable sun_path limit. The current directory name only fits under /tmp, so nested TMPDIR runners need the fallback.
The startup sweep becomes liveness-aware: each directory carries an ownership marker, and only provably-dead directories are removed. A live same-rootId sibling is never deleted.
Dedicated unit tests: preparation, the length fallback, live-vs-dead sweep behavior, and the existing 0700/0600 checks.
Activity
fix(scripts): the serial workspace batch was never running after a pa…
Benjamin-eecs commentedon Aug 4, 2026
Taking this one.
os.tmpdir(), falling back to/tmpwhen the socket path would not fit the portable sun_path limit. The current directory name only fits under/tmp, so nested TMPDIR runners need the fallback.fix(runtime-host): honor TMPDIR for control endpoints and sweep only …
fix(runtime-host): honor TMPDIR for control endpoints and sweep only …