fix(acp): resume pending turns after Desktop restart - #5181
Open
Tiago-Sonar wants to merge 1 commit into
Open
Conversation
Persist queued and in-flight turns in a bounded atomic ledger so enabled managed agents can recover work after Desktop restarts. Wire the per-agent setting through Desktop configuration and preserve current spawn-snapshot, parallelism, and access behavior. Validation: cargo test -p buzz-acp; ./bin/just desktop-ci; 29 changed Desktop E2E tests; ACP and Desktop Tauri clippy with warnings denied. Co-authored-by: TMC <tiago@sonargtm.com> Signed-off-by: TMC <tiago@sonargtm.com>
Author
|
@block/buzz-oss-team Review requested. This critical restart-recovery fix is mergeable; DCO, Semgrep, and zizmor are green, and the PR body records full ACP/Desktop/E2E validation. |
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.
Summary
Persist queued and in-flight ACP turns in a bounded, atomic local ledger so managed agents can resume admitted work after Buzz Desktop restarts when the per-agent
resume_on_restartsetting is enabled.This wires the setting through Desktop configuration and the agent editor, restores eligible turns during ACP startup, and preserves the current spawn-snapshot, parallelism, and access-control behavior. Ledger retention is bounded and stale entries are pruned.
Related issue
No dedicated GitHub issue found. This repair originated from a live Buzz reliability assessment after admitted turns disappeared during Desktop outages.
Originating Buzz thread:
buzz://message?channel=4c0769da-da97-4e9d-bf12-152ddbaec0aa&id=31a1776cadd43bc656a438e5a89b052b476bf9f1919ae73bcbd99e7738e60f4aTesting
BUZZ_ACP_LAZY_POOL=false BUZZ_ACP_MULTIPLE_EVENT_HANDLING=steer cargo test -p buzz-acp— 765 unit tests, 9 lifecycle integration tests, 1 setup-ledger integration test, and doc tests passed../bin/just desktop-ci— 4,480 frontend tests, production build, Tauri compilation, and complete Tauri workspace tests passed.cargo clippy -p buzz-acp --all-targets -- -D warnings— passed../bin/just desktop-tauri-clippy— passed.../bin/pnpm exec playwright test --project=smoke tests/e2e/edit-agent.spec.ts tests/e2e/global-agent-config-screenshots.spec.ts— 29/29 passed.git diff --cached --check— passed before commit.Scope boundary
This closes the restart-loss path for admitted queued/in-flight turns. It does not add the separate full event-stage audit ledger for receipt, admission/rejection, ACP submission, completion, publication, and relay-accepted reply IDs.