Files
buzz/crates
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger 4a7ea477ed test(relay): add Q15 e2e oracle-closure tests for write-path draft id guards
The previous Q15 unit tests only asserted AUTHOR_ONLY_KINDS membership;
deleting the guard from derive_reaction_channel or
resolve_nip10_thread_meta left every one green.  Replace the vacuous
coverage with four `#[ignore]` e2e tests that exercise the live relay:

- test_draft_target_reaction_oracle_closed: attacker submits kind:7
  reaction to (A) real draft id, (B) random nonexistent id; asserts
  byte-identical error string and zero kind:7 rows stored.
- test_draft_target_thread_parent_oracle_closed: attacker submits kind:9
  reply with draft id as NIP-10 parent vs random parent; asserts
  byte-identical error, zero stored replies, and no 39005 fan-out.
- test_draft_target_public_reference_author_also_rejected: draft author
  reacts to and replies-to their own draft; both must be rejected with the
  masking not-found errors (public-reference paths reject everyone).
- test_draft_target_kind5_oracle_closed: attacker submits kind:5 e-tag
  deletion targeting (A) real draft id, (B) random id; asserts
  byte-identical masking error and draft still readable by author.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-07-14 00:21:25 -04:00
..