Repository navigation
feat(cli): add zccache release-handles --path X (#694 Phase 2) - #741
Merged
Merged
Conversation
Phase 2 of #694 — the standalone CLI surface for the daemon-side `Request::ReleaseWorktreeHandles` handler that already exists from #690 work. Useful for direct-zccache consumers (FastLED CI teardown, sysadmin scripts) that need to break the daemon's per-session journal + log handles before `git worktree remove` / `rmdir` on Windows. ## What ships - `zccache release-handles --path <X> [--json] [--endpoint <X>]` CLI subcommand that sends `Request::ReleaseWorktreeHandles { path }` to the daemon and prints the typed result. The daemon's existing cache-root safety guard (refuse if the target contains the cache root) surfaces as a non-zero exit with a stderr message. - `ipc::daemon_release_worktree_handles_roundtrip(endpoint, path, recv_timeout)` — companion to `daemon_control_roundtrip` for the one path-carrying request that cannot route through the existing `Copy` `DaemonControlRequest` enum. Mirrors the same wire- selection dispatch (`Auto`/`Bincode`/`Prost`/`Frame` with the broker-lane override) so the new path inherits the same wire semantics as `Clear`, `Status`, etc. ## What is staged for follow-ups in #694 - Phase 3+ — `zccache router serve` skeleton, control-plane protocol, backend management, FD handoff, router-aware client. Refs #694, #735
2 tasks
This was referenced Jun 14, 2026
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.
Phase 2 of #694 — the standalone CLI surface for the daemon-side
Request::ReleaseWorktreeHandleshandler that already exists from #690. Useful for direct-zccache consumers (FastLED CI teardown, sysadmin scripts, anything doinggit worktree remove/rmdiron Windows) that need to break the daemon's per-session journal + log handles deterministically before tearing down a path.What ships
zccache release-handles --path <X> [--json] [--endpoint <X>]CLI subcommand: sendsRequest::ReleaseWorktreeHandles { path }to the daemon and prints the typed result. The daemon's existing safety guard — refuse if the target contains the cache root — surfaces as a non-zero exit + stderr message.ipc::daemon_release_worktree_handles_roundtrip(endpoint, path, recv_timeout)— companion todaemon_control_roundtripfor the one path-carrying request that cannot route through the existingCopyDaemonControlRequestenum. Mirrors the same wire-selection dispatch (Auto/Bincode/Prost/Frame+ thebroker_lane_active()override) so the new path inherits the same wire semantics asClear,Status, etc.Net diff: 4 files changed, 209 insertions(+), 0 deletions. Pure additive surface — no existing callers changed behavior.
Sample output
What is staged for follow-ups in #694
zccache router servecontrol-plane skeleton +Hello/HelloReplyplumbing.DuplicateHandle(Windows) /SCM_RIGHTS(Unix) FD handoff.ZCCACHE_USE_ROUTER=1.Test plan
cargo check -p zccache --bin zccachecleancargo build -p zccache --bin zccachecleanzccache release-handles --helprenders correctlyResponse::ReleaseWorktreeHandlesResultwith the expected zeros for a path with no matching sessionsrelease-handlesadded toKNOWN_SUBCOMMANDSso the binary distinguishes the subcommand from a compiler-wrap invocationRefs #694, #735