server: recover plugin hooks after broadcast lag (#20)

* server: recover plugin hooks after broadcast lag

The plugin subscriber handled RecvError::Lagged with continue, so hooks
under a burst permanently missed retained events. Track the last cursor,
replay non-pty.data events from the store ring on lag, and dedupe live
delivery against that cursor.

* server: anchor plugin hook cursor before catch-up

Initialize last_seq from the store cursor at subscribe time so a Lagged
replay cannot dump pre-subscribe history (e.g. recover_tasks) into hooks.

* server: subscribe plugin hooks atomically before spawning

---------

Co-authored-by: Grok Bot <grok-bot@users.noreply.github.com>
Co-authored-by: Lucenx9 <185146821+Lucenx9@users.noreply.github.com>
3160343700Simone committed on 10/9/2026, 1:14:02 PM· committed by GitHubparenta097f29
1 file changedLine totals unavailable