fix(runtime-host): honor TMPDIR for control endpoints and sweep only dead directories - #2160
Merged
jackwener merged 3 commits intoAug 4, 2026
Merged
Conversation
Benjamin-eecs
marked this pull request as ready for review
August 4, 2026 14:02
…dead directories The control endpoint hardcoded /tmp, and removeStaleEndpointDirectories deleted every same-rootId directory on startup, including a concurrent live host's socket directory. Resolve the endpoint root from os.tmpdir() and fall back to /tmp when the socket path would exceed the portable sun_path budget; truncating the directory root tag to 16 characters keeps default macOS temp roots under that limit. Each endpoint directory now carries an owner.pid marker written before listen, and the startup sweep reclaims only directories whose owner is provably gone, under both the current naming and the pre-change full-tag naming. Test-harness cleanup rides along: six identical copies of removePosixEndpointDirectories and the host-kernel variant now share one fixture that understands both namings and both roots, and node:os is registered in the dependency-boundary allowlist for the control tree. Closes apache#2133
Benjamin-eecs
force-pushed
the
fix/2133-endpoint-tmpdir-liveness
branch
from
August 4, 2026 14:04
79a7e74 to
18dedf8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The control endpoint ignored TMPDIR, and startup deleted every same-rootId directory even when another live Host owned it.
What changed:
Closes #2133
Verification