test: prefer auto-cleaning temp dir helper#93209
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codex review: passed. Reviewed July 1, 2026, 10:45 PM ET / 02:45 UTC. Summary PR surface: Tests +301, Docs +1, Other +248. Total +550 across 8 files. Reproducibility: not applicable. this is test/tooling cleanup, and the changed behavior is exercised through helper/reporter tests and CI evidence rather than a user reproduction path. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge after exact-head CI/automerge gates remain green, keeping the reporter warning-only while the helper migration policy settles. Do we have a high-confidence way to reproduce the issue? Not applicable; this is test/tooling cleanup, and the changed behavior is exercised through helper/reporter tests and CI evidence rather than a user reproduction path. Is this the best way to solve the issue? Yes; centralizing Vitest-owned cleanup in the shared top-level test helper and limiting reporter checks to added lines is the cleanest migration path without breaking existing callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7fa26e088d28. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +301, Docs +1, Other +248. Total +550 across 8 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
bfd66dc to
6d20b83
Compare
|
Positive temp-dir helper validation result:
Known unrelated CI state:
|
6d20b83 to
83a0dcb
Compare
|
Follow-up update after tightening the helper shape:
Current validation on head
|
83a0dcb to
2ed18af
Compare
2ed18af to
c84e510
Compare
9699b92 to
1fdd7d2
Compare
|
Rebased after #96711 landed and resolved the shared Fixed the staged-mode ClawSweeper finding: Local proof on head
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper automerge |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper approve |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper approve |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper automerge |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper automerge |
Summary: - The branch adds `useAutoCleanupTempDirTracker()`, broadens the temp-dir warning reporter to flag new manual helper imports/usages, updates docs, and migrates two script tests to the new helper. - PR surface: Tests +301, Docs +1, Other +248. Total +550 across 8 files. - Reproducibility: not applicable. this is test/tooling cleanup, and the changed behavior is exercised through helper/reporter tests and CI evidence rather than a user reproduction path. Automerge notes: - PR branch already contained follow-up commit before automerge: test: harden temp dir helper guard - PR branch already contained follow-up commit before automerge: test: clarify auto cleanup temp dir helper name - PR branch already contained follow-up commit before automerge: test: cover existing mkdtemp temp dir forms - PR branch already contained follow-up commit before automerge: test: read staged temp helper source from index Validation: - ClawSweeper review passed for head 1fdd7d2. - Required merge gates passed before the squash merge. Prepared head SHA: 1fdd7d2 Review: openclaw#93209 (comment) Co-authored-by: Mason Huang <[email protected]> Approved-by: hxy91819
Summary: - The branch adds `useAutoCleanupTempDirTracker()`, broadens the temp-dir warning reporter to flag new manual helper imports/usages, updates docs, and migrates two script tests to the new helper. - PR surface: Tests +301, Docs +1, Other +248. Total +550 across 8 files. - Reproducibility: not applicable. this is test/tooling cleanup, and the changed behavior is exercised through helper/reporter tests and CI evidence rather than a user reproduction path. Automerge notes: - PR branch already contained follow-up commit before automerge: test: harden temp dir helper guard - PR branch already contained follow-up commit before automerge: test: clarify auto cleanup temp dir helper name - PR branch already contained follow-up commit before automerge: test: cover existing mkdtemp temp dir forms - PR branch already contained follow-up commit before automerge: test: read staged temp helper source from index Validation: - ClawSweeper review passed for head 1fdd7d2. - Required merge gates passed before the squash merge. Prepared head SHA: 1fdd7d2 Review: openclaw#93209 (comment) Co-authored-by: Mason Huang <[email protected]> Approved-by: hxy91819
Summary
useTempDirTracker()totest/helpers/temp-dir.ts, with Vitest-owned automatic cleanup after each test and no exposedcleanup()methodmakeTempDir,cleanupTempDirs, orcreateTempDirTrackeruseTempDirTracker()Verification
env PATH=/root/.nvm/versions/node/v24.15.0/bin:$PATH node scripts/run-vitest.mjs run test/scripts/report-test-temp-creations.test.ts test/helpers/temp-dir.test.ts src/scripts/test-projects.test.ts test/scripts/parallels-package-log-progress-extract.test.ts test/scripts/runtime-postbuild-stamp.test.tsenv PATH=/root/.nvm/versions/node/v24.15.0/bin:$PATH pnpm tsgo:testenv PATH=/root/.nvm/versions/node/v24.15.0/bin:$PATH node scripts/report-test-temp-creations.mjs --base origin/main --head HEAD --json->[]env PATH=/root/.nvm/versions/node/v24.15.0/bin:$PATH pnpm exec oxfmt --check scripts/report-test-temp-creations.mjs test/scripts/report-test-temp-creations.test.ts test/helpers/temp-dir.ts test/helpers/temp-dir.test.ts src/scripts/test-projects.test.ts test/scripts/parallels-package-log-progress-extract.test.ts test/scripts/runtime-postbuild-stamp.test.ts docs/help/testing.mdgit diff --check origin/main...HEAD.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main-> clean, no accepted/actionable findings91b78eb6b8154a2840e2b0f5fb0a8bd9878ddea1:check-guards,check-test-types,check-lint,check-docs,checks-node-core-tooling, andchecks-node-core-tooling-dockerpassed;check-guardsannotations are[]