Skip to content

test(media): use a decodable PNG in the Windows media tool test - #159771

Merged
obviyus merged 1 commit into
mainfrom
fix/windows-media-png-fixture
Sep 27, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/windows-media-png-fixture

Conversation

@obviyus

@obviyus obviyus commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: src/agents/tools/media-tool-file-url.windows.test.ts fails on the Windows CI job since #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 #159668, view_image only read image headers, so the broken fixture passed. #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.

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.

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.
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 12:19 PM ET / 16:19 UTC (Revision 2).

ClawSweeper review

What this changes

Replaces the PNG fixture in the Windows media-tool file URL test with decodable image data.

Regression provenance

Possible 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
Reviewed head: 9c1538b5fdc113ec5a0aa3667ece74fe7169fde8

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused fixture correction has source-backed root-cause evidence, a passing exact-head Windows job, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied Repository State identifies this as a member-associated, test-only PR, so the external contributor proof gate does not apply. The replacement feeds the registered Windows image-tool file URL test, and the exact-head Windows job succeeded; no stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied Repository State identifies this as a member-associated, test-only PR, so the external contributor proof gate does not apply. The replacement feeds the registered Windows image-tool file URL test, and the exact-head Windows job succeeded; no stored-data contract changes.
Evidence reviewed 8 items Introduced change: The pinned PR delta replaces only the PNG data literal in the Windows test.
Current-main gap: Fetched main still contains the old PNG literal; the fixture repair has not reached main.
Production decode boundary: The native viewed-image result requests full decodability verification before retaining image blocks and counting loaded images.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 1 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

Review metrics

Metric Value Why it matters
Windows test duration 1 test, 1.308 s reported in Windows CI The PR body now records a cost for the platform-specific test changed by this fixture.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded Windows CI regression in an existing test, with no production behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied Repository State identifies this as a member-associated, test-only PR, so the external contributor proof gate does not apply. The replacement feeds the registered Windows image-tool file URL test, and the exact-head Windows job succeeded; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-27T16:07:47.930Z sha 9c1538b :: needs changes before merge. :: none

@obviyus

obviyus commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 27, 2026
@obviyus
obviyus merged commit 7969275 into main Sep 27, 2026
119 checks passed
@obviyus
obviyus deleted the fix/windows-media-png-fixture branch September 27, 2026 16:22
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant