fix(agents): TMPDIR must not be dot-led - #17
Merged
Conversation
Library code roots things at os.tmpdir() without knowing where it points, and a dotted component in the absolute path silently disables anything applying dotfile-ignore rules to it. A watcher rooted there ignored its whole tree and failed every run of one repository's suite for eight days, load independent, which is why raising its timeout fourfold changed nothing. Redirecting TMPDIR stays: the shared temp cannot be swept safely. Only the dot goes. clean sweeps both names so an upgraded install does not orphan its old directory, and retires the legacy one once empty. The package caches keep their dots, since only npm and pnpm read them and neither walks its own cache. Closes #16
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.
Closes #16. Found by another session tracing why one repository's suite had failed every CI run for eight days.
The dot was never load-bearing. Redirecting TMPDIR away from the shared
/var/folderstemp is deliberate and stays, because a job that leaks into the shared temp cannot be swept safely. Naming the target.tmprather thantmpwas incidental tidiness, and it silently breaks any tool that applies dotfile-ignore rules to an absolute path rooted atos.tmpdir().It fails by ignoring everything rather than erroring, which is why it survived both a machine-contention explanation and a timeout raised more than fourfold.
cleannow sweeps both names so an install predating this does not orphan its old directory, and removes the legacy one once empty. On this machine that is about 1.4GB across four runners.The package caches keep their dots. Only npm and pnpm read those and neither walks its own cache, so the hazard does not apply. The asymmetry is commented so it does not read as an oversight.
Applying it to a live install needs
runpool rewrite-agentsand a restart cycle, since the environment lives in the launch agent. Not done here.