Repository navigation
test(flaky): notification_rows_golden_test max-font layout fails order-dependently under VGV merged isolate #6859
Description
Summary
test/goldens/widgets/notification_rows_golden_test.dart, test "notification rows render max-font layout", fails intermittently in CI with a fixed-size RenderFlex overflow, then passes on an unchanged re-run of the exact same commit. This points to state leaking across suites under very_good test --optimization's merged-isolate mode, not a defect in the notification row layout itself. Anyone who hits it on an unrelated PR will burn time proving it isn't their diff.
Environment
CI only (GitHub Actions Tests shards under very_good test --optimization). Not reproducible locally.
Steps to Reproduce
- Push a PR that touches unrelated code (observed on feat(sounds): sync saved sound library across devices #6856, a sound-library-sync change touching no notification code, based on
main@62c8082f2). - Let CI run
Tests (shard 1/4)with--test-randomize-ordering-seed random. - Observe the shard occasionally fail on
notification_rows_golden_test.dart. - Re-run the identical commit with no code change.
Actual Result
Expected: null
Actual: FlutterError:<A RenderFlex overflowed by 104 pixels on the bottom.>
Stack frames point at notification_rows_golden_test.dart:123 and :80.
- Failed in
Tests (shard 1/4), run31222277833, job93009216907. - Re-run of the identical commit, no code change, passed — same run id, job
93010727301. CI uses--test-randomize-ordering-seed random, so the only variable between the two runs was suite ordering. - Passes in isolation:
flutter test test/goldens/widgets/notification_rows_golden_test.dart→ 2/2 pass. - Passes when bundled under merged-isolate mode together with the triggering PR's own new test files.
origin/mainwas green at62c8082f2, the exact commit the PR was based on.- The triggering PR's diff contains no notification files and mutates no view config or text scaling.
Expected Result
The golden test passes or fails consistently regardless of suite ordering, independent of which other test files happen to run earlier in the same merged isolate.
Regression?
Unknown
Evidence
Per .claude/rules/testing.md ("VGV merged isolate & process-global state"), every untagged mobile/test suite bundles into one isolate under very_good test --optimization, and flutter_test auto-restores nothing between tests within that bundle — mock channel handlers, HttpOverrides.global, view config, and platform .instance statics all persist for the whole bundle. A max-font layout golden overflowing by a fixed 104px is the signature of leaked view config (tester.view.physicalSize / devicePixelRatio / setSurfaceSize) or text scaling from a suite that ran earlier under some orderings, per the same doc's "Restore decision table."
This is offered as a hypothesis for the likely mechanism, not a confirmed diagnosis. A reproduction is likely obtainable by running the full shard with the failing run's seed. Related prior art: #4660 (closed) investigated flakiness in this same test file via a different mechanism (Linux font antialiasing drift) and proposed replacing the golden with deterministic widget-layout assertions — that replacement does not appear to have shipped; the file is still golden-based as of this report, and the new evidence here (pass/fail flip on an identical commit re-run) points at cross-suite state leakage rather than antialiasing.
Found during unrelated work on PR #6856 (sound-library creator sync); not fixed there since the root cause is CI test infrastructure, not that PR's diff.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTesting
Activity
NotThatKindOfDrLiz commentedon Sep 5, 2026
Fixed by #7052, which removed the notification-row scenario's dependency on asynchronous font metrics. Follow-on hardening in #7657 moved goldens out of merged test shards, and #8607 now preloads VineTheme font variants before tests run. Closing as fixed.