mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
bedcba2b9b
* fix(signal): clean up signal-cli download temp dir on every exit path installSignalCliFromRelease created a temp dir with fs.mkdtemp for the download archive but never removed it. Every return path — including the success return and the extraction-failure / binary-not-found errors — leaked the directory plus the downloaded archive (signal-cli Linux-native archives are ~50-130 MB). Repeated installs or retries accumulated multi-hundred-MB temp dirs under the preferred tmp dir. Wrap the body after mkdtemp in try/finally that recursively removes the temp dir. The extracted binary is installed under CONFIG_DIR and is unaffected. Co-Authored-By: Claude <noreply@anthropic.com> * style(signal): drop unnecessary String() conversion in test spy dir is already a string (mkdtemp return); String(dir) triggers the no-unnecessary-type-conversion lint rule. Co-Authored-By: Claude <noreply@anthropic.com> * test(signal): cover success-path temp dir cleanup with real archive Add a success-path test that mocks the network fetch to return a real tar.gz archive (containing a signal-cli binary) so installSignalCliFromRelease runs the full download -> extract -> find-binary -> chmod path against real bytes, then asserts the temp dir and downloaded archive are removed by the finally clause. This complements the existing error-path test so both exit paths are covered. Co-Authored-By: Claude <noreply@anthropic.com> * fix(signal): use owned temp download workspace * fix(signal): allow bounded native extraction --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>