Problem
/api/analyze writes the uploaded contract to a mkdtemp directory before invoking the CLI. The cleanup (rm) is not in a finally that always runs — if the CLI subprocess throws or the timeout-kill path fires, the temp dir is leaked.
Acceptance Criteria
Pointers
Difficulty
Easy. Pure correctness fix.
Problem
/api/analyzewrites the uploaded contract to amkdtempdirectory before invoking the CLI. The cleanup (rm) is not in afinallythat always runs — if the CLI subprocess throws or the timeout-kill path fires, the temp dir is leaked.Acceptance Criteria
try { ... } finally { await rm(tmpDir, { recursive: true, force: true }); }Pointers
Difficulty
Easy. Pure correctness fix.