Repository navigation
fix(browser): compare PNG IHDR bytes without ASCII folding - #2099
Conversation
Screenshot checks already compare the PNG signature as raw bytes, then decoded the chunk type with an encoding that maps high-bit bytes onto IHDR. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
baron
left a comment
There was a problem hiding this comment.
Reviewed repaired exact head e1df05b and current-main integration. Oracle and independent exact-commit reviews found no blocking source defect.
The two duplicate shallow PNG header interpretations now consume one domain-owned, byte-faithful header/dimension helper. Both callers preserve their existing capacity, dimensions, scope and identity checks; the helper does not claim full PNG validity. The separate pixel decoder retains stronger chunk/checksum/format semantics and latin1 type validation, rather than duplicating this shallow admission API. The ASCII-folding regression assertion now follows the mutation and is discriminating. No unrelated test pruning or runtime authority change.
Pinned validation: 23 focused tests, full check (six tasks plus architecture guards), and 916-file discovery passed. Live browser/native helper verification was not performed locally. Fresh published-head hosted CI is green, including Static checks, Test (coverage + timing), and CI required; original-head CI was not substituted. The reviewed CI run requiring GitHub approval was approved only after exact source/workflow-scope verification. Final integration is clean.
Summary
Buffer.toString("ascii").IHDRbytes withBuffer.equalsin native UI snapshots and CDP screenshot capture, so a high-bit chunk type is not accepted as IHDR.Test plan
npm run test:focused -- src/native/NativeUiObservation.test.tstypecheckandlintMade with Cursor