mirror of
https://github.com/block/buzz.git
synced 2026-11-14 13:21:02 +00:00
test_nip17_gift_wrap_not_searchable previously queried Typesense directly to prove kind:1059 was never indexed — meaningless on the Postgres backend, where every event lives in the events table and there is no separate index to skip. Rewrite it to issue a NIP-50 search and assert the relay never surfaces the gift wrap (kind:9 control IS returned, kind:1059 is NOT). That guarantee comes from the relay's auth gates + filters_match post-filter, which are identical across all three backends, so the test now guards typesense/postgres/disabled. Add test_nip50_search_cross_author_isolation: an outsider who never joined an author's channel gets zero hits when searching that channel's exact #h + token, while the author finds their own message — proving the channel-scope clamp in handle_search_req (gate #1, no visibility widening) holds. Also relay-side and backend-independent. Compiles clean (cargo test -p buzz-test-client --test e2e_nostr_interop --no-run); the full matrix run lands after Max's backend-flag wiring is rebased in. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>