Files
buzz/crates
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d 8fd5ab04d1 test(db): pin the fence verdict guard and un-break the owner-limit tests
Two test-only changes, both follow-ups from the #4124 review round; no
production code is touched.

1. Two-entry fence fixture (Sami's design, from Dawn's diagnosis): the
   over-budget leg of is_relay_member_is_bounded_routed_and_fails_closed
   used a single injected fence entry, which is simultaneously the ring's
   newest AND the entry the reader proves — so the cheap precheck alone
   fails the read closed, and the authoritative per-session verdict guard
   could be deleted with byte-identical results (mutation-proven). The new
   leg records a proved-but-stale entry (token 50, committed 10s ago) plus
   a fresh unobservable one (token 999) under the replica's real epoch:
   the precheck passes on the newest while resolve() proves the stale one,
   which only the verdict stage can catch. Asserts the boolean outcome
   (writer's row visible), the writer/stale route metric, and the absence
   of any replica decision. Kills the verdict mutant; the precheck mutant
   correctly survives (replica_fence.rs: availability hygiene, not
   soundness).

2. Owner-limit tests seed from max_communities_per_owner() instead of a
   hardcoded 3. #3829 raised the default limit 3 -> 5 without updating
   create_community_with_owner_enforces_per_owner_limit or
   transfer_ownership_returns_limit_reached_for_maxed_transferee; both
   have failed on main since. Seeding from the enforced limit fixes them
   and keeps them limit-change-proof.

Verified: full buzz-db PG-gated suite 153/153 (was 151/2 on main);
verdict mutant now FAILS the routed test; fmt + clippy clean.

Co-authored-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
Signed-off-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
2026-08-01 13:49:28 -04:00
..
2026-07-27 14:18:24 -04:00