fix(test): cap Rstest worker socket paths - #341
Conversation
🦋 Changeset detectedLatest commit: 919dcb7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba28f12ed9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .update(workerId, 'utf8') | ||
| .digest('hex') | ||
| .slice(0, 16); | ||
| return join('/tmp', `ab-rstest-${hash}`); |
There was a problem hiding this comment.
Keep hashed worker roots in the cleanup lifecycle
When check:local-ci is run repeatedly, scripts/local-ci.mjs deletes and recreates only the per-leg TMPDIR, but this path now lives beside it directly under /tmp. Consequently, worker caches such as cache/cmd-<pid>-<serial> and any fixtures left by interrupted tests survive every rerun and accumulate indefinitely, defeating the runner's documented clean-temp guarantee and potentially exhausting /tmp or contaminating later runs. Ensure these hashed roots are removed as part of each run or otherwise tie their lifetime to the per-leg directory.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in #397 (merged as d25a9c6). rstest.worker-isolation.ts writes an owner marker (.ab-rstest-owner.json with pid + start time) into each hashed worker root, and scripts/local-ci.mjs calls the new scripts/rstest-worker-roots.mjs to remove only roots whose owner has exited — other lanes' live roots are never touched. Proven by tests/rstest-worker-isolation.test.ts; documented in docs/local-ci.md.
Include the worktree/process invocation identity in short worker roots so parallel runs cannot share temporary fixtures.
ba28f12 to
919dcb7
Compare
Closes #335
Summary
/tmp/ab-rstest-<hash16>sun_pathcap for nested Doctor socket fixturesRed/green evidence
Test plan
pnpm buildpackages/agent-bundle/tests/doctor.test.ts— 36/36packages/agent-bundle/tests/rstest-worker-isolation.test.ts— 1/1pnpm typecheckpnpm lint— 0 errors, 0 warningspnpm check:local-ci --current-node-onlythrough unit — build/typecheck/lint and 2616/2621 unit tests passed (5 skipped); the untouched integrationcli.test.tsthen hit the machine-installed Codex 0.147.0 host-validation diagnostic mismatch