Repository navigation
test: one temp folder per test run, removed when the run ends - #24
Merged
Merged
Conversation
On Linux, Playwright's and Vitest's global setup make one folder per run and point TMPDIR at it. Workers and the apps they launch inherit it, so every tmpdir() folder a test makes goes under it, and the teardown removes it. Before, each e2e test left about 3 MB of user data in /tmp (over 1 GB a full run, about 124 GB after two days), and a unit run left 49 folders. Checked against a scratch TMPDIR: smoke + core e2e (26 passed) and the unit suite (580 passed) leave nothing but Playwright's transform cache; without the change, smoke leaves 4 orbit-e2e folders and a unit run 49. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 7b1287f7-8d3d-4a45-97e5-e95a3ab16a3d) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 9a39b9ad-8b0c-4a5d-8b9e-0945c337667f) |
siyabendoezdemir
added a commit
that referenced
this pull request
Oct 11, 2026
…to lane/feel Conflicts, both sides kept: - OverlayApp.tsx, PeekLayer.tsx, SidebarItems.tsx: import lines only (keys' ShortcutSheet, useKeymap and useShortcutLabel beside the motion imports). - feature-status.json: keys' KS-09 and the lane's FL-15; FEATURES.md regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Test runs now clean up the temp folders their tests make. Before this, the e2e harness and the unit tests never removed theirs.
Why
/tmp, about 2.7 MB a test. That's over 1 GB for a full suite run./tmpheld about 47,000orbit-e2e-*folders, about 124 GB, with 77 GB left on the disk.What changes
tests/run-tmp.tsis the global setup for both Playwright and Vitest. On Linux it makes one folder per run (orbit-run-*) and pointsTMPDIRat it.TMPDIR, and so do the apps they launch. So everymkdtempSync(join(tmpdir(), …))in a test goes under that folder, and so do the apps' own temp files.tmpdir().tmpdir()readsTEMPandTMP, notTMPDIR, so the setup would do nothing there.Checks
Each run below points
TMPDIRat an empty scratch folder first, then counts what's left in it afterwards:./node_modules/.bin/vitest run, 580 passed): nothing left with the change, and 49 folders without it (orbit-history-*,orbit-downloads-*,orbit-archive-*and others).smoke.spec.tsandcore.spec.ts, 26 passed): nothing left with the change except Playwright's own transform cache, which it keeps between runs.smoke.spec.ts, 4 passed): 4orbit-e2e-*folders, 7.1 MB in all.Merge gate (D42), run locally on Linux
On
600e03e, in this PR's worktree. That head has the review fix (cb30e1a) withmain332fb99merged in, which brings import (PR #22) and keys (PR #23).npm run build,npm run typecheck,npm run lintand./node_modules/.bin/vitest runall exit 0. Unit: 850 passed of 850, in 83 files.xvfb-run -a -s "-screen 0 1440x900x24" ./node_modules/.bin/playwright test --workers 1 --retries 0ran 589 tests in 28.0 min: 585 passed, 4 skipped, 0 failed, and it exited 0.test.fail().orbit-run-*folder was left in/tmpafterwards.b7b1dccbeforemainmoved: 499 passed, 4 skipped, 0 failed, and it left no folder either.Review
APPROVE, no must-fix (
reviews/lead-tmp.md, onb7b1dcc).TMPDIRpointed at an empty folder each time:--listleaves nothing, and no socket appeared underTMPDIR.TMPDIR.scripts/perfandscripts/capturearen't affected.orbit-run-*folder (D63 (2)).tests/run-tmp.ts's comment now gives the right reason for Linux only (cb30e1a).🤖 Generated with Claude Code
Note
Low Risk
Test-harness-only change with no production paths; Linux-specific behavior and a no-op elsewhere.
Overview
Adds shared global setup for Playwright and Vitest via
tests/run-tmp.ts. On Linux, each run creates a singleorbit-run-*directory, setsTMPDIRso workers and launched Electron apps put alltmpdir()-based paths and app temp files under it, and recursively deletes that folder when the run finishes (killed runs may leave one folder).No test edits—existing e2e/unit code already uses
tmpdir(). On non-Linux platforms the setup is a no-op.Reviewed by Cursor Bugbot for commit 600e03e. Bugbot is set up for automated code reviews on this repo. Configure here.