Repository navigation
fix(sms): retry stalled MMS response bodies - #119002
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 7:06 PM ET / 23:06 UTC. ClawSweeper reviewWhat this changesThe PR labels default stalled response-body errors as timeouts and reuses the shared transient-network classifier so Twilio MMS downloads return to the durable retry lane. Merge readinessKeep open. This active maintainer PR fixes a real remaining MMS retry gap on current main; no blocking correctness defect was found, but the added retry-runtime export needs explicit SDK-contract confirmation before merge. Priority: P2 Review scores
Verification
How this fits togetherInbound Twilio MMS media is fetched before the SMS event is durably adopted. The SMS plugin classifies fetch failures to either show an unavailable-attachment notice or let the durable sender retry the callback. flowchart LR
A[Twilio MMS callback] --> B[SMS media fetch]
B --> C[Response body read]
C --> D[Transient error classifier]
D --> E{SSRF or permanent failure?}
E -->|yes| F[Attachment unavailable notice]
E -->|no| G[Durable sender retry]
G --> H[Attachment delivered]
Decision needed
Why: This is an additive public SDK symbol whose long-term support scope cannot be safely inferred from the implementation alone. Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +163. Total +176 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep timeout identity at the response-body owner, retain the SMS SSRF veto at the SMS owner, and explicitly define the retry-runtime classifier’s supported plugin-contract scope. Do we have a high-confidence way to reproduce the issue? Yes: current main emits a plain default response-body Error at the timeout producer, and the current SMS retry predicate cannot recognize that error as transient; the branch supplies focused stalling-stream coverage. Is this the best way to solve the issue? Yes for the bug boundary: timeout identity belongs at the response-body owner and SMS retains its SSRF decision; the remaining question is the intended public SDK scope of the shared classifier. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1cdfe9ed7d7b. 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: (1301 commits) fix(sms): align MMS retries with network timeouts (openclaw#119002) test(qa): cover composed tool result consumption (openclaw#118991) test(cron): cover delivery outcomes (openclaw#118993) test(qa): cover guarded media fetch boundaries (openclaw#118857) test(qa): cover music generation controls (openclaw#118901) test(qa): cover core vision routing (openclaw#118861) test(qa): cover Gateway usage and memory APIs (openclaw#118995) fix(docker): use authenticated gateway health command (openclaw#118996) test(plugins): align tool fixtures with owner policy (openclaw#118959) test(qa): cover managed gateway service lifecycle (openclaw#118855) test(qa): cover audio proxy and limit handling (openclaw#118863) test(qa): cover PDF extraction dispatch (openclaw#118860) test(ui): add service-worker update primary QA proof (openclaw#118805) test(qa): cover CLI onboarding and plugin install sources (openclaw#118882) test(qa): cover remote logging boundaries (openclaw#118951) fix(sms): retry transient MMS failures before durable adoption (openclaw#118994) test(qa): cover video generation invocation (openclaw#118864) test(qa): cover media reference intake (openclaw#118858) test(qa): cover image generation task lifecycle (openclaw#118915) feat(sms): track Twilio delivery status (openclaw#118665) ...
Related: #118994
What Problem This Solves
Fixes an issue where an inbound Twilio MMS could still lose its attachment when the remote media server sent response headers and then stalled. The default response-body timeout was emitted as a plain
Error, so the transient retry policy added by #118994 did not recognize the failure and the durable sender lane treated it as permanent.Why This Change Was Made
The default response-body idle and overall deadlines now identify themselves as
TimeoutError, and media retries use the same nested transient-network classifier as the gateway process boundary. SMS keeps an explicit fail-closed SSRF veto over the complete wrapper and aggregate error graph before applying that shared policy.The generic classifier moved into the lightweight retry runtime rather than pulling process-level fatal-handler dependencies into plugin code. Existing imports from the old owner remain supported.
SDK Contract Decision
plugin-sdk/retry-runtimeremains a private-local subpath for bundled and official plugins. This change reuses that existing internal seam; it does not promoteisTransientNetworkErrorto the documented public plugin SDK or create an external compatibility promise. The public SDK surface baseline remains unchanged.User Impact
Operators can expect stalled or temporarily unreachable Twilio MMS downloads to stay in the existing durable retry lane instead of permanently degrading an acknowledged callback. Permanent HTTP, size, storage, and SSRF failures remain non-retryable and visible.
Evidence
node scripts/run-vitest.mjs src/infra/errors.test.ts src/infra/http-body.response.test.ts src/media/fetch.test.ts extensions/sms/src/media.test.ts extensions/sms/src/ingress-spool.test.tsnode scripts/run-vitest.mjs src/infra/errors.test.ts src/infra/unhandled-rejections.test.ts src/infra/http-body.response.test.ts src/media/fetch.test.tsnode scripts/run-vitest.mjs extensions/sms/src/media.test.ts extensions/sms/src/ingress-spool.test.tspnpm plugin-sdk:surface:checkopenclaw/ci-gate, build, SDK/API, import-topology, lint, type, and focused channel lanes passed for9e0517295e619cdc7e77cebc15126fa4b6365317.channel-plugin-apiimport passed.6194cfdfb2faand 444.41 MB at head9e0517295e61; the private retry-runtime seam adds no observable import-graph cost.git diff --checkorigin/main..HEADAI-assisted: yes. The maintainer reviewed the implementation and validation evidence.