Chat reliability: durable ntfy outbox, queue recovery retries, unattended cap

- Chat phone pushes (attention items, auto-switch notices) go through a
  durable chat_notifications outbox with leases, bounded attempts and
  backoff, retried by a worker; pushes cleared in the app first are never
  published, and a publication racing a clear is cleared again.
- Queued/scheduled chat prompts are deleted on recovery only when they can
  never be rebuilt; transient failures keep the rows and retry with backoff.
- Unattended chats with live work always keep notifying; the idle cap rises
  from 16 to 64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 00:26:46 +00:00
parent accb9970b6
commit 9f13c93be6
13 changed files with 609 additions and 58 deletions
+1
View File
@@ -145,6 +145,7 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
// Prompts queued behind a running turn are durable and owned by their
// session; resume delivering any a previous process left queued.
hub.queueStore = stores[0]
hub.startChatNotificationOutbox(ctx, stores[0])
hub.liveStore = stores[0]
hub.turnDiffStore = stores[0]
}