Repository navigation
fix(cron): retry proven-not-sent channel resolution failures in announce delivery - #135985
Conversation
…nce delivery
A momentarily unresolvable channel adapter raises
PlatformMessageNotDispatchedError("Outbound not configured for channel: ...")
with retryable=true and isProvenDeliveryNotSentError=true. Both the cron
direct-delivery and subagent announce classifiers matched that message against
a permanent-error regex list first, so they abandoned the message on attempt 1
instead of running the configured [5s, 10s, 20s] retry schedule.
Drop the "/outbound not configured for channel/i" pattern from both permanent
lists. Cron then falls through to isProvenDeliveryNotSentError; announce gets an
explicit proven-not-sent branch so its allowlist-gated retry wrapper admits the
error.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 7:29 AM ET / 11:29 UTC. ClawSweeper reviewWhat this changesThe PR centralizes typed no-send retry classification so cron, subagent completion announcements, and normal reply dispatch retry channel-adapter resolution failures that occurred before any message was sent. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: current main still abandons typed no-send adapter-resolution failures before retry, while the branch centralizes the established no-send decision and supplies convincing exact-head production-boundary proof. Priority: P1 Review scores
Verification
How this fits togetherCron jobs, subagent completions, and replies send through channel adapters. Their delivery wrappers use error classification to choose between a bounded retry schedule and a terminal outcome. flowchart LR
A[Cron, reply, or subagent completion] --> B[Outbound delivery]
B --> C[Channel adapter resolution]
C --> D{No-send error classification}
D -->|Retryable typed failure| E[Bounded retry schedule]
D -->|Permanent or send evidence| F[Terminal delivery outcome]
E --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +28, Tests +77. Total +105 across 7 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land one shared typed no-send classifier that retains caller-specific handling for untyped errors and refuses retries whenever a send or explicit permanent rejection is evidenced. Do we have a high-confidence way to reproduce the issue? Yes—current main source establishes the error producer and both premature permanent classifications, and the PR supplies a real production-boundary before/after trace for the retry path. Is this the best way to solve the issue? Yes—the shared predicate removes duplicated reply logic while preserving each caller's existing untyped-error policy and explicit no-duplicate safeguards. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cc4079ebe1d5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Thanks @gaoanze888! Proof: A production-boundary harness kept the Slack adapter unavailable until attempt 4. Current main stopped after attempt 1 with no send. The landed head used all 4 attempts, sent one visible completion, and reported subagent delivery as delivered.
Landed: 47849c297b14 |
Retry cron delivery and subagent completion announcements when a typed channel-adapter failure proves that no message was dispatched. Centralize the typed retry decision while keeping permanent rejection, prior-send evidence, and ambiguous outcomes non-retryable. Closes openclaw#135836. Co-authored-by: gaoanze <gaoanze@meituan.com> Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Closes #135836
What Problem This Solves
Cron direct delivery and subagent completion announce treated a retryable, proven-not-dispatched channel adapter miss as permanent text. Both stopped after one attempt instead of using the existing
5s,10s, and20sretry schedule.Why This Change Was Made
createChannelHandlerraisesPlatformMessageNotDispatchedErrorbefore adapter dispatch when no outbound handler resolves. That type proves no recipient-visible send began and defaults toretryable: true.The shared delivery owner now resolves typed no-send retryability before caller-specific text rules. It returns no decision for untyped pre-connect errors, so existing permanent-text ordering remains unchanged.
The same shared predicate now serves normal reply dispatch, cron delivery, and subagent announce. It rejects
retryable: false, partial or prior-send evidence, ambiguous retry branches, and nested visible-send receipts.The production increase is +58/-30 lines (net +28). The growth creates the shared owner boundary and removes the prior private duplicate from reply dispatch.
User Impact
A temporarily unavailable adapter can become available during the configured direct retry window. Cron output and subagent completion delivery then reach the target instead of being abandoned after one local resolution failure.
Retry timings and configuration do not change. Ambiguous or already-dispatched failures still do not retry.
Evidence
Production-boundary harness, same input on both revisions:
071e3b0e1099b8cfbf4d0c369dd5a6d409911e2a: the registered Slack adapter stayed unavailable until attempt 4; cron and subagent announce each stopped after attempt 1; the adapter recorded no payload; subagent outcome waspermanent_failure.1e6bb032acabbb387aa6492e85e54c402009473e: the same adapter became available only on attempt 4; both callers made 4 attempts; the adapter recorded onevisible completionpayload; subagent outcome wasdelivered: true.createChannelHandlerproduced the error on attempts 1-3.Focused exact-head tests:
src/infra/delivery-recovery.shared.test.ts: 11 passed.src/infra/outbound/delivery-queue.policy.test.ts: 5 passed.src/auto-reply/reply/dispatch-from-config.reply-dispatch.test.ts: 30 passed.src/agents/subagents/announce/subagent-announce-delivery.test.ts: 242 passed.src/gateway/server-cron.test.ts: 120 passed.Type checking was left to CI because repository policy forbids local OpenClaw type-check runs on this host.
This PR was prepared with AI assistance; the fix, tests, and evidence were reviewed by the author and maintainer.