Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
MEDIA: directives using an uppercase FILE:// URI scheme are left in assistant text instead of being extracted as local media attachments.
Steps to reproduce
- Check out current
main at f698703934f3c52d3e21f4b3f8d805c63f160845.
- Add the existing media-parser table case
['/tmp/generated.png', 'MEDIA:FILE:///tmp/generated.png'] to src/media/parse.test.ts.
- Run
node scripts/run-vitest.mjs src/media/parse.test.ts with Node 24.
- Observe that
splitMediaFromOutput returns visible text MEDIA:FILE:///tmp/generated.png and no extracted media URL.
Expected behavior
URI schemes are case-insensitive. MEDIA:FILE:///tmp/generated.png should normalize and extract the same local path as MEDIA:file:///tmp/generated.png: /tmp/generated.png.
Actual behavior
normalizeMediaSource checks src.startsWith('file://'), so the uppercase scheme is not removed. The remaining scheme-shaped value fails local-path validation and the directive stays in visible text.
Focused negative-control output:
FAIL src/media/parse.test.ts > splitMediaFromOutput > accepts supported media path variant: /tmp/generated.png
AssertionError: expected 'MEDIA:FILE:///tmp/generated.png' to be ''
Test Files 1 failed (1)
Tests 1 failed | 57 passed (58)
OpenClaw version
Current main at f698703934f3c52d3e21f4b3f8d805c63f160845.
Operating system
macOS 26.5 (Darwin), arm64.
Install method
Source checkout with the repository-pinned dependencies.
Model
Not applicable; reproduced directly through the production media parser.
Provider / routing chain
Not applicable; no provider or channel boundary is needed to reproduce the payload-shaping bug.
Logs
See the focused Vitest failure above.
Screenshots, recordings, and evidence
No visual surface is involved. The deterministic parser assertion captures the incorrect output value.
Impact and severity
Affected: any assistant/tool output that emits a valid file URI with non-lowercase scheme spelling.
Severity: low, but user-visible; the intended attachment is silently not delivered and the raw directive remains in the reply.
Frequency: deterministic for uppercase or mixed-case file:// schemes.
Consequence: generated local media is omitted from delivery.
Additional information
Live issue and PR searches for uppercase file URL MEDIA and normalizeMediaSource file:// found no open report or fix for case-insensitive file URI schemes. Closed #2878 covered Windows drive-path normalization after a lowercase file:// prefix, not scheme casing.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
MEDIA:directives using an uppercaseFILE://URI scheme are left in assistant text instead of being extracted as local media attachments.Steps to reproduce
mainatf698703934f3c52d3e21f4b3f8d805c63f160845.['/tmp/generated.png', 'MEDIA:FILE:///tmp/generated.png']tosrc/media/parse.test.ts.node scripts/run-vitest.mjs src/media/parse.test.tswith Node 24.splitMediaFromOutputreturns visible textMEDIA:FILE:///tmp/generated.pngand no extracted media URL.Expected behavior
URI schemes are case-insensitive.
MEDIA:FILE:///tmp/generated.pngshould normalize and extract the same local path asMEDIA:file:///tmp/generated.png:/tmp/generated.png.Actual behavior
normalizeMediaSourcecheckssrc.startsWith('file://'), so the uppercase scheme is not removed. The remaining scheme-shaped value fails local-path validation and the directive stays in visible text.Focused negative-control output:
OpenClaw version
Current
mainatf698703934f3c52d3e21f4b3f8d805c63f160845.Operating system
macOS 26.5 (Darwin), arm64.
Install method
Source checkout with the repository-pinned dependencies.
Model
Not applicable; reproduced directly through the production media parser.
Provider / routing chain
Not applicable; no provider or channel boundary is needed to reproduce the payload-shaping bug.
Logs
See the focused Vitest failure above.
Screenshots, recordings, and evidence
No visual surface is involved. The deterministic parser assertion captures the incorrect output value.
Impact and severity
Affected: any assistant/tool output that emits a valid file URI with non-lowercase scheme spelling.
Severity: low, but user-visible; the intended attachment is silently not delivered and the raw directive remains in the reply.
Frequency: deterministic for uppercase or mixed-case
file://schemes.Consequence: generated local media is omitted from delivery.
Additional information
Live issue and PR searches for
uppercase file URL MEDIAandnormalizeMediaSource file://found no open report or fix for case-insensitive file URI schemes. Closed #2878 covered Windows drive-path normalization after a lowercasefile://prefix, not scheme casing.