Repository navigation
refactor(test): centralize declaration guard temp cleanup - #110311
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 10:12 PM ET / July 18, 2026, 02:12 UTC. Summary PR surface: Tests -27. Total -27 across 1 file. Reproducibility: not applicable. This PR is a test-maintenance refactor, not a report of broken user-facing behavior. The supplied focused test command exercises the affected declaration-guard suite. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Merge the narrow refactor after the protected-label maintainer review confirms the shared helper contract remains the intended cleanup standard. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a test-maintenance refactor, not a report of broken user-facing behavior. The supplied focused test command exercises the affected declaration-guard suite. Is this the best way to solve the issue? Yes: centralizing allocation and teardown through the existing shared test helper is the narrow maintainable solution, provided normal maintainer review confirms the helper contract. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against d8f2645c2ced. Label changesLabel justifications:
Evidence reviewedPR surface: Tests -27. Total -27 across 1 file. View PR surface stats
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
Review history (1 earlier review cycle)
|
35541ba to
519d0dc
Compare
|
Merged via squash.
|
What Problem This Solves
Removes 21 repeated raw temporary-directory allocations and the file-local cleanup loop from the script declaration guard tests. The changed-file gate flagged every allocation for migration to the shared test helper.
Why This Change Was Made
Uses
useAutoCleanupTempDirTracker(afterEach), the repository-standard test helper, for every fixture root. This deletes duplicate cleanup state and keeps teardown behavior centralized.AI-assisted. The change passed the repository
autoreviewworkflow with no actionable findings.User Impact
No product behavior change. Test cleanup is simpler and the temp-directory migration guard is warning-free.
Evidence
node scripts/run-vitest.mjs test/scripts/check-script-declarations.test.ts— 21 passed.node scripts/check-changed.mjs -- test/scripts/check-script-declarations.test.ts— formatting, test typecheck, script lint, declaration guard, and temp-directory migration report passed on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/29626157179