fix: installer removes temporary files after failed commands#104049
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 9:52 PM ET / July 11, 2026, 01:52 UTC. Summary PR surface: Tests +32, Other +2. Total +34 across 2 files. Reproducibility: yes. On current Review metrics: none identified. 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:
Next step before merge
Security Review detailsBest possible solution: Merge the focused caller-scope registration change once exact-head checks finish, retaining one EXIT-owned cleanup list and the wrapped command's original exit status. Do we have a high-confidence way to reproduce the issue? Yes. On current Is this the best way to solve the issue? Yes. Assigning into a named caller variable fixes the root Bash scope issue, converts every affected caller, preserves the existing cleanup lifecycle, and follows the merged sibling installer pattern instead of adding a competing cleanup mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 67e1d4391153. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +32, Other +2. Total +34 across 2 files. 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
|
|
Land-ready proof for exact head
Known proof gaps: none. |
|
Merged via squash.
|
…w#104049) * fix(installer): retain temp cleanup registrations * chore: keep installer release notes release-owned
Related: #103725
What Problem This Solves
Fixes an issue where failed primary installer operations could leave downloaded scripts and diagnostic logs in
/tmpbecause their cleanup registrations were lost before the installer exited.Why This Change Was Made
mktempfilenow assigns its result into a caller variable, so the parent shell retains every path in its cleanup list. All seven callers use that interface; the existing Bash 3.2-safe cleanup loop remains unchanged.This is an AI-assisted maintainer follow-up to the CLI installer cleanup in #103725.
User Impact
Failed and successful
install.shoperations now remove installer-owned temporary files while preserving the wrapped command's exit status.Evidence
tbx_01kx7czzpbmz1019khv7ss8tza(Linux):corepack pnpm test test/scripts/install-sh.test.ts test/scripts/install-cli.test.ts— 91 tests passed./bin/bash -n scripts/install.shpnpm exec oxfmt --check test/scripts/install-sh.test.tsgit diff --check