Context
Claude's latest review found that several internal temp files are created with
bare mktemp and removed manually. Normal success and failure paths clean them
up, but an interrupted process can leave them behind. The same cleanup area also
has a real trap preservation gap: the stdlib cleanup dispatcher does not
preserve multi-line pre-existing EXIT trap bodies.
Base is currently the only consumer, so this can be fixed directly without
compatibility wrappers.
Scope
- Preserve multi-line
EXIT trap bodies when installing the stdlib cleanup
dispatcher.
- Register internal temp files for cleanup in:
lib/bash/std/lib_std.sh
lib/bash/file/lib_file.sh
lib/bash/git/lib_git.sh
- Remove harmless empty-string cleanup calls in the file-section remove path.
- Add regression coverage for the cleanup and trap behavior.
Validation
- Focused BATS suites for touched libraries.
- Full
./tests/validate.sh.
Context
Claude's latest review found that several internal temp files are created with
bare
mktempand removed manually. Normal success and failure paths clean themup, but an interrupted process can leave them behind. The same cleanup area also
has a real trap preservation gap: the stdlib cleanup dispatcher does not
preserve multi-line pre-existing
EXITtrap bodies.Base is currently the only consumer, so this can be fixed directly without
compatibility wrappers.
Scope
EXITtrap bodies when installing the stdlib cleanupdispatcher.
lib/bash/std/lib_std.shlib/bash/file/lib_file.shlib/bash/git/lib_git.shValidation
./tests/validate.sh.