You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tests leak temp directories: /tmp held ~175 000 tole-* and cora-* entries (17 GB) after a day of agent work #781
Found while the build disk hit 0 MB free during the #752 module moves (2026-11-14). /tmp held 174 356 entries and 17 GB, almost all tole-* (166 795) and cora-* (7 324) directories created by the test suites and never removed.
Top patterns (one per test run, names normalised): tole-sens-e2e-N-N (23 166), tole-trust-N-N (8 932), tole-skapprove-e2e-N-N (5 545), tole-discuss-race-N-N (2 460), tole-apply-N-N (2 101), tole-tui-e2e-N-N and its .home twin (about 1 600 each), tole-profile-e2e-N-N, tole-compaction-N-N, tole-cfg-e2e-N-N, tole-owner-N-N-N, tole-sbxc-e2e-N-N, tole-cmd-policy-N-N, tole-curator-e2e-N-N, tole-compactor-N-N.
Why it matters
Several agents and developers run the whole suite many times a day; each run leaves fresh directories. On a small disk this fills the volume (an agent's git commit failed with no space) and slows ls /tmp and cleanup.
Test dirs can hold fixtures with fake secrets, homes and session logs; they should not outlive the test.
A tiny shared test helper (an RAII TempDir guard that removes the directory on drop, including on panic where possible) in a test-support module of each crate (or the tempfile dev-dependency if the dependency budget allows; check with the owner's dependency rules), and replace the hand-rolled std::env::temp_dir().join(format!(...)) plus create_dir_all patterns across the integration tests and unit tests.
Directories that a spawned child still uses after the test returns (daemons, detached jobs) must be cleaned by the test explicitly.
A guard test or a CI step that runs the suite and fails if the count of tole-* entries in $TMPDIR grew (set a per-run TMPDIR under the runner temp dir and assert it is empty at the end).
Several small PRs (one crate or one family of tests each); no behaviour change.
Activity
test: add WorkDir for tests whose home twin sits next to the workdir
test(tui): remove the file-walk test directory when the test ends or …
test: add a self-removing TestDir helper for the test suites (#781 pa…
test(core): keep the sandbox lifecycle workspaces owned by their guards
test(cli): keep the startup probe test outside the repository checkout
test(core): give the new discussion retry tests their directory guard
test(cli): give the new discussion retry tests their directory guard
test(cli): give the new discussion timeout end-to-end test its direct…
test: config, trust, sensitive and apply tests use TestDir instead of…
test: cli integration tests a to m use TestDir instead of leaking dir…
test: cli integration tests n to z use TestDir instead of leaking dir…
test: cli unit tests for delegation, discuss, skill and plugin use Te…
test: cli unit tests for session, serve, tools and main use TestDir (#…
test: core unit tests for children, tools, turn, jobs, run_command an…
test: the remaining core unit tests and the tole-tui file-walk test u…
test: core integration tests use TestDir and CARGO_TARGET_TMPDIR inst…
test: drain a discuss tool test's background discussions before its d…
test: reap a delegate test's fake children before their directory is …
test(cli): remove the key files the webhook_out tests create
ci: shard the Test job over workspace members (#1101)
ci: shard the Test job over workspace members (#1101)
test(serve): remove the directory that holds the mission test workspa…
docs(epics): refresh the open-work table and open owner decisions (20…
docs(epics): refresh the open-work table and open owner decisions (20…