fix(media): normalize Windows inbound paths case-insensitively#96024
fix(media): normalize Windows inbound paths case-insensitively#96024VectorPeak wants to merge 2 commits into
Conversation
4114d43 to
33fa5bc
Compare
1c2e0d8 to
379328b
Compare
379328b to
2716328
Compare
|
Codex review: needs real behavior proof before merge. Reviewed June 25, 2026, 7:49 AM ET / 11:49 UTC. Summary PR surface: Source +2. Total +2 across 1 file. Reproducibility: yes. at source level: current main preserves Windows path casing and then compares root and candidate segments with strict equality. I did not run a Windows package repro in this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the shared media-core normalization after after-fix Windows proof and focused mixed-case Windows drive regression coverage are present. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main preserves Windows path casing and then compares root and candidate segments with strict equality. I did not run a Windows package repro in this read-only review. Is this the best way to solve the issue? Yes, this is likely the best fix shape because normalizing in the shared media-core policy covers media-understanding, local media access, sandbox staging, and plugin SDK callers together; caller-level case folding would duplicate the invariant. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4ecb45bf7729. Label changesLabel justifications:
Evidence reviewedPR surface: Source +2. Total +2 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
What Problem This Solves
Windows drive paths are case-insensitive, but OpenClaw's inbound media path policy currently compares normalized path segments case-sensitively.
For example, a configured inbound media root may be:
C:\Users\Alice\.openclaw\mediawhile an inbound local media path may be reported as:
c:\users\alice\.openclaw\media\incoming\photo.jpgBoth paths refer to the same location on Windows, but the current segment comparison rejects the candidate path because
C:does not equalc:andUsersdoes not equalusers.This can block valid local media paths before they enter media staging, local media access, media understanding, or agent media tooling.
Change
Normalize Windows drive absolute paths to lowercase inside
normalizePosixAbsolutePath().POSIX-style absolute paths are unchanged, so Linux/macOS case-sensitive behavior is preserved.
Evidence
Reproduced against an installed OpenClaw package on Windows:
OpenClaw 2026.6.8 (844f405)Command:
Output before this fix:
{ "version": "OpenClaw 2026.6.8 (844f405)", "root": "E:\\Github\\openclaw\\media", "sameCaseAllowed": true, "differentCaseAllowed": false }Validation
git diff --check upstream/main...HEADpassed.corepack pnpm exec vitest run packages/media-core/src/inbound-path-policy.test.ts --runInBandAI Assistance Disclosure
This PR was prepared with AI assistance.