Repository navigation
test(media): use a decodable PNG in the Windows media tool test - #159771
Conversation
The one-pixel PNG fixture had an invalid zlib checksum in its IDAT chunk. Since #159668, view_image fully decodes fresh images and omits undecodable ones, so the Windows-only test received zero images.
|
🦞👀 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 27, 2026, 12:19 PM ET / 16:19 UTC (Revision 2). ClawSweeper reviewWhat this changesReplaces the PNG fixture in the Windows media-tool file URL test with decodable image data. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: current main still has the invalid fixture. The PR-head Windows check passed, and the PR body now addresses the previous review’s test-cost request. Priority: P2 Review scores
Verification
How this fits togetherThe Windows test writes an image to a file URL containing spaces and Unicode characters, then passes it through OpenClaw’s registered image tool. The tool checks decodability before returning an image block and loaded-image count. flowchart LR
A[Windows test image] --> B[File URL]
B --> C[Registered image tool]
C --> D[Full image decode]
D --> E{Decodes?}
E -->|Yes| F[Image block and count]
E -->|No| G[Omission text]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0. Total 0 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep full decoding for native viewed images and use a valid PNG in the Windows file URL test. Do we have a high-confidence way to reproduce the issue? Yes. Current main supplies a PNG whose IDAT fails zlib validation to a registered image tool that checks full decodability; the reported Windows job failed, while the PR-head Windows job passed. This review did not run the Windows test locally. Is this the best way to solve the issue? Yes. Correcting the fixture preserves the existing registered-tool assertion and the production decode check. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b9358009d9ae. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…claw#159771) ## What Problem This Solves Fixes: `src/agents/tools/media-tool-file-url.windows.test.ts` fails on the Windows CI job since openclaw#159668 (for example run 36330931134, job 108652856586: `view_image` returns 0 images, "incorrect data check"). ## User Impact Test fixture only. No product behavior changes. Unblocks the Windows CI job for every PR. ## Why This Change Was Made The test's one-pixel PNG has an invalid zlib (Adler-32) checksum in its IDAT chunk. Before openclaw#159668, `view_image` only read image headers, so the broken fixture passed. openclaw#159668 made `view_image` fully decode fresh images and omit undecodable ones, which is correct, so this Windows-only test now receives no image. This replaces the fixture with a valid one-pixel grayscale PNG. It's the only copy of that corrupt base64 in `src`, `extensions`, `test` and `ui/src`. ## Evidence - Python `zlib.decompress` on the old IDAT data fails with "incorrect data check"; the new one decodes. - A throwaway test through the real `sanitizeContentBlocksImages(..., { verifyDecodability: true })`: old fixture → omitted (`text`), new fixture → kept (`image`). - The test itself is `describe.runIf(process.platform === "win32")`, so it's skipped on macOS; the Windows CI job is the real check. - Pash/Sarah overlap: none (test file only). ### Test cost - Windows CI: the test now passes in `checks-windows-node-test-1` (run 36331717411, job 108654954810): 1 test, about 1.3 s ("loads Unicode and space file URLs through registered image and PDF tools", 1308 ms). - Local single-worker run on macOS: the file is `win32`-only, so it's skipped (1 skipped); no local cost. - The change only replaces the fixture bytes; no new test was added. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes:
src/agents/tools/media-tool-file-url.windows.test.tsfails on the Windows CI job since #159668 (for example run 36330931134, job 108652856586:view_imagereturns 0 images, "incorrect data check").User Impact
Test fixture only. No product behavior changes. Unblocks the Windows CI job for every PR.
Why This Change Was Made
The test's one-pixel PNG has an invalid zlib (Adler-32) checksum in its IDAT chunk. Before #159668,
view_imageonly read image headers, so the broken fixture passed. #159668 madeview_imagefully decode fresh images and omit undecodable ones, which is correct, so this Windows-only test now receives no image. This replaces the fixture with a valid one-pixel grayscale PNG. It's the only copy of that corrupt base64 insrc,extensions,testandui/src.Evidence
zlib.decompresson the old IDAT data fails with "incorrect data check"; the new one decodes.sanitizeContentBlocksImages(..., { verifyDecodability: true }): old fixture → omitted (text), new fixture → kept (image).describe.runIf(process.platform === "win32"), so it's skipped on macOS; the Windows CI job is the real check.Test cost
checks-windows-node-test-1(run 36331717411, job 108654954810): 1 test, about 1.3 s ("loads Unicode and space file URLs through registered image and PDF tools", 1308 ms).win32-only, so it's skipped (1 skipped); no local cost.