buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(acp): resume pending turns after Desktop restart

Open Tiago-Sonar opened this issue 3 months ago • 1 comments

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_restart setting 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=31a1776cadd43bc656a438e5a89b052b476bf9f1919ae73bcbd99e7738e60f4a

Testing

  • 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.

Tiago-Sonar avatar Aug 07 '26 11:08 Tiago-Sonar

@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.

Tiago-Sonar avatar Aug 07 '26 13:08 Tiago-Sonar