Repository navigation
fix(verify): keep TLC's Java temp dir inside its metadir - #8758
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 32 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: the single commit in sh/tlc.py.
- Java temp dir: passes
-Djava.io.tmpdir=<meta>so TLC'stlc-<n>directory is created inside the run's locked metadir.releaseremoves it on exit, and the next run's sweep removes it after a crash. - Docstring: notes why the JVM's temp dir points into the metadir.
meta is a plain mkdtemp path, and command is passed as a list, so quoting is not a concern. The -cp and tlc2.TLC arguments stay in order after the JVM options.
claude-sonnet-5-5 | 𝕏
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.

Problem
Every TLC run leaves an empty
/tmp/tlc-<n>directory behind. TLC creates it underjava.io.tmpdir, which the JVM sets to/tmpand never reads fromTMPDIR. One host had 3,213 of them.The other half of the reported bug (the
-metadir "$(mktemp -d)"metadir never being removed, 26 GB after one interruptedResumeReaderrun) was already fixed onmainby moq-dev/moq#8628, which moved bothtlarecipes intosh/tlc.pywith a locked, swept metadir under.tmp/tlc/.Approach
sh/tlc.pyrunsjavadirectly, not through nixpkgs'tlcwrapper, so it passes-Djava.io.tmpdir=<metadir>. TLC's temp directory then lives in the run's metadir and is removed with it, both after a normal exit and by the next run's sweep after a crash. Thejust rs tla <spec> [args]andjust js tla ...interface is unchanged.Impact
None on the public API or wire format.
Alternatives
TMPDIRorJAVA_TOOL_OPTIONS: the first has no effect on the JVM, and the second also makes the JVM print a "Picked up" line on every run. The command-line flag is simpler.Follow-ups
None.
Validation
main:quest gate just js tla watch/verify/Watch.tlapassed and added/tmp/tlc-6891928372904236727./tmp/tlc-*, and.tmp/tlc/held only.lock.quest gate just rs tla moq-net/verify/resume/ResumeReader.tla, waited for the firstProgressline, then sent SIGINT to the gate. During the run, the metadir heldlock, the state dir, andtlc-5770901046169097615. That last directory is TLC's temp dir, now inside the metadir. The run exited 130, and afterward no TLC process remained, no new/tmp/tlc-*existed, and.tmp/tlc/held only.lock.nix develop --command just cipassed.Caused by
java.io.tmpdiranywhere, so every run left a/tmp/tlc-<n>directory (found by person). moq-dev/moq#8628 fixed the metadir leak but kept this behavior.Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: c19bf8f
Base: origin/main at 98ed0f8
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1de0b-0402-7fa0-8dbf-c954c50d09a4, round 1Score: 9/10,
The JVM temporary-directory setting correctly uses the per-run cleanup directory, with no actionable regressions found by source review; tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none