Skip to content

fix(runtime-gate): decode screenshots without pngjs's sync reader, which Node 27 breaks - #27

Merged
rishitank merged 2 commits into
mainfrom
fix/runtime-gate-node27-png
Nov 7, 2026
Merged

rishitank merged 2 commits into
mainfrom
fix/runtime-gate-node27-png

Conversation

@rishitank

Copy link
Copy Markdown
Contributor

What

The runtime-gate toolkit (.github/actions/runtime-gate) no longer uses PNG.sync.read to decode screenshots for the visual diff. It uses pngjs's streaming parser instead. A screenshot that cannot be compared is now a non-blocking visual-diff-failed warning, not a crash.

Files: src/crawl.mjs, test/upgrades.test.mjs, test/toolkit.test.mjs. No dependency changes.

Why

runtime-gate-selftest has been red on main and on #26 since the runners started getting Node v27.0.0-alpha.0.0.0. That is what actions/setup-node with node-version: current now resolves to (run 42341698574). The last green run (37964786788, 9 Oct) used Node v26.11.1, with the same toolkit code.

  • Node 27 turned zlib's stream constructors into ES classes and ended DEP0184 (zlib: convert classes to modern syntax and eol DEP0184 nodejs/node#64849, listed under "zlib" in the 27.0.0-alpha.0.0.0 release notes).
  • pngjs 7.0.0 is the latest release (Feb 2023). Its lib/sync-inflate.js:18 subclasses the old way, with zlib.Inflate.call(this, opts). PNG.sync.read uses it for every non-interlaced PNG, so it now throws TypeError: Class constructor Inflate cannot be invoked without 'new'.
  • crawl.mjs called PNG.sync.read in diff(). The exception escaped main(), the crawl exited 2 and wrote no crawl.json.
  • That one cause explains all three red jobs:
    • Runtime gate (both e2e jobs): they now find a default-branch baseline artifact, so diff() runs and crashes. On 9 Oct there was no baseline yet, so the diff never ran.
    • Toolkit self-test: the baseline re-run in upgrades.test.mjs crashed the same way. again.report was null, so line 129 failed with "Cannot read properties of null (reading 'baseline')". The other 17 tests passed.

pngjs's streaming parser (new PNG().parse()) only calls zlib.createInflate. Its stream base is the legacy Stream function, which is still a function in Node 27 (lib/internal/streams/legacy.js at the v27 tag). The legacy zlib.Z_* constants it reads are still exported. PNG.sync.write uses zlib.deflateSync, which is fine.

How it is safe

  • Same library, same pixels: both pngjs parsers share the filter and bitmap code, and pixelmatch still gets RGBA buffers.
  • The visual diff was always advisory ("visual changes are reported but never fail it"). Now an unreadable screenshot really can't fail the gate either: it shows up as a warning, and the summary says how many screenshots could not be compared instead of "No visual changes". Blocking findings are untouched.
  • A late second parser error event is absorbed, so it cannot become an unhandled exception.
  • No new dependency, nothing paid.

How it was tested

Node 27 itself could not be installed in my sandbox (nodejs.org is blocked there). So I reproduced the Node 27 behaviour on Node 22.23.4 (LTS) with a --require preload that swaps zlib.Inflate and friends for ES-class subclasses, which is exactly what #64849 did. With that preload, the old code fails with the same TypeError and the same "reading 'baseline'" test failure. Without it, the old code passes.

Run Result
Old code, Node 22 + Node 27 zlib emulation, baseline test fails: "Cannot read properties of null (reading 'baseline')" (reproduces CI)
Old code, plain Node 22, baseline test passes
New code, Node 22 + Node 27 zlib emulation, full suite 19/19 pass
New code, plain Node 22, full suite 19/19 pass
New "undecodable baseline" test against the old code fails (crawl crashes), as it should

The browser was the local Chrome for Testing via RG_CHROMIUM_PATH, because Playwright's CDN is blocked in my sandbox. CI uses Playwright's own Chromium.

On this PR, the Toolkit self-test job runs npm test from this branch on the runner's Node 27, so that is the real Node 27 check.

What is left for later

  • The SHA pins (not changed here, on purpose). The two Runtime gate e2e jobs call runtime-gate.yml from this repo, and it pins the toolkit at 7e22b13255bfa7fadfdec580fc41a359985b0b61. So those two jobs stay red on this PR until the pin moves. After this merges, a follow-up PR should change all four refs to the new commit (the squash-merge commit on main): three in .github/workflows/runtime-gate.yml and one in .github/workflows/runtime-gate-flows.yml. The ref to change is TanksterAI/.github/.github/actions/runtime-gate@7e22b13255bfa7fadfdec580fc41a359985b0b61. Once that merges, feat(light-lane): Docker-free shared jobs on the run-bound Cloud Run lane, with a lint that keeps them Docker-free #26 needs its base merged in (or a re-run) to go green.
  • node-version: current now picks up Node's new Alpha channel (27.0.0-alpha.0.0.0). The self-test uses it on purpose, and the toolkit's own fallback setup-node does too. Whether CI should run a pre-release Node is a separate decision.
  • It is also worth reporting the zlib.Inflate.call(this) pattern upstream to pngjs, which hasn't had a release since 2023.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TnrFoVjnwYcx5eNVMisBw8

…ich Node 27 breaks

Node 27.0.0-alpha.0.0.0 (now what setup-node's `current` resolves to)
turned zlib's stream constructors into ES classes and ended DEP0184
(nodejs/node#64849). pngjs 7.0.0, the latest release, subclasses
zlib.Inflate in PNG.sync.read with zlib.Inflate.call(this), so every
visual diff threw "Class constructor Inflate cannot be invoked without
'new'" and the crawl exited 2 without writing its report.

- crawl.mjs: read screenshots with pngjs's streaming parser, which only
  calls zlib.createInflate. diff() is async.
- The visual diff is advisory, so a screenshot that cannot be compared
  is now a non-blocking visual-diff-failed warning instead of a crash,
  and the summary says so instead of "No visual changes".
- upgrades.test.mjs: the baseline re-run checks its exit status first
  (so a crash shows its stack, not "Cannot read properties of null")
  and that no screenshot failed to decode.
- toolkit.test.mjs: an undecodable baseline is a warning, not a crash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TnrFoVjnwYcx5eNVMisBw8
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

TanksterAI is on CodeRabbit Free, which includes PR summaries. Ask your admin to upgrade for code reviews.

  • Subscription request pending. Open CodeRabbit to request again.

Open in CodeRabbit

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Visual comparison and diff-image saving errors are reported as non-blocking findings, allowing the runtime report to finish generating.
    • Reports show how many screenshots could not be compared, including when visual changes are detected.
    • Visual changes continue to be reported with a generated diff image.

The crawler now decodes PNG screenshots asynchronously and returns generated diff images for saving. It records comparison and diff-image save failures as non-blocking findings. The Markdown report includes the count of screenshots that could not be compared.

Changes: Visual comparison

Layer / File(s) Summary
Asynchronous PNG decoding and diff generation
.github/actions/runtime-gate/src/crawl.mjs
The diff function decodes both images asynchronously. It returns null when a baseline or screenshot is missing, and otherwise returns the generated diff image with comparison metadata.
Failure handling and report validation
.github/actions/runtime-gate/src/crawl.mjs, .github/actions/runtime-gate/test/toolkit.test.mjs, .github/actions/runtime-gate/test/upgrades.test.mjs
The comparison loop records comparison and diff-image save failures as non-blocking findings. The Markdown report counts screenshots that could not be compared. Tests cover malformed PNG data, saved diff images, and successful baseline comparison.

Estimated code review effort: 2 (Simple) | ~10 minutes

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Apprentice, the PNG streams unfold,
Two images meet; their pixels told.
A failed comparison does not halt the flight,
The report records each missing sight.
Diff images join the completed run,
The Dark Side counts the work as done.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Free
  • Run ID: 4b8bdf1d-8b73-41c6-bce3-4e422c5f10c7
Commits

Reviewing files that changed from the base of the PR and between 9686fcb and 050182a.

Files selected for processing: 2

  • .github/actions/runtime-gate/src/crawl.mjs
  • .github/actions/runtime-gate/test/toolkit.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@rishitank

Copy link
Copy Markdown
Contributor Author

Independent Claude review

Reviewed at 9686fcb. I rebuilt the toolkit at this commit, and every file's blob SHA matches the PR tree. I also read pngjs 7.0.0 (lib/png.js, parser-async.js, chunkstream.js, parser-sync.js, sync-inflate.js, packer-sync.js) and Node's lib/zlib.js and lib/internal/streams/legacy.js at the v27.0.0-alpha.0.0.0 tag.

The core fix is correct. On Node 27, Inflate is class Inflate extends Zlib, and createInflate is function(options) { return new ctor(options); }. Z_MIN_CHUNK is still exported as a legacy constant, and deflateSync and inflateSync are still there. Legacy Stream is still function Stream(opts) { EE.call(this, opts); }. In pngjs, zlib.Inflate.call(this) only appears in sync-inflate.js, which only PNG.sync.read uses. src/crawl.mjs is the only file that uses pngjs or zlib. The only sync call left is PNG.sync.write (deflateSync), and it is fine.

Two things in the async path need fixing first. They are small.

Blockers

None.

Should fix

1. pngjs's async parser can still crash the crawl, so the new try/catch does not always hold. src/crawl.mjs:335-343

  • Cause: ParserAsync never listens for 'error' on its internal FilterAsync stream (parser-async.js; it only adds a no-op inside _handleError). The filter raises an error when the pixel data is shorter than the IHDR says ("Unexpected end of input"), or when a row has a bad filter byte. Nothing handles that event, so it becomes an uncaught exception. Your png.on('error') absorber is on the PNG, so it never sees it. The promise never settles, catch never runs, and the process dies.
  • Repro (Node 22, Chrome via RG_CHROMIUM_PATH): the baseline desktop-root.png had a valid signature, IHDR and CRCs, but a complete zlib stream holding only 10 of 50 rows. The crawl exits 1 and writes no crawl.json or crawl.md. The job then says "the app has runtime problems", which is the wrong diagnosis. The same happens with a bad filter byte, and with a short interlaced image. PNG.sync.read threw a catchable error for all three inputs. The new test passes only because 'not a png' is rejected at the signature check, before the filter stream exists.
  • Fix (one line, tested): forward the filter's errors once metadata has arrived. The filter is created in _handleMetaData, before 'metadata' is emitted.
    png.on('error', () => {});
    png.once('metadata', () => png._parser._filter?.on('error', (e) => png.emit('error', e)));
    With this line, all three inputs give exit 0, a report and a visual-diff-failed warning. It does touch a private field. pngjs is pinned to exactly 7.0.0 and has had no release since 2023, so that is acceptable, but say so in the comment. Also add a test with a committed short-data fixture (about 90 bytes) next to the 'not a png' case.

2. No test shows that a real visual change is still reported, so a breakage would now hide silently. test/upgrades.test.mjs:130-134, src/crawl.mjs:368

  • Cause: the self-baseline run compares identical screenshots. diff() returns null before it reaches PNG.sync.write, pixelmatch output or diffs/, so no test runs that path on Node 27. Before this PR, a failure there crashed the gate, and someone would notice. Now it becomes a collapsed warning. If PNG.sync.write (or the next Node change) breaks, every changed screenshot is reported as "could not compare", and the suite stays green. That is exactly how a real visual regression would be hidden.
  • Fix: add one positive case. Run the good site, overwrite the baseline's desktop-root.png with a solid-colour PNG of the same size (PNG.sync.write(new PNG({ width, height, fill: true }))), then run again. Assert that report.visual has a desktop-root entry, that diffs/desktop-root.png exists, and that there is no visual-diff-failed finding.

Nits

  • src/crawl.mjs:368 / :780-784: the catch also covers the stage after a change was found (PNG.sync.write, writeFileSync into diffs/). If that stage fails, a detected change is reported as "could not compare". Consider pushing the visual entry before you write the diff image, or catching that write on its own.
  • src/crawl.mjs:928-932: when r.visual.length > 0, the summary does not say how many screenshots could not be compared. That count only appears in the "no changes" branch.
  • runtime-gate-selftest.yml only runs when the toolkit changes. Consumers pin the toolkit by SHA but take node-version: current, and since this PR, a decoder that breaks on a future Node only shows up as warnings. A weekly schedule: trigger would catch that. It is optional: one roughly 7-minute run a week, on the same runner and within the free allowance.

Checked and fine

  • Error handling and double callbacks: PNG.parse registers once('parsed') and once('error'), and each removes the other, so the callback fires at most once. A later PNG-level error goes to the no-op. The parser's _handleError destroys the inflate stream, so nothing is left open on error. I tried 12 crafted inputs (garbage, empty, truncated, bad CRC, bad zlib, no IDAT, no IEND, too many rows, plus the three above). With the fix, none hang and none settle twice.
  • Same pixels: I decoded 200 real Playwright screenshots from the test runs with PNG.sync.read and with the async parser. The buffers were byte-identical in every case.
  • Memory: for a 1280×16384 full-page PNG, peak RSS was 388 MB with sync and 416 MB with async (+7%). Time was 0.97 s and 1.05 s. The two images are still decoded one after the other.
  • Ordering: the loop is sequential, so results are still in readdirSync order.
  • Severity: on main, any error in diff() rejected main() and the crawl exited 2 with no report. That was a hard failure by accident, not by design. The visual diff is documented as advisory, and a decode failure is a toolkit or artifact fault, not app behaviour. A non-blocking warning is the right severity, provided should-fix 2 keeps real changes visible.

Tests run here

  • Node 22.23.4 with local Chrome for Testing 153 (RG_CHROMIUM_PATH): full suite 19/19 pass.
  • Node 22 with a preload that turns zlib's constructors into ES classes (as #64849 does): PNG.sync.read throws "Class constructors cannot be invoked without 'new'", while the async parse and PNG.sync.write work. The PR's code passes the three relevant tests. The main crawl code with the PR's tests fails both new assertions with the same TypeError.

CI

  • Toolkit self-test: green (19/19 on the runner, with node-version: current).
  • Runtime gate (both e2e jobs): red, and only because of the SHA pin. Both crash in …/TanksterAI/.github/7e22b13…/runtime-gate/src/crawl.mjs:334 → pngjs/lib/sync-inflate.js:18 with TypeError: Class constructor Inflate cannot be invoked without 'new', exit 2. That is the old toolkit, pulled in through the pinned uses: ref (3 refs in runtime-gate.yml, 1 in runtime-gate-flows.yml). There are no other failures in those jobs.
  • actionlint and Renovate presets are green. CodeRabbit finished, but it is on the Free plan, so there is a summary only, with no review findings and no approval.

Verdict: FIX FIRST

The Node 27 fix is right and CI proves it. Fix should-fix 1 (one line plus a fixture test) and should-fix 2 (one positive visual-change test) before merging. Then do the pin-bump follow-up as planned.

🤖 Generated with Claude Code

…hanges still report

From the independent review of #27:

- readPng(): pngjs's streaming parser never listens for errors on its
  internal row filter, so a PNG whose pixel data is shorter than its
  header says, or has a bad filter byte, raised an unhandled 'error' and
  killed the crawl with no report. Those errors now go through the
  parser's own error path and reject. This reaches into pngjs internals;
  package.json pins pngjs at exactly 7.0.0 and the comment says so.
- The catch now covers decoding and comparing only. A change that was
  found stays a change even if saving its diff image fails (that is a
  separate visual-diff-image-failed warning).
- The summary shows how many screenshots could not be compared even
  when changes were found.
- toolkit.test.mjs: the undecodable-baseline test now also uses two
  small inline PNGs (short pixel data, bad filter byte) that get past
  the header. A new test overwrites the baseline with a solid black PNG
  and checks the change, its diff image and no visual-diff warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TnrFoVjnwYcx5eNVMisBw8
@rishitank

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I've addressed the Independent Claude review in 050182a.

Should fix 1: row-filter errors crash the crawl. Fixed in src/crawl.mjs readPng().

  • Once 'metadata' arrives, the parser's _filter errors now go to parser._handleError(e). That is the parser's own error path, rather than re-emitting on the PNG.
  • The difference from your one-liner: _handleError also destroys the inflate and filter streams and sets errord, so _complete cannot run afterwards. The error still reaches the PNG, through the parser's 'error' event, and rejects the promise.
  • The filter is created in _handleMetaData (IHDR). 'metadata' is emitted from headersFinished at the first IDAT, before any data is inflated, so no filter error can come before the listener is attached.
  • The comment says this relies on pngjs internals and on pngjs being pinned at exactly 7.0.0. package.json has "pngjs": "7.0.0". The lockfile resolves one copy, 7.0.0; pixelmatch's ^7.0.0 dedupes to it.
  • I ran all 12 of your mk.py inputs through this readPng under the Node 27 zlib preload. Each one settles exactly once. None hangs or crashes. good and long-inflate decode; the other 10 reject with a clear message.
  • Test: toolkit.test.mjs "a baseline screenshot that cannot be decoded…" now covers three baselines in one crawl:
    • 'not a png', which fails at the signature;
    • your 93-byte short-data PNG (50×50, 10 rows);
    • the 141-byte bad-filter PNG.
      The test asserts exit 0, crawl.json and crawl.md written, and a non-blocking visual-diff-failed finding for each file.
  • One difference from what you asked for: the two PNGs are inline base64 constants in the test, not committed .png files. Our only write path is the GitHub MCP push, which takes text content, so it can't commit binary files byte-exact. The bytes are identical to your probe files (checked with cmp).
  • With the new forwarding removed, this test fails with Error: Unexpected end of input as an uncaught crash. So it guards the private-field reliance if pngjs is ever upgraded.

Should fix 2: a real visual change must still be reported. Added "a real visual change against the baseline is still reported, with its diff image".

  • It crawls /, then overwrites the baseline desktop-root.png with a solid opaque black PNG of the same size. The size is read from the IHDR bytes, so the test doesn't depend on the decoder under test. Opaque, because pixelmatch blends transparency onto white.
  • It then crawls again and asserts:
    • a visual entry for desktop-root with ratio > 0.5;
    • diffs/desktop-root.png exists;
    • no visual-diff* findings;
    • the summary shows "Visual changes vs the default branch".

Nits

  • Narrower catch: diff() now only decodes and compares, and returns the pixelmatch output. The caller adds the change to visual first, then writes the diff image in its own try. If that write fails, the change is still reported, plus a separate non-blocking visual-diff-image-failed warning.
  • Count in the summary: when changes were found, the list now ends with "N more screenshot(s) could not be compared with the baseline".
  • Weekly schedule: not added, as agreed, because it would cost runner minutes.

Tests (Node 22.23.4, Chrome for Testing 153 via RG_CHROMIUM_PATH): 20/20 pass with the Node 27 zlib preload (node27-zlib.cjs), and 20/20 pass without it.

CI on 050182a (run 42360119875):

  • Toolkit self-test: green. 20/20 on the runner's Node v27.0.0-alpha.0.0.0.
  • Runtime gate (both e2e jobs): red, only because of the pin. Both still crash in …/7e22b13…/runtime-gate/src/crawl.mjs:334 → pngjs/lib/sync-inflate.js:18. That is the pinned old toolkit. They go green with the pin-bump follow-up after merge.

Blob SHAs, all verified against the branch tree:

  • src/crawl.mjs: c2939fe2cc3db2abb5f3e91a0f6a0452bf6e4577
  • test/toolkit.test.mjs: c21729596d2ab0258161e6af446fe49a991e60b7
  • test/upgrades.test.mjs: 2406fc220ec786b2d42bb05fa9cc84fe99b44813 (unchanged)

🤖 Generated with Claude Code

https://claude.ai/code/session_01TnrFoVjnwYcx5eNVMisBw8

@rishitank

Copy link
Copy Markdown
Contributor Author

Independent Claude review (round 2)

Reviewed at 050182a. I rebuilt the toolkit from main's files plus this PR's diff. Every file under .github/actions/runtime-gate/ hashes to the blob in the PR tree, including src/crawl.mjs c2939fe, test/toolkit.test.mjs c217295 and test/upgrades.test.mjs 2406fc2. I also re-read pngjs 7.0.0's parser-async.js, filter-parse-async.js, chunkstream.js, parser.js and png.js against the new forwarding.

Round-1 findings

Round 1 Status Evidence
Should fix 1: errors from the row filter crash the crawl Fixed src/crawl.mjs:349-352 sends _filter errors to parser._handleError. That path emits on the parser, which png.js:32 forwards to the PNG. It also destroys the inflate and filter streams and sets errord, so _complete cannot run afterwards. The filter is created in _handleMetaData (IHDR). 'metadata' is emitted only from _headersFinished at the first IDAT, before any data is inflated, so no filter error can arrive before the listener. I removed just that block and ran the same inputs: short-data, bad-filter and 16-bit short-data all go unhandled again (no settle, crash). So the line is load-bearing, and the new test guards it.
Should fix 2: no test of a real visual change Fixed test/toolkit.test.mjs:100 compares against a same-size opaque black baseline. It takes the size from IHDR, so it does not depend on the decoder under test. It asserts the visual entry, diffs/desktop-root.png, no visual-diff* finding, and the summary heading. This runs PNG.sync.write and the pixelmatch path on Node 27 in CI.
Nit: catch too wide Fixed diff() only decodes and compares now. The change is pushed to visual first, then the image is written in its own try (:806, visual-diff-image-failed). image is destructured out, so it never reaches crawl.json.
Nit: count missing when changes exist Fixed :956.
Nit: weekly schedule Declined (runner minutes) Fine.

Probes re-run against the PR's exact readPng

I extracted the function verbatim from src/crawl.mjs and ran it under the Node 27 zlib preload (zlib constructors become ES classes, as in nodejs/node#64849).

  • Round-1 inputs (12): each settles once. good and long-inflate decode; the other 10 reject with a clear message. No uncaught exception, no hang.
  • 11 new handcrafted inputs: palette with no PLTE, palette index out of range, IHDR twice (before and after IDAT), IDAT split into 7-byte chunks, trailing zlib garbage, 16-bit short data, interlaced with a bad filter, interlaced with bad zlib, zero dimensions, 40000×40000. All of them settle, with 0 uncaught exceptions.
    • 40000×40000 takes 4.5 s and peaks at 4.1 GB RSS before it rejects. main's PNG.sync.read gets OOM-killed on the same file, so this is no regression. It needs a forged baseline artifact anyway.
  • 1,500 CRC-valid structural mutants of good.png and two real Playwright screenshots (1280×800). I mutated the inflated rows (bytes, filter bytes, truncation, padding), the IHDR fields and the IDAT split, then recomputed the CRCs. 1,226 decoded and 274 rejected, with 0 uncaught exceptions and 0 hangs. Random byte flips alone (3,000 runs) all stop at the CRC check, so I don't count them as coverage.

Tests run here

Node 22.23.4, Chrome for Testing 153 via RG_CHROMIUM_PATH, the full suite (node --test test/*.test.mjs):

  • plain Node 22: 20/20 pass;
  • with --require node27-zlib.cjs: 20/20 pass.

Adversarial review of the new code

  • Settling and double callbacks: PNG.parse uses once('parsed') and once('error'), and each removes the other. A second error goes to the no-op. A late resolve or reject is a no-op. Nothing stays open after an error.
  • Ordering: the loop is still sequential, so the results stay in readdirSync order and only two decoded images are held at once.
  • Severity: both new finding kinds are blocking: false. They are added after the quarantine and retry passes, so they cannot change passed. Nothing in action.yml keys off finding kinds.
  • Private fields: pngjs is pinned exactly at 7.0.0, and the lockfile has one copy. The comment at :340-348 says why the code reaches into _parser, _filter and _handleError, and the short-data and bad-filter cases fail if an upgrade changes them. Acceptable.

Blockers

None.

Should fix

None.

Nits (optional, none block the merge)

  • src/crawl.mjs:944 vs :956/:959: the warnings list is capped at 40. With many other warnings, "(see the warnings above)" can point at visual-diff-failed entries that were cut off. One fix is to list unreadable screenshots before the other warnings. Another is to say "in crawl.json" when warnings.length > 40.
  • src/crawl.mjs:806: nothing tests visual-diff-image-failed. A cheap test: pre-create RG_OUT/diffs as a file before the visual-change run, then assert the change is still in visual and the warning appears. This is low value, because the code path is a plain try/catch.

CI on 050182a (run 42360119875)

  • Toolkit self-test: green. 20/20 on the runner's Node, including both new tests.
  • Runtime gate, both e2e jobs: red only because of the toolkit SHA pin. Both crawl steps die with the same stack: TypeError: Class constructor Inflate cannot be invoked without 'new'. The stack runs through …/_actions/TanksterAI/.github/7e22b13255bfa7fadfdec580fc41a359985b0b61/…/pngjs/lib/sync-inflate.js:18, then crawl.mjs:334 (diff) and :760 (main), and the crawl exits 2. That is the pre-PR toolkit, pulled in by uses: …/runtime-gate@7e22b13…. The explore step after it succeeds in both jobs. They fail only on the crawl outcome, and nothing else is wrong in either job. The two "Runtime gate comment" jobs are skipped as a result.
  • actionlint and Renovate presets: green.
  • CodeRabbit: finished on 050182a (check green). It is on the Free plan, so it gave a summary only, with no findings and no approval.

Verdict: MERGE

Both round-1 should-fixes are fixed and tested, and both test-guarded. The probes and the fuzzing find no way left to crash or hang the crawl from a screenshot. After the merge, do the planned follow-up: move all four runtime-gate@7e22b13… refs to the squash commit (three in runtime-gate.yml, one in runtime-gate-flows.yml). Then re-run #26.

🤖 Generated with Claude Code

@rishitank
rishitank merged commit 087cbb6 into main Nov 7, 2026
6 of 8 checks passed
@rishitank
rishitank deleted the fix/runtime-gate-node27-png branch November 7, 2026 16:59
rishitank added a commit that referenced this pull request Nov 7, 2026
…ots on Node 27

The four runtime-gate toolkit refs move from 7e22b13 to 087cbb6 (#27): three in
runtime-gate.yml, one in runtime-gate-flows.yml. At 7e22b13 the crawl dies in
pngjs's PNG.sync.read on Node 27 as soon as a visual baseline exists, which is
why runtime-gate-selftest's e2e jobs are red on main. The action's inputs are
unchanged between the two commits, so nothing else moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TnrFoVjnwYcx5eNVMisBw8
rishitank added a commit that referenced this pull request Nov 7, 2026
Moves the four runtime-gate toolkit pins from 7e22b13 to 087cbb6, the squash merge of #27, so the reusable workflow stops crashing in pngjs's PNG.sync.read on Node 27. runtime-gate-selftest is green end to end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TnrFoVjnwYcx5eNVMisBw8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant