Files
buzz/crates
Duncan 9628c1e0de test(buzz-acp): strengthen pass-2 acceptance proofs for F1–F4 and routing
F1: reserve CONTEXT_RESERVE=10 bytes before capping title so a 200-byte
title no longer saturates context_budget to zero; two commands under the
same long title now produce distinct descriptions. Seam test upgraded to
deliver two different commands (cmd_a / cmd_b) under the same 200-byte
title and asserts assert_ne! on their descriptions — the saturation
mutation (title_cap_limit = DESCRIPTION_COMBINED_MAX_BYTES) makes this
red.

F2: fix false assertion text in the always-Uncertain bounded-exit test
(was claiming 'large RESOLVED_DELIVERY_WINDOW_SECS'; the injected 4s
delivery_window is what the mutation targets). Add two new old-expiry-
crossing tests:
  - resolved_edit_retransmitted_across_old_card_expiry_disconnect: entry
    resolved after its 1s card deadline; Uncertain on first attempt then
    Accepted; asserts >=2 identical-id publishes.
  - resolved_edit_retransmitted_across_old_card_expiry_lost_ok: delivery
    window starts after simulated old-expiry advance; per-attempt timeout
    sweeps and Accepted lands; asserts >=2 identical-id publishes.
Both assert only 1 publish when entry.deadline is used as delivery_deadline.

F3: restructure allow_always_and_reject_always_decisions_are_ignored_by_
read_loop into three sequential steps with fresh channels per step:
  step 1 allow_always -> entry still Pending, zero applied acp_write events
  step 2 reject_always -> entry still Pending, zero applied acp_write events
  step 3 allow_once -> entry resolved, exactly one applied acp_write event
CardActions::accepts()->true mutation resolves the entry on step 1, firing
the intermediate pending assertion.

F4: extend early_decision_first_wins to Reject + Reject-dup + Allow +
Allow-dup before ACK; still asserts exactly one applied write carrying
opt-reject. The is_none() guard mutation (unconditional overwrite) lets
the last Allow win — assertion goes red.

Routing: add two_read_loops_same_channel_nonce_mismatch_dropped_by_sibling
in acp.rs — two AcpClient instances share a channel, nonce_a's decision
is delivered to both read loops; client_a applies it, client_b silently
drops it (nonce mismatch); client_b then resolves on its own decision.
Removing the nonce guard makes client_b apply nonce_a's decision -> assert
fires.

pool.rs doc: 'has already applied' -> 'has already forwarded' to match
suppress-only semantics of recently_decided.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-01 17:40:07 -04:00
..