Repository navigation
Conversation
|
🦞👀 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 maintainer review before merge. Reviewed September 10, 2026, 11:33 AM ET / 15:33 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds attachment-root lookup through trusted, policy-allowed installed channel plugins when the bundled contract is unavailable, with resolver and staging regression coverage. Merge readiness✅ Ready for maintainer review This remains a useful fix: current main and v2026.9.3 retain the reported defect. The earlier policy finding is resolved, and the new external-installation evidence satisfies the previous proof request. No blocking defect was found. Priority: P1 Review scores
Verification
How this fits togetherInbound media processing asks the channel plugin which attachment directories are allowed. Remote staging checks those roots before copying files over SSH/SCP and supplying local attachment paths to the agent. flowchart TD
A[Inbound attachment] --> B[Channel media root lookup]
B --> C{Bundled contract available?}
C -->|Yes| E[Attachment roots]
C -->|No| D[Trusted installed owner and plugin policy]
D --> E
E --> F{Attachment path allowed?}
F -->|Yes| G[SCP staging and local media]
F -->|No| H[Skip attachment]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +130, Tests +487. Total +617 across 4 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. Technical reviewBest possible solution: Keep media-root resolution with the existing channel contract, using canonical installation metadata and plugin policy while preserving account roots and validated artifact loading. Do we have a high-confidence way to reproduce the issue? Yes: an external-only official iMessage installation produces no roots through the current-main resolver, so staging rejects the attachment before transfer. Source inspection and the contributor's before/after transcript agree; this reviewer did not execute current main. Is this the best way to solve the issue? Yes: the patch extends the existing resolver through established metadata, policy, and artifact-loading owners without hardcoding channel roots or bootstrapping the full plugin. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 044cf2e6e027. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Media-root resolution only searched bundled plugin artifacts, so an official channel package installed outside the core bundle (for example @openclaw/imessage) resolved no attachment roots, and readable remote files were skipped before agent execution. Resolve the channel media contract from the trusted installed plugin metadata when no bundled artifact exists, loading only that narrow artifact. Fixes openclaw#144025
Install provenance is not permission: an official npm install that the operator denylisted, explicitly disabled, or left out of a restrictive plugin allowlist must not keep attachment-root authority. Apply the canonical manifest-owner base policy before loading the artifact.
157984e to
7f00e95
Compare
|
Revision 2 addresses the policy finding: installed owners must now be trusted official npm installs that declare the channel and pass the canonical manifest-owner base policy, so Remaining evidence gap: end-to-end staging from an external-only installation. This environment has no external-only install and no remote Messages Mac, so the after-fix staging run in the affected layout still needs someone with that host. Reproduction for whoever can run it: # 1. npm-global core with the official external channel package installed
openclaw plugins info imessage --json # expect origin: global, trustedOfficialInstall: true
# 2. Configure channels.imessage with remoteHost/attachmentRoots and a readable remote JPEG
# 3. Send the JPEG; inspect the staged result and confirm the transfer is attemptedIf the staged map is still empty in that layout after this patch, please paste the redacted |
Media-root authority now follows operator policy, but nothing covered the staging path: a denied owner could execute its media contract and hand roots to remote attachment staging. Cover a permitted installed owner that stages a remote attachment, a denied owner rejected before its artifact executes and before any transfer, and disablement after an earlier successful transfer. Keep the installed-owner selector module-private so the dead-code export check stays green.
|
Revision 3 ( What changed
After fix —
Before/after — same two suites with the pre-policy resolver restored ( The second pair is the security finding in behavior: without the policy check the denied owner's artifact executes and the denied remote path starts three SCP attempts. With the check in place the artifact's write-canary stays absent and no transfer starts. Still not tested: no live external-only installation ( |
|
Added the requested after-fix evidence from an actual external npm installation (no synthetic metadata, no handcrafted artifact, no stubbed transport). PR body Evidence section updated. Setup (all real):
After fix (driver output, trimmed; full JSON in the PR body): Before (same driver, same real installation, resolver restored from origin/main): That is the reported defect in behavior: current main cannot see the externally installed channel's media contract, so the attachment never reaches Still not covered here: a real Messages Mac — the SSH endpoint is loopback (real handshake, real transfer, byte-identical result) and the message context is driver-constructed rather than produced by the imsg bridge, so a real HEIC decode and the reporter's exact layout remain for a host that has them. The transport code path is unchanged by this diff and ran unstubbed. |
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
landpr-approve-unrelated-red |
|
Thanks @LiuwqGit! Proof: The public plugin installer and packaged Gateway reproduced the failure through synthetic
CI exception: Run 34528689362, attempt 1 had one failed child, checks-node-compact-large-20, which failed the aggregate gate. The guarded merge used the recorded standing approval for these four failures:
These cases exercise provider credentials, local MCP endpoints, and auth-worker preparation. They do not invoke message dispatch, attachment roots, or staging. The changed media tests were not in the failing auth group, and the MCP cases use fresh isolated child state. Their scenario, timeout, worker, dependency, and scheduler code is unchanged by this four-file repair. Source and lifecycle review established independence; no matching main failure or precise stall cause was established. No introducing commit is blamed, and no test deadline was weakened or failure hidden by a rerun. This proves local attachment staging on Linux with a synthetic transport. A real Messages Mac, recipient delivery, and HEIC decoding were not tested. |
Closes #144025
What Problem This Solves
Fixes an issue where users of the official external iMessage plugin had remote attachments skipped even when the files were inside configured allowed roots. Core only looked for a bundled media contract, which is absent from the published external-only installation.
Why This Change Was Made
The existing media-root resolver now falls back to a globally installed, verified official channel owner that passes the canonical plugin policy. It loads that owner's validated
media-contract-api.jsand keeps bundled contracts first. Attachment roots remain plugin-owned, and the existing SCP staging path is unchanged.User Impact
Allowed remote attachments can reach local staging with the official external iMessage plugin. Operator deny/allow policies and plugin disablement remain authoritative.
Evidence
decc0d9e05fb: the real Gateway admitted an inbound from a protocol-compatibleimsgfixture, rejected the configured allowed attachment before SCP, and completed/statuswithout staging it.cd14f8f190b6: the same public installation and ingress path loaded the real external media contract, made one strict loopback SSH/SCP transfer, and staged all 68 bytes with an identical digest.@openclaw/[email protected]; inspection confirmed a loaded global official install, with no bundled iMessage copy.The channel transport used a synthetic fixture on Linux. A real Messages Mac, live recipient delivery, and HEIC decoding were not exercised.