Repository navigation
fix(entrypoint): make the per-run work dir honour TMPDIR on every host - #366
Merged
Merged
Conversation
macOS mktemp ignores TMPDIR for the no-template form; pass an explicit template so the private work dir stays under TMPDIR as the harness expects.
luisleo526
marked this pull request as ready for review
October 11, 2026 00:58
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.
Fix a macOS-only host-run test failure: the entrypoint's private work dir did not honour
TMPDIR.Why
Hosted macOS CI on the engine fails one case of row 14 (
tests/test_compile_inventory_pipeline.py::test_selected_precompiled_cpp_is_frozen_once_and_every_consumer_uses_the_copy,:771) — the test asserts the private snapshot the compiler is given lives under theTMPDIRit passed in.docker/entrypoint.sh:99wasWORK="$(mktemp -d)". macOS/usr/bin/mktempignores$TMPDIRfor the no-template form and uses the Darwin per-user temporary directory; GNU coreutilsmktemphonours$TMPDIR. SoGEN="${WORK}/strategy.cpp"landed underTMPDIRon Linux only, and the assertion held on Linux and failed on macOS. The test's expectation is the correct one; the entrypoint was portable by accident.The change
One line:
An explicit template makes both implementations create the directory the caller asked for. The comment above it and the
trap 'rm -rf "$WORK"' EXITcleanup are unchanged;GENandSOare still children ofWORK.On Linux the work directory stays in
/tmp(TMPDIR is unset inside the container) and only its name pattern changes; nothing reads that path (it is passed to the compiler and torun_json.pyand removed on exit by the sametrap).Evidence
pineforge/verify, run throughlab remoteon this head;docker/entrypoint.shis in the release-harness class, sopineforge/paritygoes--via diffwith no sweep.Notes / not proved
mktempabove was observed for the no-template form; the template form was not executed on macOS in this work — the fix relies on the documented template behaviour of both implementations.entrypoint.shbyte for byte (blob294cc0d3in both today), so the hub must be synced to the new file for the 1.5.0-final cut or the smoke kit's harness-equality rule refuses.🤖 Generated with Claude Code