mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
Server shutdown aborts the SyncManager action receiver while its detached self-subscriber may still be sending a batch. The subscriber previously logged one channel-closed error per remaining relay and could ignore shutdown while blocked by channel backpressure. Monitor receiver closure and shutdown around the entire subscriber lifecycle, including startup reconstruction and batch sends. Stop the batch on the first permanent send failure, including races with cancellation. Pending discovery can be reconstructed from persisted events on startup; this does not redesign ownership of other sync workers. Validation: all 13 self-subscriber tests pass, including bounded regressions for consumer closure and shutdown during a backpressured startup batch. cargo clippy --lib --tests -- -D warnings, formatting and git diff --check pass. Shutdown behavior is documented. Assisted-by: GPT-6