Skip to content

fix(sms): retry transient MMS failures before durable adoption - #118994

Merged
steipete merged 2 commits into
mainfrom
codex/qa0803-sms-durable-media-retry
Aug 3, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa0803-sms-durable-media-retry

Conversation

@steipete

@steipete steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Root cause

The new SMS/MMS ingress owner swallowed every attachment download error before durable adoption. A transient Twilio HTTP 429/5xx or transport outage therefore permanently tombstoned the already-acknowledged callback and silently discarded its attachment.

Canonical repair

  • Classify only genuine transient MediaFetchError instances and recognized nested network/deadline causes at the existing SMS media owner.
  • Reject SSRF anywhere in the cause graph and preserve visible permanent degradation for auth/404, oversized, local-storage, and other nontransient failures.
  • Throw transient failures before adoption so the existing SQLite sender lane retries the original event, cleans any already-downloaded attachments, preserves FIFO order, and processes the callback exactly once.
  • Existing production owner only; net production +39 lines for provider/security/error-graph/durable-lifecycle ownership; no config, SDK, protocol, or schema additions.

Actual real behavior

{
  "transport": "real HMAC-signed Twilio webhook + actual localhost authenticated MMS endpoint + production SQLite durable ingress",
  "before": {
    "signedCallbacks": 2,
    "providerRequests": 1,
    "providerStatus": 429,
    "firstMmsAttachment": "permanently lost",
    "durableReplay": "completed/tombstoned"
  },
  "after": {
    "signedCallbacks": 2,
    "providerRequests": 2,
    "authenticatedRequests": 2,
    "statusSequence": [
      429,
      200
    ],
    "transientEventRetained": true,
    "deliveries": [
      {
        "message": "first MMS",
        "attachments": 1
      },
      {
        "message": "later same-sender SMS",
        "attachments": 0
      }
    ],
    "replay": "completed duplicate",
    "pending": 0
  },
  "permanentPreserved": [
    400,
    401,
    403,
    404,
    410,
    "max_bytes",
    "SSRF",
    "EACCES"
  ],
  "retryable": [
    408,
    429,
    "5xx",
    "recognized network/timeout causes"
  ]
}
  • Entire SMS plugin: 13 files / 252 tests passed; independent owner/security rerun: 5 files / 158 tests passed.
  • Real installed Twilio HMAC verification, loopback Basic-authenticated MMS endpoint, production media fetch, and actual SQLite durable queue demonstrate the complete before/after sequence above.
  • Direct Twilio official retry/webhook contracts and all sibling gateway/inbound/webhook suites inspected; formatting, lint, focused type-aware tests, max-lines, and diff checks pass.
  • Exactly-one independent fresh Codex/Sol/high formal review: zero P0/P1 findings, confidence 0.93.

@openclaw-barnacle openclaw-barnacle Bot added channel: sms Channel integration: sms size: M maintainer Maintainer-authored PR labels Aug 3, 2026
@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@steipete
steipete merged commit 6194cfd into main Aug 3, 2026
86 checks passed
@steipete
steipete deleted the codex/qa0803-sms-durable-media-retry branch August 3, 2026 22:50
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
…ansports-20260803

* origin/main: (120 commits)
  test(ui): add service-worker update primary QA proof (#118805)
  test(qa): cover CLI onboarding and plugin install sources (#118882)
  test(qa): cover remote logging boundaries (#118951)
  fix(sms): retry transient MMS failures before durable adoption (#118994)
  test(qa): cover video generation invocation (#118864)
  test(qa): cover media reference intake (#118858)
  test(qa): cover image generation task lifecycle (#118915)
  feat(sms): track Twilio delivery status (#118665)
  test(tasks): cover TaskFlow registry lifecycle (#118983)
  test(gateway): verify SSH tunnel fallback (#118818)
  fix(security): harden network tool output at canonical owner boundaries (#118984)
  fix(googlechat): align doctor policy ownership with canonical account configuration (#118972)
  test(tui): prove editor input through PTY (#118982)
  fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987)
  test(qa): cover health monitor and cache boundaries (#118961)
  fix(macos): restore dashboard frame double-click zoom (#118976)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  ...
vincentkoc added a commit to clawSean/openclaw that referenced this pull request Aug 3, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
…law#118994)

* fix(sms): retry transient MMS downloads before durable adoption

* test(sms): align durable ingress harness with typed runtime contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: sms Channel integration: sms maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants