mirror of
https://github.com/block/buzz.git
synced 2026-10-29 21:41:33 +00:00
P1-2 race test: replace barrier+try_lock lock-presence oracle with a deterministic two-phase mpsc channel harness. Observer pauses refresh after its shared-T read; unshare thread announces readiness, receives explicit go-signal, completes its unshared retain, then signals done. Lock-move mutation: observer probes lock free, waits for unshare to finish, then releases refresh; refresh writes shared T+1 last → final head is SHARED → test RED at the final '!event_is_shared' assertion. No lock-presence assertion, no sleeps. P2 command test: load contract from shared test-fixtures/update-persona-publish-partial-outcome.json; reload both durable stores after the strict preparation error and assert the persona rename and linked ManagedAgentRecord persisted; assert error text, relay-profile request count, and retry status from contract. Early-? mutation → kind:0 count 0 != 1 → RED. Coordinator recovery test: consume same contract; gate retry completion with a promise and assert onDone === 0 while retry is in flight, then release and assert onDone === 1 after completion. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>