Skip to content

docs(tasks): prov's tests leave their fixtures in the temp directory - #25

Merged
adammharris merged 1 commit into
mainfrom
agent/backlog-file-tests-leave-their-fixtures-in-temp
Nov 5, 2026
Merged

adammharris merged 1 commit into
mainfrom
agent/backlog-file-tests-leave-their-fixtures-in-temp

Conversation

@adammharris

Copy link
Copy Markdown
Member

Files a task. There is no code change.

What

A passing cargo test --workspace leaves 741 entries (34 MB, 5,318 files) in the temp directory, and each run adds more.

prov_testkit::scratch builds its path from the process id, so it can only remove a stale directory from its own process. Its comment says the path is stable across runs and that stale directories are removed; the pid rules out both. Nothing removes the directory when a test ends. 29 other files call temp_dir() by hand, mostly to the same pattern.

This matters most where the temp directory is a tmpfs, because the leftovers then hold memory until reboot.

The new task, docs/tasks/tests-leave-their-fixtures-in-temp.md, has the repro, the cause, a suggested starting point and a done-when. The fix is left for whoever takes it.

Verified

  • Ran cargo test --workspace on 1f882e0 with TMPDIR set to an empty directory: 1,238 passed, 0 failed, 741 entries left behind.
  • Ran cargo test -p prov-views twice into one TMPDIR: 10 entries, then 20.
  • prov check, with a build of this branch, reports no findings.
  • The change is documents only, so ship ci was not run.

@adammharris
adammharris merged commit 9b1dcb9 into main Nov 5, 2026
8 checks passed
@adammharris
adammharris deleted the agent/backlog-file-tests-leave-their-fixtures-in-temp branch November 5, 2026 17:17
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