The scene band cache key (lib/rendering/canvas_painter.dart:1230) is built from fingerprints, and several painters pass none: png.dart, svg.dart, pdf.dart, lib/agent/view_capture.dart, and the line preview swatches in lib/widgets/lines_panel_v2.dart, lib/widgets/draw_panel.dart and the professional properties panel. They all land on the same key, so the second one can reuse the first's bands, whose indices point into a different list. The punchout cache in lines_v2.dart:486 has the same shape.
Scenario: two such painters paint back to back with no live canvas paint in between, for example a preview swatch then an export, or two agent captures in one frame.
Evidence:test/review_probes/render_static_cache_alias_probe.dart (local, untracked), three cases: a different set of ops is drawn, one of three boxes is drawn in the wrong order, and a stale plan against a shorter list gives an empty draw list (a blank export). Whether the app actually reaches this sequence is unverified, since any live repaint replaces the slot. test/composite_order_test.dart already clears the cache in setUp for this reason.
Fix sketch: when skipTileCache is set, build bands locally and never read or write the statics; same for the punchout cache. Also guard _paintCore against an empty metroLines (canvas_painter.dart:2030 throws Bad state: No element).
From the engineering review on 2026-10-13.
The scene band cache key (`lib/rendering/canvas_painter.dart:1230`) is built from fingerprints, and several painters pass none: `png.dart`, `svg.dart`, `pdf.dart`, `lib/agent/view_capture.dart`, and the line preview swatches in `lib/widgets/lines_panel_v2.dart`, `lib/widgets/draw_panel.dart` and the professional properties panel. They all land on the same key, so the second one can reuse the first's bands, whose indices point into a different list. The punchout cache in `lines_v2.dart:486` has the same shape.
**Scenario:** two such painters paint back to back with no live canvas paint in between, for example a preview swatch then an export, or two agent captures in one frame.
**Evidence:** `test/review_probes/render_static_cache_alias_probe.dart` (local, untracked), three cases: a different set of ops is drawn, one of three boxes is drawn in the wrong order, and a stale plan against a shorter list gives an empty draw list (a blank export). Whether the app actually reaches this sequence is unverified, since any live repaint replaces the slot. `test/composite_order_test.dart` already clears the cache in `setUp` for this reason.
**Fix sketch:** when `skipTileCache` is set, build bands locally and never read or write the statics; same for the punchout cache. Also guard `_paintCore` against an empty `metroLines` (`canvas_painter.dart:2030` throws `Bad state: No element`).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From the engineering review on 2026-10-13.
The scene band cache key (
lib/rendering/canvas_painter.dart:1230) is built from fingerprints, and several painters pass none:png.dart,svg.dart,pdf.dart,lib/agent/view_capture.dart, and the line preview swatches inlib/widgets/lines_panel_v2.dart,lib/widgets/draw_panel.dartand the professional properties panel. They all land on the same key, so the second one can reuse the first's bands, whose indices point into a different list. The punchout cache inlines_v2.dart:486has the same shape.Scenario: two such painters paint back to back with no live canvas paint in between, for example a preview swatch then an export, or two agent captures in one frame.
Evidence:
test/review_probes/render_static_cache_alias_probe.dart(local, untracked), three cases: a different set of ops is drawn, one of three boxes is drawn in the wrong order, and a stale plan against a shorter list gives an empty draw list (a blank export). Whether the app actually reaches this sequence is unverified, since any live repaint replaces the slot.test/composite_order_test.dartalready clears the cache insetUpfor this reason.Fix sketch: when
skipTileCacheis set, build bands locally and never read or write the statics; same for the punchout cache. Also guard_paintCoreagainst an emptymetroLines(canvas_painter.dart:2030throwsBad state: No element).