Repository navigation
fix(media-understanding): resolve inbound media:// refs carried as attachment url - #117268
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 5:48 AM ET / 09:48 UTC. ClawSweeper reviewWhat this changesThe branch resolves valid inbound Merge readinessThe PR appears to be a well-scoped repair at the correct attachment-cache boundary, with no discrete correctness or security finding from the reviewed source. It is still necessary because current main at Priority: P1 Review scores
Verification
How this fits togetherChannel plugins emit attachment facts with a local path or URL, then media understanding’s attachment cache reads an allowed local file or fetches an approved remote HTTP source. The resulting buffer or path is passed to audio, image, document, or video processing so the agent can receive the derived result. flowchart LR
A[Inbound channel media] --> B[Attachment facts]
B --> C[Media attachment cache]
C --> D{Local-store alias or HTTP URL}
D --> E[Allowed local media read]
D --> F[SSRF-guarded HTTP fetch]
E --> G[Media understanding provider]
F --> G
G --> H[Transcript or extracted context]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +101, Tests +469, Other +103. Total +673 across 9 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one canonical attachment-cache flow: resolve permitted local paths and valid inbound-store aliases locally, send only HTTP(S) URLs to the SSRF-guarded fetcher, and merge after the remaining exact-head checks pass. Do we have a high-confidence way to reproduce the issue? Yes: current main sends a URL-only Is this the best way to solve the issue? Yes: the attachment cache is the single owner that chooses local versus remote reads; using the existing media-reference classifier there avoids teaching the SSRF-guarded HTTP fetcher about local identities or forcing individual channels to duplicate source-classification policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b7bbb4f98a1f. LabelsLabel 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
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
69a4dc9 to
3938428
Compare
7ced477 to
574b2d2
Compare
574b2d2 to
6342062
Compare
dbdfda9 to
72119f2
Compare
72119f2 to
1911c63
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: harjoth <[email protected]>
8ef8e64 to
a0f5b1f
Compare
…-117268-a0-document-fix
…-117268-a0-document-fix
…tachment url (openclaw#117268) * fix(media-understanding): resolve inbound media:// refs carried as attachment url * fix(media-understanding): resolve stored inbound URL aliases Co-authored-by: harjoth <[email protected]> * test(qa): classify stored inbound media proof * test(qa): require exact inbound media completion * fix(media-understanding): preserve local media refs --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Inbound media can be stored locally and carried to media understanding as a
media://inbound/<id>attachment URL. The attachment cache only resolvedattachment.path, then sentattachment.urlto the remote fetch path. Thatturned a valid local identity into
MediaFetchErrorand silently lost audiotranscription.
This repair makes
MediaAttachmentCachethe canonical owner of the resolutionorder:
media://inboundstore alias only when that path is missing,blocked, or empty;
maxBytesfailures terminal;QA Channel now has a fixture-only carrier switch and a real Gateway scenario
covering the URL-only stored-audio path.
Why This Is the Best Fix
The failure belongs at the attachment cache boundary, where local and remote
sources are classified. Teaching the SSRF-guarded HTTP fetcher about local
store identities would duplicate
media-referencepolicy and weaken ownership.Changing channel producers would reject a valid shape already supported by the
channel SDK and Gateway claim-check flow.
The local read block is shared by path and alias resolution, so the repair does
not create parallel read policy. No operator config or persistent storage
surface changes.
Evidence
Functional proof head:
1911c63a3f7bc1097b6b1338a87f104e56368931.Current head:
a0f5b1f3b308bce344aba2c10014717e87a1af9b, rebased onto98c0d9deca5dff8346677c2a5ae5824301cb3516.The rebase did not change the semantic patch:
6ab1c40b26ed6113d4a3a98fcd1b765f8c9fecd36df5d2eb994e61d0918552f10cbe9aa7334c620adf102ab74b778b4ca590002fexactly one completed outbound marker reply.
Sanitized AWS Crabbox used public networking, no Tailscale, no credential
hydration, and a fresh PR checkout pinned to the functional proof head:
12media-understanding,32QA extension)OPENCLAW_BUILD_PRIVATE_QA=11/1scenario passedmarkerReplies=1MediaFetchErrororaudio: failedCI=1 pnpm check:changed: passed, including typecheck and all lint shardssemantic patch is byte-identical after rebase
Observed QA result:
GitHub CI is running on the current exact head.
Production and QA wiring delta is
+158/-63(net+95); test/scenario delta is+479. The positive production delta is the explicit source classification,one shared local-read path, alias retry state, and the QA-only carrier seam.
Thanks @harjothkhara for the original diagnosis and patch.
Closes #114634