Skip to content

fix(zalouser): deliver received attachments as readable media - #192608

Merged
roboclaw-bot merged 2 commits into
mainfrom
loop/contributor-pr-159253
Nov 4, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
loop/contributor-pr-159253

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Supersedes #159253, thanks @ceo633.
Closes #159249.

What Problem This Solves

Fixes: files, photos, and videos received through Zalo Personal reach the agent as filenames and CDN links without readable attachments.

User Impact

Authorized attachments reach the agent as stored media with their original document filenames. Failed downloads leave an attachment-unavailable notice alongside the message. No configuration change is required.

Why This Change Was Made

Carry recognized received attachments through Zalouser's existing normalizer and monitor into the shared media store and inbound context. Downloads run after sender and mention checks, enforce HTTPS and Zalo CDN hosts across redirects, retain private-network/MIME/size protections and deadlines, and honor monitor and ingress cancellation. Recheck sender and command access before downloading and before dispatch; retire newly staged files if access or cancellation rejects the turn.

Production grows by 105 lines because the handoff was missing. There is no dead or duplicate media path in this owner to remove without unrelated changes. The repair adds no transport abstraction, SDK capability, dependency, or configuration option. A separate 219-line regression allocation covers the new durable-ingress suite; the shared test budget is unchanged.

Evidence

  • Synthetic Testbox proof on base 9e59d23aff4d553dd264133d5efeffd10e359a40: all five initial cases failed because no readable media was materialized; the same cases passed with the repair.
  • The final inbound-media suite passes all 16 cases: document/photo/video bytes and MIME at agent input; filename preservation; access, mention, and ordinary-link exclusions; HTTPS, CDN host, private address, redirect, downgrade, and size rejection; revoked/cancelled staging cleanup while preserving a neighboring file. Test bodies take about 7 seconds; the final named-file run took 42.66 seconds including import/worker preparation.
  • The existing group-gating, account-scope, and quote/normalization suites pass (36 cases). Exact-head PR CI is the broad proof.
  • Touched-file formatting, syntax lint, and whitespace checks pass. Targeted typed lint reports zero warnings/errors and the Zalouser package typecheck passes on Testbox.
  • Independent autoreview completed P0–P2 with no actionable findings against the complete local candidate and media/ingress owner contracts. Subsequent test-only corrections use the context builder's canonical empty media array and a void-returning setup hook.
  • Follow-up CI repair replaces the inline attachment-record assertion with the existing SDK record parser, removing assertion-safety growth; an independent P0–P2 correction review is also scoped-clean.
  • No contributor checkout or execution; no real Zalo credentials, messages, CDN requests, browser, or container proof. The listener and HTTP transport are synthetic; durable ingress, normalization, guarded downloading, media storage, and context building use production paths. Live-account interoperability is outside this proof.

Final head 09d73ac2bbba30845f04ea9731b8ffea8e5f87ca: 48 checks pass, 58 are skipped, and none are pending or failed. Linux CI and macOS CI are green.

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: zalouser Channel integration: zalouser size: M labels Nov 4, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@roboclaw-bot
roboclaw-bot merged commit 42c1bd6 into main Nov 4, 2026
130 of 131 checks passed
@roboclaw-bot
roboclaw-bot deleted the loop/contributor-pr-159253 branch November 4, 2026 07:05
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
…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.
RomneyDa added a commit that referenced this pull request Nov 17, 2026
…90730)

Keep line breaks and indentation after channel-specific mention removal.
Retain existing single-line whitespace normalization.

Release adaptation: extend the maintenance-line Feishu bot.test.ts command
admission coverage rather than restoring the newer bot.commands.test.ts harness.
Production changes are the original three parser hunks.

Companion dispositions: #190975 concerns the independent Zalo group cache
clock test; #192608 concerns attachment handoff, not text command parsing;
#197656 removes main-only retired test allocations. All are not applicable
to this bounded backport. No later #190730 mention through bd692e9.

(cherry picked from commit 2bd7edf)

Co-authored-by: Masato Hoshino <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: zalouser Channel integration: zalouser clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zalouser: inbound files, photos and videos reach the agent only as a CDN link, never as media

1 participant