acpmux: a turn a daemon restart cut off resumes by itself, before the queue behind it
Merged
TE
10d ago+619+619+012345678901234567890123456789-8-8-0123456789
Leo's exact words: "ACPMUX daemons, peer routing and messaging across machines."
A daemon restart can interrupt a turn after its agent host has exited. Before this change, acpmux marked that turn outcome_unknown and immediately ran prompts queued behind it, leaving the interrupted work idle until a person typed “continue”.
This PR makes the restart recovery resume the interrupted turn first:
- During log recovery, append one idempotent continuation before the
outcome_unknownresult. The continuation uses the cut prompt's next attempt id (<prompt>~resume-<n>), quotes the original prompt and steers, and records_meta.provenance.kind=auto_resumewithreason=daemon_restart. - Restore it through the ordinary durable queue and move it to the head, including the crash window before
queue_orderis written. Prompts queued behind the cut turn remain behind it and each runs once. - Preserve the cut turn's control, trust gate, and kept prompt images. A Web steer keeps the resumed turn in Web control and re-enters the folder trust gate.
- Respect
autoResumeDelaysMs: []and stop a restart chain after the existing four-attempt bound.
Leo's call is limited to daemon restart recovery; the daemon update schedule and trigger remain in #23199.
Changelog
Fixed: acpmux resumes a turn interrupted by a daemon restart before running prompts queued behind it.
Verification
- Hosted focused verification run 40017332381 on exact head
598b2a5b4bc5b229b3fdf56f0ca3882e642ce178: selected durable-agent test, Rust MSRV, Go pane, and daemon artifact jobs passed. - Hosted Linux/macOS clippy failures are base-red: both report the unrelated base file
cmux-tui/crates/cmux-tui-core/src/mux/resource_topology/creation_settlement.rs:35, which this PR does not touch. - Local
rustfmt --edition 2024 --checkandgit diff --checkpass. Native app builds were not run locally.
Risk: risk:normal.
Agent session: huge-blue