The account watch re-dispatches the same notification on every poll. Nothing ever marks a row read, and the dedup ids do not cover the repeat.
The loop
GitHub's since is inclusive at the boundary, and NotificationPage::finish advances its cursor only to the newest row seen. A row at or before the cursor is returned again on the next poll — and since the row stays unread, the cursor never passes it. That is every poll, forever.
A repeated row decoded on a later pass is a fresh Event with the same id. RSD dedups against its pending inbox, not against history, so a pass re-feeds it and a second turn is dispatched for a thread that already has one.
The cursor map (account_cursors) is in memory, so a restart asks for the whole unread feed again.
Observed live: github:issue:vhaudiquet/orcaslicer-snap#10 went revision: 1 → 2 at the 00:35 poll with inbox_depth: 0 and last_outcome: null — a re-dispatch of a turn that was already running, not a new event. The thread is still unread on the bot's feed right now (GET /notifications?since=2026-11-21T22:33:00Z returns it).
The dedup comment on NotificationPage::finish ("boundary rows repeat, ids dedup them") describes an intent the daemon never implemented.
The change
Consume what the poll decides, which is the shape you asked for:
Forge::mark_read — a new trait method with a default no-op, implemented for GitHub as PUT /notifications/threads/{id}.
Notification::read_key — what that route keys on. GitHub keys on the notification id, while Notification::id carries it only as text (the suffix is the dedup timestamp); None on a backend with no read route. #[serde(default)], so a payload already sitting in an inbox still decodes after this deploys.
poll_account marks each row read once triage has decided it — dispatched, surfaced, or ignored, since the decision is durable and re-deciding an ignored row every minute is pure noise. Best-effort: an unread row costs a repeat, never a lost event, so a failed call logs and the poll carries on. A row that fails to ingest is not marked read — nothing was decided.
Why mark read rather than only advance the cursor to the poll instant: the cursor fix dies with the process (it is in memory), and the bot's unread feed grows forever. Marking read fixes the restart replay too, and it is what the forge's own model means by "decided".
Note the account is kosmos-ai-bot, so this clears the bot's unread state, not yours.
Gitea has an equivalent route (PATCH /notifications/threads/{id}) and GitLab has none; both keep the no-op, since neither has an account watch here yet.
Tests
marking_a_notification_read_puts_its_thread — mock server: poll, then mark, then assert exactly one PUT /notifications/threads/42188 with the bearer header; also pins that the route keys on the notification id and not the thread number.
a_notification_without_a_read_key_fails_loudly — a row with no read key is a Parse error, not a silent no-op that would re-read the thread forever. It also proves the serde(default) path an old inbox row takes.
a_triaged_account_notification_is_marked_read — the daemon end: an account watch over a mock feed, one mention, one dispatch, one read call.
Both notification-decoding unit tests now also assert read_key.
bin/gate.sh is green (fmt, clippy -D warnings, check — all targets). This box cannot execute test binaries, so CI runs the tests first.
The account watch re-dispatches the same notification on every poll. Nothing ever marks a row read, and the dedup ids do not cover the repeat.
## The loop
- GitHub's `since` is inclusive at the boundary, and `NotificationPage::finish` advances its cursor only to the newest row seen. A row at or before the cursor is returned again on the next poll — and since the row stays unread, the cursor never passes it. That is every poll, forever.
- A repeated row decoded on a later pass is a fresh `Event` with the same id. RSD dedups against its *pending inbox*, not against history, so a pass re-feeds it and a second turn is dispatched for a thread that already has one.
- The cursor map (`account_cursors`) is in memory, so a restart asks for the whole unread feed again.
Observed live: `github:issue:vhaudiquet/orcaslicer-snap#10` went `revision: 1 → 2` at the 00:35 poll with `inbox_depth: 0` and `last_outcome: null` — a re-dispatch of a turn that was already running, not a new event. The thread is still unread on the bot's feed right now (`GET /notifications?since=2026-11-21T22:33:00Z` returns it).
The dedup comment on `NotificationPage::finish` ("boundary rows repeat, ids dedup them") describes an intent the daemon never implemented.
## The change
Consume what the poll decides, which is the shape you asked for:
- **`Forge::mark_read`** — a new trait method with a default no-op, implemented for GitHub as `PUT /notifications/threads/{id}`.
- **`Notification::read_key`** — what that route keys on. GitHub keys on the notification id, while `Notification::id` carries it only as text (the suffix is the dedup timestamp); `None` on a backend with no read route. `#[serde(default)]`, so a payload already sitting in an inbox still decodes after this deploys.
- **`poll_account`** marks each row read once triage has decided it — dispatched, surfaced, or ignored, since the decision is durable and re-deciding an ignored row every minute is pure noise. Best-effort: an unread row costs a repeat, never a lost event, so a failed call logs and the poll carries on. A row that fails to *ingest* is not marked read — nothing was decided.
Why mark read rather than only advance the cursor to the poll instant: the cursor fix dies with the process (it is in memory), and the bot's unread feed grows forever. Marking read fixes the restart replay too, and it is what the forge's own model means by "decided".
Note the account is `kosmos-ai-bot`, so this clears the bot's unread state, not yours.
Gitea has an equivalent route (`PATCH /notifications/threads/{id}`) and GitLab has none; both keep the no-op, since neither has an account watch here yet.
## Tests
- `marking_a_notification_read_puts_its_thread` — mock server: poll, then mark, then assert exactly one `PUT /notifications/threads/42188` with the bearer header; also pins that the route keys on the notification id and not the thread number.
- `a_notification_without_a_read_key_fails_loudly` — a row with no read key is a `Parse` error, not a silent no-op that would re-read the thread forever. It also proves the `serde(default)` path an old inbox row takes.
- `a_triaged_account_notification_is_marked_read` — the daemon end: an account watch over a mock feed, one mention, one dispatch, one read call.
- Both notification-decoding unit tests now also assert `read_key`.
`bin/gate.sh` is green (fmt, clippy `-D warnings`, check — all targets). This box cannot execute test binaries, so CI runs the tests first.
The account feed is at-least-once in a way the dedup ids do not cover.
`since` is inclusive at the boundary and `NotificationPage::finish`
advances its cursor only to the newest row seen, so a row the poll cannot
get past — anything at or before the cursor, which is every poll — comes
back for as long as the forge still considers it unread. Nothing marked
it read, and the daemon's cursor map is in memory, so a restart asked for
the whole unread feed again.
The result is a re-dispatch loop: the same notification id re-triaged
every pass, a fresh turn for a thread that already has one, and a second
comment on that thread if the first turn ever finished inside its lease.
Observed live on `vhaudiquet/orcaslicer-snap#10`: key revision 1 → 2 at
the 00:35 poll, `inbox_depth: 0`, no outcome — a re-dispatch of a turn
that was already running.
So consume what the poll decides:
- `Forge::mark_read` — a new default no-op on the trait, implemented for
GitHub as `PUT /notifications/threads/{id}`;
- `Notification::read_key` carries what that route keys on (GitHub keys
on the notification id, which the dedup id embeds only as text), and
defaults on deserialize so a payload already in an inbox still decodes;
- `poll_account` marks each row read once it is triaged — dispatched,
surfaced, or ignored; best-effort, since an unread row costs a repeat
and never a lost event.
Gitea and GitLab keep the no-op: neither has an account watch here yet.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The account watch re-dispatches the same notification on every poll. Nothing ever marks a row read, and the dedup ids do not cover the repeat.
The loop
sinceis inclusive at the boundary, andNotificationPage::finishadvances its cursor only to the newest row seen. A row at or before the cursor is returned again on the next poll — and since the row stays unread, the cursor never passes it. That is every poll, forever.Eventwith the same id. RSD dedups against its pending inbox, not against history, so a pass re-feeds it and a second turn is dispatched for a thread that already has one.account_cursors) is in memory, so a restart asks for the whole unread feed again.Observed live:
github:issue:vhaudiquet/orcaslicer-snap#10wentrevision: 1 → 2at the 00:35 poll withinbox_depth: 0andlast_outcome: null— a re-dispatch of a turn that was already running, not a new event. The thread is still unread on the bot's feed right now (GET /notifications?since=2026-11-21T22:33:00Zreturns it).The dedup comment on
NotificationPage::finish("boundary rows repeat, ids dedup them") describes an intent the daemon never implemented.The change
Consume what the poll decides, which is the shape you asked for:
Forge::mark_read— a new trait method with a default no-op, implemented for GitHub asPUT /notifications/threads/{id}.Notification::read_key— what that route keys on. GitHub keys on the notification id, whileNotification::idcarries it only as text (the suffix is the dedup timestamp);Noneon a backend with no read route.#[serde(default)], so a payload already sitting in an inbox still decodes after this deploys.poll_accountmarks each row read once triage has decided it — dispatched, surfaced, or ignored, since the decision is durable and re-deciding an ignored row every minute is pure noise. Best-effort: an unread row costs a repeat, never a lost event, so a failed call logs and the poll carries on. A row that fails to ingest is not marked read — nothing was decided.Why mark read rather than only advance the cursor to the poll instant: the cursor fix dies with the process (it is in memory), and the bot's unread feed grows forever. Marking read fixes the restart replay too, and it is what the forge's own model means by "decided".
Note the account is
kosmos-ai-bot, so this clears the bot's unread state, not yours.Gitea has an equivalent route (
PATCH /notifications/threads/{id}) and GitLab has none; both keep the no-op, since neither has an account watch here yet.Tests
marking_a_notification_read_puts_its_thread— mock server: poll, then mark, then assert exactly onePUT /notifications/threads/42188with the bearer header; also pins that the route keys on the notification id and not the thread number.a_notification_without_a_read_key_fails_loudly— a row with no read key is aParseerror, not a silent no-op that would re-read the thread forever. It also proves theserde(default)path an old inbox row takes.a_triaged_account_notification_is_marked_read— the daemon end: an account watch over a mock feed, one mention, one dispatch, one read call.read_key.bin/gate.shis green (fmt, clippy-D warnings, check — all targets). This box cannot execute test binaries, so CI runs the tests first.e07499f0b7tob114049591The account feed is at-least-once in a way the dedup ids do not cover. `since` is inclusive at the boundary and `NotificationPage::finish` advances its cursor only to the newest row seen, so a row the poll cannot get past — anything at or before the cursor, which is every poll — comes back for as long as the forge still considers it unread. Nothing marked it read, and the daemon's cursor map is in memory, so a restart asked for the whole unread feed again. The result is a re-dispatch loop: the same notification id re-triaged every pass, a fresh turn for a thread that already has one, and a second comment on that thread if the first turn ever finished inside its lease. Observed live on `vhaudiquet/orcaslicer-snap#10`: key revision 1 → 2 at the 00:35 poll, `inbox_depth: 0`, no outcome — a re-dispatch of a turn that was already running. So consume what the poll decides: - `Forge::mark_read` — a new default no-op on the trait, implemented for GitHub as `PUT /notifications/threads/{id}`; - `Notification::read_key` carries what that route keys on (GitHub keys on the notification id, which the dedup id embeds only as text), and defaults on deserialize so a payload already in an inbox still decodes; - `poll_account` marks each row read once it is triaged — dispatched, surfaced, or ignored; best-effort, since an unread row costs a repeat and never a lost event. Gitea and GitLab keep the no-op: neither has an account watch here yet.b114049591to9267534799