Skip to content

Commit 159a0c0

Browse files
committed
feat(acp): emit activity records and checkpoint on stop
Add an opt-in JSONL activity log that records bounded, redacted tool and lifecycle activity from the observer feed on stderr, so prompts, agent text, and secrets never enter the platform stream. The binary now parses CLI arguments before installing logging because the log format depends on the flag. Add an opt-in stop checkpoint that runs buzz-agent-checkpoint save after sessions drain, including when shutdown cancels startup. It validates the receipt and makes shutdown fail when the checkpoint fails. Signed-off-by: Tee8z <[email protected]>
1 parent 26e426b commit 159a0c0

12 files changed

Lines changed: 1209 additions & 56 deletions

File tree

‎crates/buzz-acp/TESTING.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ Make sure `pi` and `buzz-pi-acp` are on PATH, then restart Buzz.
2121
cargo test -p buzz-acp
2222
```
2323

24+
The package suite also checks owner-only thread routing, ACP full-access negotiation,
25+
redacted JSONL activity, and checkpoint failure propagation. Activity tests use the
26+
real ACP client with a synthetic adapter and assert that test secrets never enter
27+
the platform stream. Checkpoint tests cover validated receipts, command failures,
28+
invalid and oversized output, missing helpers, and timeouts, and check that each
29+
failure records its reason. `tests/checkpoint_stop.rs` stops the real harness
30+
binary with a stub helper on `PATH` and a local fake relay. It checks that a
31+
normal stop checkpoints after adapters stop and presence is `offline`, that
32+
cancelling or failing startup still checkpoints once, and that a failed
33+
checkpoint exits non-zero. Startup failure remains the primary error even when
34+
the checkpoint also fails; activity reports the distinct `startup_failed` reason.
35+
The image repository's `buzz-agent/test-checkpoint-storage.py` also stops the
36+
packaged harness during startup while an adapter writes files. It checks that
37+
recovery preserves the final edit and rejected uploads make shutdown fail.
38+
2439
Managed agent sessions may already export harness options. Clear them when
2540
running the package suite: three CLI parsing tests assert the unset defaults,
2641
and inherited values would change the inputs those tests exercise. Running the

0 commit comments

Comments
 (0)