Skip to content

Compare tall screenshots a row at a time; say when a worker ran out of memory (VISUALCI-PROD-SERVER-6) - #302

Open
ndbroadbent wants to merge 4 commits into
mainfrom
compare-memory
Open

ndbroadbent wants to merge 4 commits into
mainfrom
compare-memory

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Internal: no changelog entry. Users won't see a difference, except that builds with tall full-page screenshots stop killing the worker.

Why

VISUALCI-PROD-SERVER-6: the worker (512Mi, raised to 1Gi as a stopgap) was OOM-killed three times on docspring/visualci build #1408. That build has 578 image snapshots, 12 of them changed, all tall full-page PNGs (1440x7162, about 1440x3800, and 2880-wide -2x copies). Peak memory with the 1Gi limit was 714Mi.

A comparison decoded both images whole, converted each to RGBA with a copy (to_rgba8), built a full-size RGBA overlay plus two full-size Vec<bool> maps (mask and changed pixels), then PNG-encoded the overlay. For a 2880x14000 pair (161 MB per RGBA copy), that is three or four full-size buffers alive at once.

Measured

Harness: crates/visualci-core/examples/compare_memory.rs. It runs the same diff_files path the server runs (decode, diff, overlay PNG encode) on a 2880x14000 RGB screenshot-like pair with a small change. Each compare runs on another of eight long-lived threads, as tokio's blocking pool does. Peak RSS is VmHWM. The release build was run 4 times in browser mode, unless the row says otherwise.

before (main) after
peak RSS, glibc malloc 665 MiB 82 MiB
peak RSS, MALLOC_ARENA_MAX=2 629 MiB 81 MiB
peak RSS, jemalloc (LD_PRELOAD) 623 MiB 113–175 MiB (varies run to run)
RSS left after the compares (glibc / arena 2 / jemalloc) 183 / 147 / 121 MiB 61 / 60 / 93 MiB
peak RSS, exact mode, one compare 561 MiB 81 MiB
peak RSS, 1440x7162 pair (the landing page's size), 8 compares 368 MiB 36 MiB
time per 2880x14000 compare ~1.1 s ~0.9 s

Of the 82 MiB left, 58 MB is the two input PNGs held in memory (this synthetic page compresses badly; real screenshots are smaller). Another 21 MB is the overlay PNG the diff returns. The diff itself now holds a few rows.

Results are unchanged, overlay bytes included: see the replay of real comparisons below.

Replayed real comparisons: identical to main

I replayed real comparisons through main's compare (origin/main, the diffs.rs body: whole decode, diff_masked, write_to(Png)) and through this branch's diff_files. The base and head images came from download_build:

There is no screenshots/landing/*-2x snapshot (landing has 1440 and 390 only), so the 2880x6006 site/screenshots/1440-*-2x pages stand in for a 2x landing shot.

Each page ran in exact and in browser mode (threshold 0.1, anti-aliasing ignored), with the page's masked areas. That is 110 page-and-mode results across 55 pages. All 110 are identical between main and this branch in every field: canvas, size change, changed pixels, anti-aliased pixels, regions, fingerprint, and the overlay PNG's SHA-256. The harness is cargo run --release -p visualci-core --example compare_memory -- replay <unpacked download_build dir>.

53 pages reproduce the overlay production stored (the archive's diff.png, byte for byte). These projects compare in exact mode. The other two pages (ckj_fonts.live and ub-04.live page 1) are unchanged pages, which have no stored overlay, and both versions agree there (0 changed pixels).

The table has one row per page, in the mode production used. "regions" gives the count and the first 8 hex characters of the SHA-256 of the regions' JSON. Long snapshot names are shortened in the middle: the two "signature modal type" rows from #229 are the inline and the modal data request.

build snapshot page canvas size changed mode changed px (old / new) regions (old / new) overlay sha256 (old / new) = production's
visualci #1408 screenshots/changelog/1440-dark 0 1440x4223 yes exact 904246 / 904246 6 (9d9a878b) / 6 (9d9a878b) 2ae58e83079c / 2ae58e83079c yes
visualci #1408 screenshots/changelog/1440-light 0 1440x4223 yes exact 909306 / 909306 6 (9d9a878b) / 6 (9d9a878b) ae6ff347a3fb / ae6ff347a3fb yes
visualci #1408 screenshots/changelog/390-dark 0 390x7748 yes exact 825402 / 825402 5 (18ab197a) / 5 (18ab197a) 35a32541d86c / 35a32541d86c yes
visualci #1408 screenshots/changelog/390-light 0 390x7748 yes exact 830071 / 830071 5 (18ab197a) / 5 (18ab197a) 50f01ec34336 / 50f01ec34336 yes
visualci #1408 screenshots/landing/1440-dark 0 1440x7162 exact 1513 / 1513 1 (d92f4ac8) / 1 (d92f4ac8) d8e8c800ed04 / d8e8c800ed04 yes
visualci #1408 screenshots/landing/1440-light 0 1440x7162 exact 2244 / 2244 1 (d92f4ac8) / 1 (d92f4ac8) 19aaa18426b8 / 19aaa18426b8 yes
visualci #1408 screenshots/landing/390-dark 0 390x8962 exact 1168 / 1168 1 (8ef44b61) / 1 (8ef44b61) a493843668f8 / a493843668f8 yes
visualci #1408 screenshots/landing/390-light 0 390x8962 exact 1378 / 1378 1 (8ef44b61) / 1 (8ef44b61) f365df206210 / f365df206210 yes
visualci #1408 screenshots/site/screenshots/1440-dark 0 1440x3003 exact 9991 / 9991 1 (9e8b4fab) / 1 (9e8b4fab) 0ca92a7b3b38 / 0ca92a7b3b38 yes
visualci #1408 screenshots/site/screenshots/1440-dark-2x 0 2880x6006 exact 24636 / 24636 1 (bbcaf160) / 1 (bbcaf160) 81cd60862a5f / 81cd60862a5f yes
visualci #1408 screenshots/site/screenshots/1440-light 0 1440x3003 exact 11371 / 11371 1 (9e8b4fab) / 1 (9e8b4fab) d0318a380548 / d0318a380548 yes
visualci #1408 screenshots/site/screenshots/1440-light-2x 0 2880x6006 exact 26142 / 26142 1 (bbcaf160) / 1 (bbcaf160) 87af430f96dc / 87af430f96dc yes
visualci #1430 screenshots/changelog/1440-dark 0 1440x4322 yes exact 970349 / 970349 4 (ae98569c) / 4 (ae98569c) 38e759b35675 / 38e759b35675 yes
visualci #1430 screenshots/changelog/1440-light 0 1440x4322 yes exact 975623 / 975623 4 (ae98569c) / 4 (ae98569c) 068cfbe754f9 / 068cfbe754f9 yes
visualci #1430 screenshots/changelog/390-dark 0 390x7942 yes exact 887766 / 887766 5 (54dff551) / 5 (54dff551) 3b5db84d9ab7 / 3b5db84d9ab7 yes
visualci #1430 screenshots/changelog/390-light 0 390x7942 yes exact 892780 / 892780 5 (54dff551) / 5 (54dff551) 466e1ee3cdcd / 466e1ee3cdcd yes
visualci #1430 screenshots/docs/index/1440-dark 0 1440x2284 yes exact 71912 / 71912 5 (f009118c) / 5 (f009118c) 535d89a160ab / 535d89a160ab yes
visualci #1430 screenshots/docs/index/1440-light 0 1440x2284 yes exact 72195 / 72195 5 (f009118c) / 5 (f009118c) 13e2c2e4a802 / 13e2c2e4a802 yes
visualci #1430 screenshots/docs/page/1440-dark 0 1440x2726 exact 7034 / 7034 2 (b7205aa0) / 2 (b7205aa0) 98dac5fc1b33 / 98dac5fc1b33 yes
visualci #1430 screenshots/docs/page/1440-light 0 1440x2726 exact 7101 / 7101 2 (b7205aa0) / 2 (b7205aa0) 20b524827112 / 20b524827112 yes
docspring #229 (browser) Embedded Data Request signatur…_chrome_billy - signature modal type 0 1280x1052 exact 3 / 3 2 (5547f5ed) / 2 (5547f5ed) 8d453a02bcd3 / 8d453a02bcd3 yes
docspring #229 (browser) Embedded Data Request signatur…_chrome_billy - signature modal type 0 1280x1052 exact 3 / 3 2 (2239d010) / 2 (2239d010) 1ca606a7e788 / 1ca606a7e788 yes
docspring #229 (browser) Embedded Visual Forms - Fillin…generated PDF - embedded visual form 0 1280x1052 exact 18324 / 18324 1 (b53b66ee) / 1 (b53b66ee) a38bd1bb7fa4 / a38bd1bb7fa4 yes
docspring #229 (browser) Embedded Visual Forms - Fillin…- embedded visual form calendar open 0 1280x1052 exact 18324 / 18324 1 (b53b66ee) / 1 (b53b66ee) 82250ceb86ab / 82250ceb86ab yes
docspring #229 (browser) Embedded Visual Forms - Fillin…bedded visual form dropdown selected 0 1280x1052 exact 18324 / 18324 1 (b53b66ee) / 1 (b53b66ee) f49c63f1cb8c / f49c63f1cb8c yes
docspring #230 (PDF) all_features_adds_watermark.test 0 1190x1540 exact 4474 / 4474 3 (923901ab) / 3 (923901ab) 7bb86c2d5ba1 / 7bb86c2d5ba1 yes
docspring #230 (PDF) all_features_disables_watermark.live 0 1190x1540 exact 4474 / 4474 3 (923901ab) / 3 (923901ab) 1bbce02a8395 / 1bbce02a8395 yes
docspring #230 (PDF) all_features_reprocesses_images.live 0 1190x1540 exact 4474 / 4474 3 (923901ab) / 3 (923901ab) 1bbce02a8395 / 1bbce02a8395 yes
docspring #230 (PDF) annotation_crash_non_dict_object_mdJx5t.live 0 1157x1637 exact 7296 / 7296 3 (3568d3c0) / 3 (3568d3c0) 449b00985c75 / 449b00985c75 yes
docspring #230 (PDF) ckj_fonts.live 0 1157x1636 exact 4811 / 4811 3 (a92d2be9) / 3 (a92d2be9) f554318866e8 / f554318866e8 yes
docspring #230 (PDF) ckj_fonts.live 1 1157x1636 exact 0 / 0 0 (4f53cda1) / 0 (4f53cda1) none (identi / none (identi no stored overlay (unchanged page)
docspring #230 (PDF) content_template_engine_parity.live 0 1190x1540 exact 9818 / 9818 9 (4b11a48c) / 9 (4b11a48c) 928a30d02b1b / 928a30d02b1b yes
docspring #230 (PDF) cr80_html_template.live 0 472x297 exact 6899 / 6899 1 (c3f9d79a) / 1 (c3f9d79a) aa516e537e5b / aa516e537e5b yes
docspring #230 (PDF) custom_page_size_html_template.live 0 552x441 exact 13224 / 13224 1 (bbb50f1a) / 1 (bbb50f1a) 083fa66bf9b7 / 083fa66bf9b7 yes
docspring #230 (PDF) foundingbird_first_board_resolution.live 0 1158x1638 exact 28493 / 28493 7 (04768c14) / 7 (04768c14) 669c24da9799 / 669c24da9799 yes
docspring #230 (PDF) foundingbird_first_board_resolution.live 1 1158x1638 exact 3793 / 3793 3 (4a72eed1) / 3 (4a72eed1) 627081d1071a / 627081d1071a yes
docspring #230 (PDF) generic_html_table.live 0 1190x1540 exact 24284 / 24284 38 (a5235af9) / 38 (a5235af9) 4d8aa1a9c7c7 / 4d8aa1a9c7c7 yes
docspring #230 (PDF) hebrew_cyrillic_bidi.live 0 1190x1540 exact 48675 / 48675 11 (52f36df9) / 11 (52f36df9) e0005fd9f42b / e0005fd9f42b yes
docspring #230 (PDF) html_chrome_header_footer_template.live 0 1190x1540 exact 10451 / 10451 4 (e39adc81) / 4 (e39adc81) 459213655237 / 459213655237 yes
docspring #230 (PDF) html_chrome_header_footer_template.live 1 1190x1540 exact 9924 / 9924 3 (1bfc4b80) / 3 (1bfc4b80) 74d4f7edf751 / 74d4f7edf751 yes
docspring #230 (PDF) html_template_adds_content.live 0 1190x1540 exact 18405 / 18405 17 (1df1b505) / 17 (1df1b505) 0f57338e84ed / 0f57338e84ed yes
docspring #230 (PDF) html_template_adds_content.live 1 1190x1540 exact 8998 / 8998 6 (3f364a8a) / 6 (3f364a8a) d2233797a268 / d2233797a268 yes
docspring #230 (PDF) html_template_adds_content.live 2 1190x1540 exact 8702 / 8702 4 (ee12281e) / 4 (ee12281e) 7a5a5c142570 / 7a5a5c142570 yes
docspring #230 (PDF) html_template_adds_watermark.test 0 1190x1540 exact 18405 / 18405 17 (1df1b505) / 17 (1df1b505) ae6cbecb5104 / ae6cbecb5104 yes
docspring #230 (PDF) html_template_adds_watermark.test 1 1190x1540 exact 8997 / 8997 6 (3f364a8a) / 6 (3f364a8a) 0c952177d88d / 0c952177d88d yes
docspring #230 (PDF) html_template_adds_watermark.test 2 1190x1540 exact 8702 / 8702 4 (ee12281e) / 4 (ee12281e) c8ae6905b528 / c8ae6905b528 yes
docspring #230 (PDF) html_template_does_not_add_watermark.live 0 1190x1540 exact 18405 / 18405 17 (1df1b505) / 17 (1df1b505) 0f57338e84ed / 0f57338e84ed yes
docspring #230 (PDF) html_template_does_not_add_watermark.live 1 1190x1540 exact 8998 / 8998 6 (3f364a8a) / 6 (3f364a8a) d2233797a268 / d2233797a268 yes
docspring #230 (PDF) html_template_does_not_add_watermark.live 2 1190x1540 exact 8702 / 8702 4 (ee12281e) / 4 (ee12281e) 7a5a5c142570 / 7a5a5c142570 yes
docspring #230 (PDF) language_tests.live 0 1190x1540 exact 106789 / 106789 12 (bad2b3ff) / 12 (bad2b3ff) 0a95978b4f01 / 0a95978b4f01 yes
docspring #230 (PDF) mediabox_with_negative_x_origin.live 0 1157x1636 exact 192 / 192 1 (1c6527ca) / 1 (1c6527ca) 9418c1a1ab3c / 9418c1a1ab3c yes
docspring #230 (PDF) pangea_direct_deposit.live 0 1094x2006 exact 91204 / 91204 25 (fbd065be) / 25 (fbd065be) 082ae6f65719 / 082ae6f65719 yes
docspring #230 (PDF) sp167_virginia_criminal_history_record_submission.live 0 1190x1540 exact 7685 / 7685 13 (ff7f9fbb) / 13 (ff7f9fbb) 42735741f5f8 / 42735741f5f8 yes
docspring #230 (PDF) ub-04.live 0 1190x1540 exact 633 / 633 1 (ac5c6500) / 1 (ac5c6500) 9682ffab5a5d / 9682ffab5a5d yes
docspring #230 (PDF) ub-04.live 1 1190x1540 exact 0 / 0 0 (4f53cda1) / 0 (4f53cda1) none (identi / none (identi no stored overlay (unchanged page)

Peak memory on the real 1440x7162 landing shot

screenshots/landing/1440-light, #1408. VmHWM from the harness, browser mode:

main this branch
1 compare 153 MiB 7 MiB
8 compares on 8 threads (the blocking pool), glibc 421 MiB 14 MiB
8 compares on 8 threads, MALLOC_ARENA_MAX=2 183 MiB 9 MiB
the 2880x6006 site/screenshots/1440-light-2x, 1 compare 205 MiB 7 MiB

What changed

  • visualci_core::image_hash::Rows reads an image file as RGBA rows. An 8-bit, non-interlaced PNG (any browser screenshot) is decoded one row at a time with the png crate. Palettes, low bit depths and tRNS chunks are expanded, as the image crate's decoder does. Anything else (JPEG, WebP, 16-bit or interlaced PNG, files past decode's limits) is decoded whole by decode as before. A file the streaming decoder gives up on part-way, including one cut short after its last row, is decoded whole again, so it gets the image crate's own pixels or error.
  • visualci_core::diff::diff_files is the server's comparison: decode, diff, overlay PNG. It keeps a five-row window of each image, because the anti-aliasing test looks two rows away. It computes the mask a row at a time and keeps only the 16 px changed-tile map (instead of two full-size bool maps). Each overlay row goes straight to the PNG encoder (overlay_png). diff_masked (in memory, used by the wasm build) shares the same row-by-row core. domain::diffs::find_or_compute now calls diff_files.
  • visualci_core::overlay_png writes the overlay a row at a time, byte for byte as the image crate's PngEncoder wrote it whole: the png crate's adaptive filter (Up, Sub, Avg, Paeth by the lowest signed-byte sum), fdeflate's fast compressor fed one filtered row per call, the stored fallback when compression doesn't pay, one IDAT chunk. The png crate's own StreamWriter gave the same pixels with different bytes, so every diff blob's SHA-256 would have changed. The compressed data goes into the same buffer as the file, so the finished PNG is never copied.
  • Fingerprints (blobs::decode_image, image_hash::fingerprint_bytes) hash rows as they're read: the same hash as fingerprint_rgba. The 8 concurrent fingerprints (VISUALCI_FINGERPRINT_CONCURRENCY) now cost a few rows each instead of a full image each.
  • Matching approved changes (domain::matching, runs at the end of processing) cached every decoded full-size image of every candidate, cloned one per comparison, and decoded on the runtime's threads. It now keeps the compressed files for one snapshot at a time and compares regions a row at a time on the blocking pool.
  • PR comment images decoded up to four full-size images (overlay, head twice, base). Only the overlay is decoded whole now. The close-ups crop base and head row by row, and the "content moved" step reads the head's rows.
  • Concurrency: image_hash::WHOLE_DECODES lets one whole-image decode run at a time in the process. It covers the fallback formats in compare, fingerprinting and matching, and the PR comment's overlay. Streamed PNGs don't take it.

Runs killed by OOM now say so

When a worker ran out of memory, the job used to fail with "builds.process has been attempted more than its 3 tries allow". The build stayed in processing.

  • Each run marks the build (builds.process-running:<id> in the cache) while it holds the build's processing lock and clears the mark when it ends. The run can end by finishing, waiting for renders, stopping for a deploy, or failing the build. A run that takes the lock and finds a mark knows the previous run died, because a live run would still hold the lock. It logs a warning and counts the death (builds.process-died:<id>).
  • Once processing::RUNS (3) runs have died, the next run fails the build with "the worker ran out of memory (or was killed) processing build #N, 3 times". This applies however the run was queued: retry, sweep, or a render finishing.
  • The marks are best-effort bookkeeping: a cache error noting or clearing one is logged as a warning and the run carries on, so it never decides the build's outcome.
  • A run cut off rather than killed doesn't count. The job's 15-minute timeout and a caught panic drop the run's future, and the mark's guard (RunMark) clears the mark when it's dropped. Only a worker that dies outright (out of memory, SIGKILL) runs no drop and leaves the mark.
  • ProcessBuild has tries = 4. The fourth try doesn't process. When runs died, processing::give_up fails the build, and the job itself, with that same error. When the tries ran out without a death (errors before a run took the build, such as the database being down), the job fails but the build is left in processing for the sweep, as on main. The fourth try waits up to JOB_WAIT_SECONDS for the build, as a run does, so a dead run's hold that hasn't lapsed yet doesn't make it skip the build. It leaves the build alone when it is no longer processing, or when another run holds it.

Allocator

These are VmHWM numbers from the same harness, for synthetic pages unless a row says otherwise. Each compare runs on another of eight threads, as tokio's blocking pool does.

before after
2880x14000, 4 compares: glibc / MALLOC_ARENA_MAX=2 / jemalloc 665 / 629 / 623 MiB 82 / 81 / 113–175 MiB
1440x7162, 8 compares: glibc / MALLOC_ARENA_MAX=2 / jemalloc 368 / 190 / 300 MiB 36 / 24 / 103 MiB
the real #1408 landing shot (1440x7162), 8 compares: glibc / MALLOC_ARENA_MAX=2 421 / 183 MiB 14 / 9 MiB
1440x7162, 1 compare: glibc / MALLOC_ARENA_MAX=2 / jemalloc 159 / 159 / 190 MiB not measured
1440x7162, 4 compares, glibc 249 MiB 25 MiB

Before the fix, glibc's per-thread arenas made it worse for 1440-wide pages. Their 10 MB bool maps sit under the mmap threshold, so each thread's arena kept its own, and eight compares nearly doubled the peak (368 MiB, against 190 MiB with two arenas). The 2880-wide pages' 160 MB buffers are mmapped, so arenas barely mattered there.

After the fix, the buffers are small, and the arena effect is about 16 MiB. jemalloc is worse in every row, so this PR doesn't switch allocators. MALLOC_ARENA_MAX=2 in the worker's deploy env (talira-ai/infra) is a cheap extra but not needed. It isn't set by this PR.

Tests

  • overlay_png::tests checks the overlay's bytes against the image crate's encoder: flat, gradient, odd sizes, 1x1, and noise, which takes the stored fallback.
  • diff::tests::the_row_by_row_diff_matches_the_whole_image_diff_exactly keeps main's diff as a test oracle (tests::reference). It checks results and overlay bytes for diff_masked and diff_files on RGB and RGBA PNGs: 5 size pairs (including size changes and 1-pixel-wide images), 4 option sets and 3 masks. The cases include anti-aliased, masked and changed pixels.
  • image_hash tests check that Rows gives decode().to_rgba8()'s pixels and the same fingerprint for each PNG kind: gray, gray+alpha, RGB, RGBA, RGB+tRNS, 1-bit gray, palette+tRNS, plus 16-bit and JPEG through the fallback. A truncated PNG or an oversized one gets the decoder's own error.
  • crates/visualci-core/tests/peak_memory.rs measures a 1440x20000 change with a counting global allocator, in its own test binary. Its peak is 1.9 MiB. The test fails above 8 MiB plus twice the overlay PNG's size. One RGBA copy of that page is 110 MiB, so the test fails at once if a full-size buffer comes back. The margin leaves room for allocator and library changes. The overlay term is there because the returned PNG grows by doubling.
  • tests/processing_lock.rs covers the OOM handling: counting runs that died, the build failing after three, runs cut off by a timeout or a panic not counting, the job's last try failing build and job with the same error when runs died and leaving the build for the sweep when none did, giving up waiting out a dead run's hold, a cache that refuses the marks still letting the build conclude, a finished run clearing the count, and giving up leaving a build another run holds. The diff tests include an interlaced PNG (decoded whole) comparing exactly as its plain twin.
  • cargo test --test app (462), cargo test --lib for app, cargo test --workspace --exclude visualci-app, cargo clippy --all-targets -- -D warnings, cargo fmt --check, and cargo check -p visualci-wasm --target wasm32-unknown-unknown.

visualci-core changed, so the workspace version is bumped to 0.2.30 (Cargo.toml, Cargo.lock, the action and orb defaults).

Not changed

  • Gallery thumbnails still decode whole, one at a time (gallery_thumbs::DECODES).
  • MCP get_snapshot images (mcp/images.rs) still decode whole.
  • Images that can't be streamed still take their full size, one at a time.

Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ut of memory (VISUALCI-PROD-SERVER-6)

A 2880x14000 comparison held three or four full-size RGBA buffers at once and peaked at 665 MiB. It now reads 8-bit PNGs
a row at a time (image_hash::Rows), keeps a five-row window of each image, and streams the overlay into the PNG encoder:
84 MiB, most of it the input files, with identical results and overlay pixels. Fingerprints, matching approved changes
and PR comment images read rows too, and whole-image decodes (other formats) go one at a time (WHOLE_DECODES).

A run that finds the previous run's mark on its build counts it as died. After three, the build fails with "the worker
ran out of memory (or was killed) processing build #N", and ProcessBuild's fourth try fails the build and the job with
it rather than "attempted more than its 3 tries allow".

visualci-core changed: the workspace version is 0.2.30.
@visualci-com

visualci-com Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #1437 · 578 unchanged · no changes

This PR vs base: 6 changed since #1418, across 1 build

docspring/visualci · journeys · build #1433 · 3 removed, 53 unchanged · waiting for review

This PR vs base: 3 removed since #1406, across 1 build · 3 not approved yet

Removed: journeys/organization-settings/02-admin, journeys/organization-settings/03-admin-invited, journeys/organization-settings/04-admin-dark

Updated as builds change. Agents can review with VisualCI's MCP tools.

…ons against main

The png crate's StreamWriter gave the same overlay pixels with different bytes (it hands each row to fdeflate in two
pieces), so every diff blob's hash would have changed. visualci_core::overlay_png writes the overlay a row at a time
exactly as the image crate's PngEncoder wrote it whole: the png crate's adaptive filter, one fdeflate call per filtered
row, the stored fallback, one IDAT chunk, into one buffer that's never copied.

The compare_memory example gains `replay <download_build dir>`: 110 real page comparisons (visualci #1408 and #1430,
docspring #229 and #230) give identical results and overlay bytes on main and on this branch.
Review fixes for the OOM detection:

- A run's mark is a guard (RunMark): the job's timeout or a caught panic drops
  the run's future, and the drop clears the mark, so only a worker that dies
  (out of memory, SIGKILL) leaves it to be counted.
- Tries that run out without a death leave the build processing for the sweep,
  as on main; the job still fails. Only deaths fail the build.
- give_up waits JOB_WAIT_SECONDS for the build, as run does, so a dead run's
  hold that hasn't lapsed doesn't make it give up silently.
- image_hash::info and matching::same_in_files take WHOLE_DECODES before
  opening a file that won't stream, as the doc says; lock_whole_decodes helper.
- Tests: timed-out and panicked runs aren't deaths, the job's try past its
  tries with and without deaths, give_up waiting out a dead hold, and an
  interlaced PNG comparing as its plain twin.
A cache error noting a run's start or clearing its mark is logged and the run
carries on: the marks are bookkeeping, and a cache error in RunMark::end could
replace a finished run's Ok(true), so run() marked a finished build failed.
Test: a cache that refuses the build's mark (a trigger on the cache table)
still lets an empty build conclude.

This branch has not been deployed

No deployments
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