* fix(#856): remove gsd-cmd-rewrites temp dirs after install applyRuntimeContentRewritesForCommandsInPlace() returns a fresh mkdtemp dir under os.tmpdir() (gsd-cmd-rewrites-*) with rewritten command markdown. installRuntimeArtifacts() copied from it but never removed it, leaking one temp dir per commands kind per install — on tmpfs /tmp hosts these accumulate and consume RAM-backed storage. Wrap the per-kind copy in try/finally and rmSync the temp dir (only when it differs from the staged source, i.e. the commands kind) once the copy completes or fails. dest creation moved inside the try so a mkdir failure still triggers cleanup. Regression test isolates os.tmpdir() to a private TMPDIR root and asserts no gsd-cmd-rewrites-* dir survives the install. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(#856): add changeset for installer temp-dir cleanup Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
377 B
377 B
type, pr
| type | pr |
|---|---|
| Fixed | 862 |
Installer no longer leaks gsd-cmd-rewrites-* temp directories. Each install that emitted slash commands left one fs.mkdtempSync directory under the system temp root; on tmpfs /tmp hosts these accumulated and consumed RAM-backed storage. installRuntimeArtifacts() now removes the temp copy in a finally once command files are copied.