# server: recover plugin hooks after broadcast lag \(\#20\) · lucenx/signaltty

[View on GitCafe](https://git.cafe/lucenx/signaltty/commit/3160343700a9199f63be747a4c671fde82972e2e)

Repository: [lucenx/signaltty](https://git.cafe/lucenx/signaltty)

Visibility: public

Requested revision: 3160343700a9199f63be747a4c671fde82972e2e

Requested commit: 3160343700a9199f63be747a4c671fde82972e2e

Commit: 3160343700a9199f63be747a4c671fde82972e2e

Tree: 813d97eec6ff6a15e76debc453a0311d47177ee2

Author: Simone

Committer: GitHub

## Message

```
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>
```

## Parents

- [a097f292428b13bd7d838b44657513cc1fc0891e](https://git.cafe/lucenx/signaltty/commit/a097f292428b13bd7d838b44657513cc1fc0891e?format=markdown)

[Source at this commit](https://git.cafe/lucenx/signaltty/tree/3160343700a9199f63be747a4c671fde82972e2e?format=markdown)
