Skip to content

mutate: a run's TMPDIR is made under the caller's, not inside the tree - #75

Merged
aledbf merged 1 commit into
mainfrom
mutate-short-tmp
Oct 31, 2026
Merged

aledbf merged 1 commit into
mainfrom
mutate-short-tmp

Conversation

@aledbf

@aledbf aledbf commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Each run's TMPDIR was <work>/trees/<n>/tmp, for example /tmp/mutate-3939977273/trees/5/tmp. A test's t.TempDir() then adds its name and /001, so in a test with a long name a unix socket went past the 108 bytes the path may have (bind: invalid argument). The test failed with nothing broken and was asked about no edit, so the lines only it reached came out SURVIVED.

In spin this hit eight tests: cmd/supervisor's keep, token and signing tests, and cmd/cli's ssh-mux tests. Touching run put the keep dispatch in the fleet gate, which blocked spin-stack/spin#747 there.

Now each run gets os.MkdirTemp("", "m"): still empty, still its own, still removed after. The new test binds a socket from a long-named test's directory under a deep tree, and it fails on the old code. The site's mutate page says why the directory is where it is.

Checked with task test and task lint.

🤖 Generated with Claude Code

Each run's TMPDIR was <work>/trees/<n>/tmp. A test's t.TempDir() adds its name
and two levels more, so a test with a long name that binds a unix socket there
went past the 108 bytes a socket path may have: it failed with nothing broken,
and the lines only it reached came out SURVIVED. Eight tests in spin hit this,
among them cmd/supervisor's keep tests on the fleet gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 1a659a2 into main Oct 31, 2026
3 checks passed
@aledbf
aledbf deleted the mutate-short-tmp branch October 31, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant