fix(daemon): make the data directory before logging into it - #15
Merged
Conversation
`summo serve --background` on a machine that has never run Summo failed with a bare "No such file or directory": the log file is created inside `~/.summo`, and on a fresh install nothing had made `~/.summo` yet. Found by running the released tarball against an empty home, which is the only situation in which it happens — and the first thing a new user does.
`full-flow` failed with "libsherpa-onnx-c-api.so: cannot open shared object file" on a run whose only change was a one-line fix in the daemon. The binary is linked with an `$ORIGIN` rpath, which is right for the shipped bundle where the libraries sit beside the executable; out of `target/debug` it works only because Cargo copies them there while the build script runs, and on a warm cache the build script does not run. Cargo's own `deps/` always has them, so the harness puts that on the library path. Reproduced by moving the copies out of `target/debug` — the daemon then failed to start exactly as it did on CI, and passed with this.
The previous commit inserted a helper between `export` and `async function boot`, which exported the helper and left `boot" unexported — `assistant.mjs` imports it by name and died on a module error. Caught by running the whole suite rather than the one test the change was about.
`full-flow` has been failing with "libsherpa-onnx-c-api.so: cannot open shared object file" on runs that changed nothing near it. The library is put beside the binary by the crate's build script; a warm cargo cache skips the build script, and the `$ORIGIN` rpath then points at a directory with nothing in it. The harness now also puts `target/debug` and its `deps` on the library path, which covers the local case, and this covers the one where the file is not in the target directory at all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summo serve --backgroundfailed on a machine that had never run Summo:The log a background daemon writes lives in
~/.summo, and on a fresh install nothing has made~/.summoyet — the background start is itself the first thing that touches it.Found by unpacking the released tarball and pointing it at an empty home, which is the only case where it happens, and the case every new user is in.
🤖 Generated with Claude Code