Files
buzz/crates
Duncan aa30ce6b83 fix(acp): implement Carl review findings F1–F4 with full behavioral tests
F1 (truthful operation context): `description_from_request_permission`
now appends a byte-truncated JSON summary of `rawInput` to the tool
name for buzz-agent v1/v2 paths, producing `"<tool>(<args>)"` so two
calls of the same tool with different arguments yield distinguishable
card descriptions. Codex v1.1.7 paths (command / reason) are unchanged.
New production-seam test drives `handle_permission_request` with a v2
payload and asserts the description field reaches the published kind-9
sentinel content. Tests cover file-path visibility, hostile markup,
control characters, byte truncation, and UTF-8 char-boundary truncation.

F2 (terminal-outcome delivery window): `finish_permission` now computes
`delivery_deadline = Instant::now() + RESOLVED_DELIVERY_WINDOW_SECS`
at resolution time instead of passing `entry_deadline` (already past
for ordinary timeouts). New test: ordinary-timeout path publishes at
least one kind-40003 resolved edit; would emit zero with old code.

F3 (observer surface two-option contract): removed `reject_always` from
`ACTIONABLE_KINDS` in `LifecycleActivity.tsx`; removed the
`hasPersistentGrant` badge and the "Permanent grant" advisory copy.
Updated all affected render tests and added a four-option contract test
proving only allow_once + reject_once render actionable buttons.

F4 (first-wins pre-ACK decision): guarded `entry.early_decision` with
`if entry.early_decision.is_none()` so only the first valid decision is
buffered. New regression test: Reject arrives first, Allow second, ACK
fires, observer confirms Reject is applied.

lib.rs: fixed three `TaskMeta` literal compile errors in test code
(missing `permission_decision_tx` / `scope` fields from main merge).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-01 10:46:08 -04:00
..