Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 10:59 PM ET / August 11, 2026, 02:59 UTC. ClawSweeper reviewWhat this changesThis PR accepts canonical local Merge readinessKeep open for maintainer review: the prior P1 is fixed on the current PR head and no new actionable patch defect was found, but the protected maintainer-owned delivery/security boundary still needs exact-head landing verification. Priority: P1 Review scores
Verification
How this fits togetherMedia references originate in agent output and tool inputs, then flow through local URL conversion and sandbox/host access policy before media is read or delivery is deduplicated. This change affects Windows path portability and the boundary that prevents raw host-local files from being sent in normal replies. flowchart LR
A[Agent and tool media references] --> B[Media URL normalization]
B --> C{Sandbox workspace mapping}
C -->|mapped| D[Workspace containment]
C -->|not mapped| E[Host-local media policy]
D --> F[Media read]
E --> G[Reply delivery and deduplication]
Decision needed
Why: The protected maintainer label and unavailable direct dependency source leave a bounded security/delivery judgment that automated review cannot discharge. Before merge
Agent review detailsSecurityNone. PR surfaceSource +27, Tests +221. Total +248 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the boundary-specific conversions, refresh the merge result against current main, and land only after exact-head checks plus direct confirmation of the locked file-URL conversion contract. Do we have a high-confidence way to reproduce the issue? Yes: current main recognizes only selected Is this the best way to solve the issue? Yes, subject to dependency confirmation: the patch extends existing owner boundaries rather than creating a parallel path, while retaining sandbox containment and encoded-separator handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9ae35833759a. 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 (7 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…nderstanding-file-url-publication-current
Amp-Thread-ID: https://ampcode.com/threads/T-019fed8d-ad78-74f0-9592-a3466bb6a9bd Co-authored-by: Peter Steinberger <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-019fed8d-ad78-74f0-9592-a3466bb6a9bd Co-authored-by: Peter Steinberger <[email protected]>
…nderstanding-file-url-publication-current
This reverts commit 63efbbc.
…nderstanding-file-url-publication-current
…nderstanding-file-url-publication-current
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer landing adjudication for exact head |
|
Merged via squash.
|
* fix(media): accept canonical file URL forms * fix(media): normalize file store keys * fix(media): handle canonical file URLs end to end * test(media): expose nested store key failure on Windows Amp-Thread-ID: https://ampcode.com/threads/T-019fed8d-ad78-74f0-9592-a3466bb6a9bd Co-authored-by: Peter Steinberger <[email protected]> * test(media): cover canonical file URL dedupe Amp-Thread-ID: https://ampcode.com/threads/T-019fed8d-ad78-74f0-9592-a3466bb6a9bd Co-authored-by: Peter Steinberger <[email protected]> * Revert "test(media): cover canonical file URL dedupe" This reverts commit 63efbbc. * fix(media): keep nested store keys portable * fix(media): complete canonical file URL handling * fix(media): reject encoded separators in comparison keys * fix(auto-reply): block canonical file URLs without sandbox --------- Co-authored-by: Amp <[email protected]>
What Problem This Solves
Windows media handling had three connected portability gaps:
@openclaw/fs-safe0.5.4 correctly rejects;file://spellings instead of the complete anchoredfile:scheme; andThe result could be failed managed-media writes, rejected mounted image/PDF reads, or duplicate/ambiguous media delivery on Windows.
Canonical Fix
src/media/store.tsnow emits validated nested store keys withpath.posix.joinat the producer. Native filesystem paths are still constructed later by the file-store dependency.file:scheme and delegate syntax/security to their existing safe conversion owners.src/agents/sandbox-media-paths.tsdelegates file URL parsing tosafeFileURLToPath(raw, "linux"), because sandbox mount paths are POSIX even when the host is Windows.SandboxFsBridgeremains the containment owner.src/media/media-reference-comparison.tsuses Node's explicit platform conversion contract: Windows drive/UNC forms retain Windows semantics, while hostless POSIX/container forms use POSIX semantics. Before conversion, it reuses@openclaw/fs-safe's encoded-separator predicate so%2F/%5Creferences retain their original comparison key instead of colliding with decoded local paths. The historical malformed-input fallback remains narrow.User Impact
Windows managed-media writes work with nested keys such as
outgoing/originals/<id>. Valid local references such asFILE:/C:/Media/photo.png,FILE:/workspace/media/pic.png, and their triple-slash equivalents now reach the same safe parsing and containment boundaries. Equivalent safe references deduplicate consistently. Encoded%2F/%5Creferences remain deliberately distinct from decoded local paths, preventing reply dedupe from silently suppressing outbound media without weakening remote-host, UNC/network, local-root, or sandbox-mount protections.Proof
Authentic Windows-focused proof on the final composition:
%2F/%5C, upper/lower hex, and non-collision controls);oxfmt, directoxlint, andgit diff --check: clean;A broader image/PDF file run exceeded the local wrapper's 184-second bound without a failing result or surviving process; the exact mounted-caller filter then passed. Earlier full-file proof on the identical reviewed blobs had only the named unchanged iMessage attachment-root assertion baseline.
Dependency and Security Contract
The exact cached
@openclaw/fs-safe0.5.4 artifact was inspected and executed against its lockfile integrity (sha512-lttlWKRBQU7eYDYykU2BPoF1S6AESGrT77mVCXsuWBxnRBTAI/PuGB89DB3D1lBCDaqTykIjymPJz4pFesGnkg==). Direct proof confirms:FILE:/workspace/media/pic.pngwith explicit Linux semantics resolves to/workspace/media/pic.png;%2Fbut decodes%5C, while the canonical fs-safe predicate rejects both case-insensitively before conversion.Downstream local-root and sandbox-mount containment is unchanged. Fresh independent review found no traversal, host/local conflation, encoded-separator bypass, UNC regression, path/query secret exposure, or duplicate/silent-delivery defect.
Review Evidence
%2F/%5Cbefore comparison conversion while preserving the original key, and route every anchored case-insensitivefile:form through the normal-reply host-local rejection boundary.gpt-5.6-sol/high returned 0 findings, correctness 0.98.path.posix.joinproducer fix.Change Size
Against the concurrent main parent:
CI Context
Exact head
a9c5373completed CI successfully (59 passed, 13 skipped, 0 failed). Exact-head CI for the final no-sandbox repair headeef9980is the authoritative landing gate.Changelog
Not required: this is a narrow Windows media-path compatibility and correctness repair with no public API or configuration change.