Repository navigation
fix(gateway): resume durable outbound delivery retries - #118694
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 10:02 AM ET / 14:02 UTC. ClawSweeper reviewWhat this changesThe PR makes the Gateway periodically retry persisted outbound deliveries after startup so transient transport failures no longer remain queued until a restart. Merge readinessKeep this maintainer-labeled PR open for explicit owner review. Current main performs durable outbound recovery only once at Gateway activation, while the PR adds the missing lifecycle-owned recurring drain and preserves the queue’s existing backoff, atomic claim, authorization, and shutdown boundaries; no concrete patch defect was found in the reviewed change. Priority: P1 Review scores
Verification
How this fits togetherGateway startup activates background services after the runtime is ready. Persisted outbound deliveries first pass through startup recovery, then the proposed Gateway-owned timer invokes the existing durable queue drain using current channel configuration to deliver, defer, or dead-letter each row. flowchart LR
A[Persisted outbound delivery] --> B[Gateway startup recovery]
B --> C[Durable retry backoff]
C --> D[Gateway retry timer]
D --> E[Atomic queue drain]
F[Current channel configuration] --> E
E --> G[Delivered, deferred, or dead-lettered]
Decision needed
Why: The code path is focused and source-supported, but the protected maintainer label requires explicit human handling for a change that affects persisted message delivery across channels. Before merge
Agent review detailsSecurityNone. PR surfaceSource +43, Tests +245. Total +288 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one Gateway-owned recurring drain that delegates all retry eligibility, claims, authorization, and terminal handling to the existing durable queue, then merge only after an owner accepts the exact-head validation result. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence reproduction shape: a row deferred by startup backoff, or a transient failure after an empty startup scan, has no later generic Gateway drain on current main. The PR’s focused lifecycle tests encode both cases, although this read-only review did not execute them. Is this the best way to solve the issue? Yes—the Gateway is the correct generic lifecycle owner because it already starts recovery and can schedule all channel rows without duplicating channel-specific polling. Changing startup recovery alone would not handle new post-start failures, while moving retry policy into the timer would duplicate the durable queue contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cad499d7ca06. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) fix(plugins): reject external public-artifact hardlinks (#118689)
* origin/main: (78 commits) fix(parallels): recover Windows poll transport failures (#118479) fix(channels): deny unauthorized Discord and Telegram binding access (#118704) fix(test): bound shared git inventory lookup (#111171) fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) ...
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (openclaw#118702) docs: show canonical agent roster configuration (openclaw#118722) fix(channels): generate catalog from package manifests (openclaw#118097) fix(zalouser): distinguish probe timeout from auth failure (openclaw#111336) improve(ui): cut E2E shard runtime by reusing the bundle (openclaw#118697) fix(cli): publish completion caches atomically (openclaw#118715) fix(whatsapp): honor disabled self-chat without widening group access (openclaw#118711) fix(voice-call): terminate carrier calls after realtime startup failures (openclaw#118699) fix(slack): isolate GovSlack media trust and delivery (openclaw#118695) fix(browser): wrap page-controlled action results (openclaw#118691) fix(security): sanitize JSON-escaped forged content boundaries (openclaw#118698) test(qa): prove real yielded-child completion and channel delivery (openclaw#118707) fix(doctor): honor explicit plugin-only migration authority (openclaw#118700) fix(security): detect child_process calls through aliases and computed members (openclaw#116304) test(gateway): avoid async facade mock race (openclaw#118708) fix(gateway): preserve final speech during transcription shutdown (openclaw#118693) fix(gateway): resume durable outbound delivery retries (openclaw#118694) fix(plugins): reject external public-artifact hardlinks (openclaw#118689)
Summary
Root cause and canonical lifecycle owner
The generic Gateway called
recoverPendingDeliveriesexactly once at startup. A persisted row whose backoff had not elapsed—or any new Slack/Discord/Signal/etc. transport failure after startup—had no future generic drain, leaving the user's message stranded indefinitely; only a few channels implemented their own polling. The existing per-channel durable queue, coordinator, and retry policy already support correct recovery.The Gateway runtime now owns a bounded unref timer matching the existing five-second first backoff. Startup legacy migration still executes exactly once; normal ticks use the existing atomic generic drain/coordinator, fresh
getRuntimeConfig(), nonoverlapping work admission, and canonical backoff. No admitted root is retained between ticks, suspended Gateways are skipped, and the timer stops with the existing runtime lifecycle.Actual durable operator proof
Real SQLite queue rows for Discord, Slack, and Signal fail once, are all deferred by the real startup owner, then the canonical retry owner delivers each exactly once after backoff; a repeat drain delivers none. A real revoked channel account is dead-lettered without invoking its send callback, proving current authorization replaces stale startup configuration.