Files
ngit-grasp/tests
DanConwayDev 2f859b0ece fix(sync): isolate NIP-65 discovery connections
Production comparison of the proactive Sync+ candidate showed that user-index relays entered the ordinary fresh-start lifecycle. A control-plane kind 0/10002 lookup therefore also started announcement, repository, and descendant sync, contaminating the experiment and allowing the discovered identity graph to fan out connection work.

Track connections opened solely for NIP-65 discovery and skip ordinary fresh-start work for that role. Dial at most one new discovery source per maintenance pass, advance the single-flight discovery round immediately after completion, and retire a discovery-only connection after its currently due author batches drain. If repository declarations independently make the same relay a sync source, promote the existing connection rather than opening a duplicate.

Correctness assumes the configured bootstrap remains an ordinary sync source even when it also serves as an identity index. Exclusively discovery-owned relays still share outbound authorization, connection scheduling, subscription pacing, and the per-connection ledger. Multi-connection sharding and changes to the accepted-author scope remain excluded.

Validation: nix develop -c cargo check --lib; nix develop -c cargo test --test sync root_author_inbox_reuses_existing_root_sync_pipeline -- --nocapture (pass, 18.88s). The integration scenario now proves an advertised outbox is discovery-only and never receives fresh-start repository sync.
2026-08-12 11:02:04 +00:00
..