Repository navigation
acpmux vault: refuse clearly on an older daemon, bound output reads by the deadline, status reports the daemon's store - #34190
Conversation
…y the deadline, status asks the daemon's store, no new panic-ratchet hits (#34178) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Owned by an agent session · session |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a web and size checks: green Shipped in:
|
|
Found 2 test failures on Blacksmith runners: Failures
|
teamleaderleo
left a comment
There was a problem hiding this comment.
Review (codex gpt-6-astra high, next-review, since=20261103T202138Z): SHIP at 8003f9f
SHIP at 8003f9f
Visual verdict: unchanged by this diff.
- [P2][follow-up]
cmux-tui/crates/acpmux/src/cli/host_vault.rs:216—status_cmdnow callsdaemon::connect(false)without a deadline. If a stale daemon socket accepts connections but never answersinitialize,machine vault statuscan hang indefinitely. Bound this connection/request or use the existing bounded running-daemon connector.
Follow-ups:
- [P2][follow-up] Bound the daemon connection used by
store_kind.
teamleaderleo
left a comment
There was a problem hiding this comment.
Review (codex gpt-6-astra high, next-review, since=20261103T210538Z): SHIP at c653b99
SHIP at c653b99
Visual verdict: unchanged by this diff
No actionable findings. All 16 supplied image pairs are identical; Rust tests could not run without Cargo, and the Python guard requires Git metadata absent from this snapshot.
Follow-ups: none
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #34178, the follow-ups from the review of #33638 (receipt).
machine vault pull|forgetused to reconnect to the same old daemon and fail again with method-not-found. A running daemon that answers method-not-found is no longer asked a second time. When this machine has no usable OS store, the command now refuses withvault.daemon_outdated: "the running acpmux daemon is older than this CLI ...; runacpmux daemon restart, then pull again". It does not restart the daemon on its own, since a vault pull should not take down the person's sessions. With a usable OS store, the pull still runs in the CLI as before.capture_untilused to join the reader with no time limit after the command exited. The reader now hands its output back through a channel, and the CLI waits for it only until the deadline. A descendant that keeps stdout open (sh -c 'sleep 20 & exit 0') now ends asvault.secret_store_timeoutat the deadline. Tests cover that case and a normal exit that returns its whole output.statusreports the daemon's store. A new local-only_acpmux/vault_statusreturns{store}from the daemon's own selection.machine vault statusreads it from the daemon, and falls back to the CLI's own probe only when no daemon is running or the daemon is too old to answer. The protocol IR and the generated web methods are updated, and the method is listed undermachine.vault.pull.v1.Panic ratchet. The ratchet job on #33638 (run 41682517900) was already red on base:
acpmux indexing_slicingwas 714 > 686 on #34058's run, plus non-deny counts across many crates this code doesn't touch. #33638 added 1 indexing hit and 9 arithmetic hits on top of that. This PR removes every ratchet hit in the vault code: it replacesValueindexing incli/host_vault.rswith.get(), and uses saturating or checked arithmetic invault/wire.rs,vault/store.rsandvault.rs. The base's other hits are not ours and are left alone.Checks (fleet
cmux-ci, job 5fbfeade7bc49191ce418e35):cargo test -p acpmux --libvault, protocol_ir, capability and host_vault tests: 55 passed.cargo clippy -p acpmux --lib --bins --tests: clean in the touched files.vault*andcli/host_vault.rs: no hits.tests/test_send_path_caps.py: OK.No value is printed, logged or put in argv.
Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the follow-ups from the
vault pullreview (#33638): pulling and forgetting against an older daemon no longer retries and fails twice, output reads from store commands are bounded by the command deadline, andmachine vault statusreports the store the running daemon uses.Changes
vault.daemon_outdatedand tells you to runacpmux daemon restart.capture_untilhands output back through a channel and waits only until the deadline, so a descendant keeping stdout open ends asvault.secret_store_timeout._acpmux/vault_statusreturns{store}from the daemon's own selection, with fallback to the CLI's own probe when no daemon runs or it is too old; protocol IR and generated web methods are updated.Valueindexing with.get()and uses saturating or checked arithmetic in vault code, clearing this PR's panic-ratchet hits.Written for commit c653b99. Summary will update on new commits.