Files
ngit-grasp/tests/sync
DanConwayDev 5d62037d94 fix(sync): preserve discovery relay retry ownership
Historical mailbox and profile discovery owned connections without owning
persistent subscription targets. Idle cleanup could therefore retire a
failed discovery connection, erase its health history and let the next
probe bypass the intended backoff.

Include discovery sources, mailbox scopes and in-flight fetches in
connection ownership for cleanup and reconnect scheduling. Preserve failed
or policy-limited sessions until recovery or scope removal, including
when a disconnect notification has not yet recorded the failure.

This changes background synchronization only. Discovery ownership does
not add live subscriptions, and healthy idle sessions can still retire.
Existing backoff durations and persistent repository targets are unchanged.

Validation: unit coverage checks ownership across deferred/in-flight work
and scope removal. A real-socket mailbox-only reconnect regression checks
that cleanup retains the failure streak through reconnection; it failed
before the ownership correction.
2026-09-14 10:06:15 +00:00
..