Files
ngit-grasp/tests/common
DanConwayDev 90ad63691d test(deletion): add end-to-end NIP-09 disrespector coverage
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).
2026-06-17 08:17:28 +00:00
..