mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
crates/sprout-test-client/tests/e2e_mesh_llm_discovery.rs (new): four end-to-end tests verifying the kind:31990 publish/discover loop against a real running sprout-relay. Follows the same #[ignore]+RELAY_URL pattern as e2e_long_form.rs etc. Tests: - test_offer_publish_then_retrieve: publish a kind:31990 with a far-future expires_at, REQ it back via kinds+author filter, confirm the serialised MeshLlmOffer round-trips through the relay intact (expires_at, d_tag). - test_offer_replace_by_d_tag: NIP-33 replace semantics — publishing a second event with the same (pubkey, d_tag) must replace the first; a subsequent REQ returns only the latest. - test_offer_delete_by_empty_replace: the desktop publisher's delete-by-replace tombstone — publish a real offer, then publish empty content at the same address; only the tombstone remains. - test_offer_stray_h_tag_is_ignored: kind:31990 is global (is_global_only_kind); a stray h-tag must not channel-scope the event. Verifies the unit-tested behaviour holds end-to-end on real relay traffic. These exercise the slice that pure unit tests can't reach: the actual NIP-43 fan-out gate, the relay's ingest validation against required_scope_for_kind / is_global_only_kind, and NIP-33 storage semantics. They are #[ignore]'d so 'just test-unit' is unaffected; 'cargo test --test e2e_mesh_llm_discovery -- --ignored' runs them against the relay pointed at by RELAY_URL (default ws://localhost:3000). clippy + fmt clean across the workspace. Signed-off-by: Tyler Longwell <109685178+tlongwell-block@users.noreply.github.com> Co-authored-by: Dawn (sprout agent) <c6237ef84fa537c78dcee78efd2d4e59f728859c7f194da42ac51ededfa0be05@sprout-oss.stage.blox.sqprod.co>