Repository navigation
fix(media): preserve converted images with HEIC filenames - #142263
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 8, 2026, 11:24 AM ET / 15:24 UTC. ClawSweeper reviewWhat this changesPreserves acceptable PNG, JPEG, and WebP images with stale HEIC filenames, expands public-loader regression coverage, and documents the behavior. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: pinned main and the latest release still reject preservation solely because of stale HEIC filenames. No blocking correctness or security findings were identified, and the supplied public-loader evidence supports the repair. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s shared media loader reads local files or remote media and prepares image bytes for downstream consumers. It detects the actual format and checks image limits before preserving originals or converting them. flowchart TD
A[Local file or remote media] --> B[Shared media loader]
B --> C[Detect actual image format]
C --> D{Supported format within limits?}
D -->|Yes| E[Preserve original bytes and filename]
D -->|No| F[Convert or resize image]
E --> G[Downstream media consumer]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -18, Tests +15, Docs 0. Total -3 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep actual image format and existing byte/dimension limits authoritative, preserving accepted originals regardless of stale camera filename extensions. Do we have a high-confidence way to reproduce the issue? Yes: current-main source forces an in-limit PNG/JPEG/WebP named .heic or .heif through encoding. The supplied before/after loader observations corroborate that path; this review did not execute it. Is this the best way to solve the issue? Yes: deleting the obsolete private veto restores the existing preservation contract without adding a competing normalization path or changing public API signatures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b429ad36d3a9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '04869ae4899ad0524c3287759798362b0d62fef8': (677 commits) fix(release): pin Kova census refresh (#142104) fix: doctor read-only database inspections time out on large agent databases (#142179) docs: align v2026.9.3 framing with release announcement (#142307) fix(ui): discover models when default-model pickers open (#142105) fix(ci): keep Docker upgrade seed baseline older than target (#142273) refactor(tests): reuse named OAuth credential fixtures (#142272) fix(ci): keep mobile release helpers out of source checks (#142115) chore(ui): refresh control ui locales (#142147) fix(active-memory): explain why recall was skipped (#138658) fix(media): preserve converted images with HEIC filenames (#142263) docs: add v2026.9.3 release notes (#142277) fix(ui): retire picker focus listeners together (#142258) fix(ui): keep menu hover colors consistent across themes (#142243) fix(release): keep changelog credits within verified history (#142261) fix: keep tool-finalizer placeholders private in message-only groups (#138645) perf(tui): carry prepared URL membership through rendering (#142262) test(ui): await activity cache imports before teardown (#142282) fix(qa): align auth and Workshop proofs with runtime contracts (#142280) feat(xai): use one curated catalog and concrete setup default (#142136) refactor(outbound): reuse prepared sendability facts (#142252) ...
Additional instructions
This is a same-repository branch; maintainers can update it directly.
What Problem This Solves
Fixes an issue where users sending or viewing an already-converted PNG, JPEG, or WebP image would get unnecessary recompression when its original filename still ended in
.heicor.heif. Even images already within the byte and dimension limits could lose their original bytes and metadata; an opaque PNG could also become a larger, lossy JPEG.Why This Change Was Made
Remove the obsolete HEIC filename veto and its private argument plumbing. The existing detected-format, byte-budget, and dimension checks remain the authority for preserving supported originals. Genuine HEIC data still goes through conversion, including when its filename has a different suffix.
This deletes 18 production lines without adding another normalization path. The media documentation now describes retained HEIC filenames.
User Impact
Already-supported images keep their original quality, metadata, and bytes under stale camera filenames. Genuine HEIC conversion, image limits, transparency handling, and GIF behavior are preserved.
Evidence
The real public
loadWebMediaflow was exercised before and after the change using synthetic PNG/JPEG files and a genuine HEIC file produced by macOSsips, with isolated state and temporary files:.heicor.heif.heicor.heif.heicor.pngThe eight-case public-loader proof had four preservation failures before the deletion and zero afterward. The genuine-HEIC output hashes match before and after. No live channel send is claimed.
The existing original-format/EXIF/limit regression matrix was extended through the public loader: six stale-name cases failed on the original implementation while three normal-name controls passed. All 126 media-loader and image-adapter tests now pass. The complete changed-file gate, production and core-test type checks, typed lint, formatting, and docs indexing pass. Independent review explicitly run at P2 is scoped-clean, with the invocation and unchanged source hashes retained.