Repository navigation
Conversation
…o inbound media Inbound Zalo attachments (share.file, chat.photo, chat.video.msg) reached the agent only as the file name plus a Zalo CDN link. Extract the https attachment URL during normalization and, after access and mention gating, download it with the runtime saveRemoteMedia helper (account mediaMaxBytes, requireHttps, header/idle/total timeouts) and pass it to buildContext as inbound media. A failed download keeps the turn and tells the agent the attachment is unavailable, matching the Zalo Bot channel. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The download can take up to two minutes; re-resolve the route-bound access decision afterwards so a revocation in the meantime still drops the turn. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 26, 2026, 8:19 PM ET / September 27, 2026, 00:19 UTC. ClawSweeper reviewWhat this changesThe Zalo personal-account plugin now downloads inbound files, photos, and videos into OpenClaw media storage and passes them to agent turns, with normalization and gating tests. Merge readiness⛔ Blocked before merge - 7 items remain Current main still lacks inbound attachment media for Zalo personal accounts, so this is useful work. The branch needs fixes for retained media after access revocation, document filenames, and the test line cap; it also lacks an after-fix run through a real Zalo account. Priority: P1 Review scores
Verification
How this fits togetherThe Zalo personal-account plugin receives messages from zca-js, checks sender and group access, and builds the agent turn. This change adds a guarded media download between admission and dispatch. flowchart LR
A[Zalo message] --> B[Attachment normalization]
B --> C[Access and mention checks]
C --> D[Guarded media download]
D --> E[Access recheck]
E --> F[Agent turn or drop]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff adds no dependency or supply-chain change, but a revoked sender's newly downloaded attachment can remain published after the turn is denied. PR surfaceSource +125, Tests +215. Total +340 across 5 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. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the guarded download in the Zalo plugin, preserve Zalo's original document name, and make media publication safe across access revocation; demonstrate the patched inbound flow with a real account. Do we have a high-confidence way to reproduce the issue? Yes from source: current main converts the reported attachment payload to text and does not pass media to the agent context. The live pre-fix report supports that path; this read-only review did not execute it. Is this the best way to solve the issue? Partly. Reusing the guarded media downloader is the narrow owner-level approach, but the branch must preserve document metadata and settle a saved file when sender access is revoked. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d3f946089b5. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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
|
|
This pull request has been automatically marked as stale due to inactivity. |
Carry received Zalo Personal files, photos, and videos through the shared guarded media store into agent input. Preserve original document names, admission and command checks, cancellation, CDN/HTTPS/private-network/redirect/size/MIME limits, and rejected-file cleanup. Synthetic durable-ingress regressions prove the missing handoff red on main and green with the repair, including authorization and cleanup controls. Independent review and exact-head CI cover the final candidate. Supersedes #159253, thanks @ceo633. Closes #159249.
…aw#192608) Carry received Zalo Personal files, photos, and videos through the shared guarded media store into agent input. Preserve original document names, admission and command checks, cancellation, CDN/HTTPS/private-network/redirect/size/MIME limits, and rejected-file cleanup. Synthetic durable-ingress regressions prove the missing handoff red on main and green with the repair, including authorization and cleanup controls. Independent review and exact-head CI cover the final candidate. Supersedes openclaw#159253, thanks @ceo633. Closes openclaw#159249.
Closes #159249
What Problem This Solves
Fixes: files, photos and videos that users send over Zalo personal account (
zalouser) reach the agent only as a file name and a CDN link, so the agent cannot read them.User Impact
User impact: a PDF, photo or video sent over
zalouseris saved to the media store and passed to the agent as inbound media, the same way as on Telegram and the Zalo Bot channel. If the download fails, the turn still runs and the agent is told the attachment is unavailable.Why This Change Was Made
share.file→ document (original file name fromtitle),chat.photo→ image,chat.video.msg→ video. OnlyhttpsURLs are used. Link previews and plain text are ignored.saveRemoteMediahelper (SSRF guard,requireHttps, the accountmediaMaxBytes, header/idle/total timeouts, original file name), and passes the result tobuildContextasmedia. The download runs only after access and mention gating, so dropped messages never fetch anything.formatInboundMediaUnavailableText, matchingextensions/zalo.Evidence
monitor.group-gating.test.ts: 31/31 pass on this branch (rebased onmain). Five new cases cover: download plus media facts, the failure notice, no download when mention gating drops the message, and a sender revoked during the download (with a not-revoked control). Fault injection: removing the post-download re-check turns the revoked case red while the control stays green; changing the notice text turns the failure case red.zalo-quote-metadata.test.tsuse real payload shapes (file, photo, video, link preview, plain text,http, invalid URL). On my Windows machine every test in that file fails in teardown withEBUSY(unlinking sqlite), including the untouched tests, so I also ranextractZaloInboundAttachmentdirectly: 8/8 pass, and it goes red when the mapping is broken. CI on Linux should run the file normally.pnpm tsgo:extensionsandpnpm tsgo:extensions:test: 0 errors.oxfmt --check: clean.oxlint: only the existingmax-lineswarning onmonitor.group-gating.test.ts, which was already over the limit (1078 lines) before this change.scripts/plugin-npm-publish.sh --packof unmodifiedv2026.9.5is byte-identical to the published npm tarball. The patched pack differs only by this change.Related: #84924 (photos only; closed for inactivity).
🤖 Generated with Claude Code