mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-06 07:28:23 +00:00
Adds the TestRelay-driven integration coverage that was staged separately
from the disrespector feature commit (743f712). Tests the actual observable,
tombstone-based behaviour rather than the older worktree's "holding database"
design (which does not exist in this implementation):
- disrespector_accepts_but_ignores_deletion: a kind-5 request gets an OK yet
the targeted (served) repo announcement remains queryable.
- normal_mode_honours_deletion: the same flow against a default relay removes
the target.
- nip11_advertisement_reflects_deletion_support: a disrespector relay omits 9
from supported_nips; a normal relay advertises it.
Fixture wiring: RelayOptions gains deletion_request_disrespector and
TestRelay::start_with_deletion_disrespector() sets
NGIT_DELETION_REQUEST_DISRESPECTOR=true.
Also fixes a real gap surfaced by the new e2e test: the in-memory database
backend was constructed via MemoryDatabase::bounded(), which leaves the
backend's NIP-09/NIP-62 auto-processing at its `true` default. That silently
suppressed targeted events at query time as soon as a kind-5 was *stored* —
defeating disrespector mode (where the kind-5 is intentionally stored but not
acted upon) on the memory backend that TestRelay forces. The Memory path now
disables process_nip09/process_nip62 to match the LMDB path and the documented
intent that ngit-grasp owns deletion handling (DeletionPolicy + Tombstones).