mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-08 08:53:43 +08:00
On macOS the signed-candidate preparation folded every step into one boolean, so each failure printed the same line: "signed update candidate preparation failed". A full /tmp read exactly like a broken codesign. That is what a cli test hit on 2026-10-09, while a multi-GB index was filling a nearly full disk. Each step now records why it failed, and the update prints, for example: error: signed update candidate preparation failed while writing the unsigned candidate: No space left on device The staging functions in activation_transaction.c keep the errno of the failing write (or sync, close, read) through their cleanup, so a caller can name it. The non-macOS path adds the OS error to its existing "failed to stage verified update" line (POSIX only; Windows reports through GetLastError). A failed fingerprint of the staged file now gets its own message instead of "...: activation transaction completed". A test seam makes the next staging write fail with a chosen errno. The new test cli_update_names_the_failing_staging_step_and_os_error fails without the cli.c change and passes with it, and checks that the old executable stays in place. Also checked on real input: with /tmp on a small volume that fills between two updates, the update prints the line above. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>