Repository navigation
feat(cli,daemon): relocate daemon exe to global runtime-binaries dir - #158
Merged
Merged
Conversation
Closes #134. Refines the lock-avoidance design from PR #135. The previous in-place `unlock_exe()` left `.old.<rand>` siblings next to the canonical exe (e.g. `Scripts/zccache-daemon.exe.old.123`), which clutters the Python install location and makes GC awkward. New flow: 1. CLI's `prepare_daemon_exe()` copies the daemon binary from its install path into `<global_cache_dir>/runtime-binaries/zccache-daemon.<rand>.<ext>` before spawning. The install path is never executed in place, so `pip install --upgrade zccache` always works. 2. `gc_runtime_binaries()` runs on every spawn — `fs::remove_file` on every entry. Locked files (live daemons) are silently skipped by the OS, so no PID tracking or sidecar files are needed. 3. Daemon's `unlock_exe()` short-circuits when `current_exe()` lives under `runtime-binaries/`. It remains as a fallback for direct invocations of `zccache-daemon.exe`. Tests: - 4 unit tests in `zccache-cli`: copy + create-missing-dir + GC happy path + GC missing-dir no-op. - Existing `tests/exe_overwrite.rs` (Windows-only) still validates the daemon's fallback in-place rename path. Documentation: rewrote `crates/zccache-daemon/README.md` to describe the two-layer flow and the `ZCCACHE_NO_UNLOCK` opt-out. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2 tasks
zackees
added a commit
that referenced
this pull request
May 11, 2026
Patch bump covering everything merged since v1.4.0: - fix(daemon,ci): tolerate unknown sessions and stop killing soldr's daemon (#168, closes #166 + #167) - feat(cli): expose session_end_idempotent for all daemon callers (#163) - fix(daemon): deterministic flush primitive for event log (#162) - feat(cli,daemon): relocate daemon exe to global runtime-binaries dir (#158) - fix(depgraph): normalize workspace-path inputs out of rustc cache key (#160) - perf(ci): trim platform Test, drop --all-targets from Check, split Test/Check jobs (#161, #164, #165) - chore(ci): drop invalid target-cache-paths from build-target action (#157) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.
Closes #134. Implements the design from #134 (comment).
Summary
Test plan
🤖 Generated with Claude Code