Repository navigation
test(perf): gate mobile scenarios through production app wrappers - #23419
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Repair the historical source link exposed by agent-doc-reference preflight. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use three seeded CI trials per compile and three fresh processes locally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Write host scorecards without a VM-service-only trace call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…checks Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the original budget provenance while the companion device PR appends its route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
marked this pull request as ready for review
October 24, 2026 02:05
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. |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 24, 2026
…capture is off #23419 (production-shell perf gate) carries the same host-harness changes this PR made (semantics off, per-phase split) and more, in the same four integration_test/perf files, so drop them here to avoid a conflict. The device-capture how-to moves to app/docs/performance.md. LagInputScope's callbacks now return at once unless Debug logs capture is on, and turning capture off forgets an in-flight gesture. The global listener is annotated for #23415's global-input-listener ratchet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Oct 24, 2026
#23419's production-shell gate fingerprints all of main.dart and copies its telemetry field and builder chain into a generated shell, so new root wrappers in main.dart (LagInputScope, _LagHomeTabListener) would make the shell stale and could not compile there. Take main.dart back to main. - MobilePerformanceTelemetry builds its own LagRecorder and writes through the emit main.dart already passes; each lag event names itself in an 'event' field (lag_report.py reads both shapes). - Pointers come from GestureBinding's global pointer route: no widget, and it runs before the arena sweep that fires onTap. A drag past touch slop is a scroll, with an 800 ms tail after lift for the fling; one tracked pointer at a time. - The Home tab comes from a one-line hook in HomeProvider.setIndex. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Oct 24, 2026
* perf(harness): on-device lag capture and production-condition host runs The host interaction harness could not see the lag David feels: host flutter test cannot raster, its timings swung 5-10x between runs, and it ran with semantics on, unlike production. Routine render telemetry was removed from PostHog on 2026-10-17, so the device signal stays local. - LagRecorder (lib/utils/analytics/lag_recorder.dart), fed by the existing MobilePerformanceTelemetry frame-timings callback while Settings -> Developer -> Debug logs is on: per surface (routeToPage page type or Home tab) frame counts over 16.7/33.3/100 ms, build- vs raster-bound, slow frames while scrolling / after a tap / idle; worst frames with wall-clock time; tap-to-frame latency including the tap handler's sync work; and UI-isolate stalls from a 250 ms watchdog that runs only while capture is on. Writes mobile_lag_* events to the local debug log; a report on every background and every ~18k frames. - app/tool/lag_report.py turns a shared debug log into a ranked table. - Integration perf scenarios run with semantics off (PERF_SEMANTICS=1 to opt back in) and report a per-phase UI split from FlutterTimeline. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(harness): leave the host harness to #23419; gate lag input when capture is off #23419 (production-shell perf gate) carries the same host-harness changes this PR made (semantics off, per-phase split) and more, in the same four integration_test/perf files, so drop them here to avoid a conflict. The device-capture how-to moves to app/docs/performance.md. LagInputScope's callbacks now return at once unless Debug logs capture is on, and turning capture off forgets an in-flight gesture. The global listener is annotated for #23415's global-input-listener ratchet. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(harness): capture lag input without touching main.dart #23419's production-shell gate fingerprints all of main.dart and copies its telemetry field and builder chain into a generated shell, so new root wrappers in main.dart (LagInputScope, _LagHomeTabListener) would make the shell stale and could not compile there. Take main.dart back to main. - MobilePerformanceTelemetry builds its own LagRecorder and writes through the emit main.dart already passes; each lag event names itself in an 'event' field (lag_report.py reads both shapes). - Pointers come from GestureBinding's global pointer route: no widget, and it runs before the arena sweep that fires onTap. A drag past touch slop is a scroll, with an 800 ms tail after lift for the fling; one tracked pointer at a time. - The Home tab comes from a one-line hook in HomeProvider.setIndex. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
--check embedded a SHA256 of all of main.dart, so any main.dart edit failed mobile-perf-shell-fidelity and app/test.sh until the shell was regenerated. Hash the mirrored content only (copied imports, telemetry field, builder chain): a reintroduced app-wide wrapper such as a held ensureSemantics() holder still turns the gate red, while unrelated main.dart edits stay green. The drift failure still names the regenerate command. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merging origin/main brought #23494's catch-up display floor: a WAL with a never-set device clock no longer stretches the catch-up range, so the device_page fixture (timerStart: 1) now renders the no-range card path and measures 3869 rebuilds / 2405 layouts, deterministically over the old 3449/2050 baseline. Verified locally: reverting only #23494's card restores 3449/2050, and plausible fixture timestamps also restore it, so the delta is exactly that intentional production rendering, not added per-frame work in this branch. Re-baseline only device_page with the same initial-calibration formula (ceil(baseline*1.1)+10): rebuilds 3804->4266, layouts 2265->2656. The ratchet still passes (main carries no _gate caps; these remain initial values), and the other seven scenarios measure identical to their pre-merge baselines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and behavior
The host perf harness omitted production app builders and enabled semantics in both arms, so #23400's lifetime accessibility-tree work could ship. All eight existing Stage 1/2 scenarios now mount a source-checked copy of main.dart's MaterialApp builder chain with the iOS analytics arm enabled and accessibility initially off.
Host admission uses virtual frame time with real fixture I/O drained at explicit boundaries. It gates rebuild/layout/paint counts, retained clip/opacity layers, painted-image decode dimensions, and exactly zero semantics compiles per frame and semantics phase share. Host milliseconds and other phase shares are diagnostics. Initial count caps are measured unchanged-production work +10%+10 events; future caps can only decrease through the existing local/CI manifest.
bash app/tool/perf_gate.shruns three fresh processes under nice, prints variance, rejects incomplete/failed-process evidence, and has a 9m30s deadline. The same scenarios run as three independently seeded trials in test.sh, so existing Mobile App Checks and exact-source mobile release admission block regressions. No workflow changes.Product invariants affected
Failure-Class: none
Validation
dart analyze --fatal-infospassed with no issues; nine Python shell/evidence tests and three budget-ratchet tests passed.Boundaries and companion work
Host tests cannot report actual GPU saveLayer/raster truth: saveLayer is explicitly unavailable, and retained layers are not mislabeled as GPU calls. Full native/Firebase MyApp startup is outside the hermetic seam. A shared production-shell/analytics-lifecycle hook is requested from the lead; the current adapter fingerprints all of main.dart and refuses unknown root shapes.
Static ratchets: #23415. Physical-device route/prototype and its access ask: #23414. The seeded debug-auth suite is not advertised as profile-ready. No physical-device run, paid submission or production API/data access occurred.
A separate real-time iOS stress run exposed a live-transcript geometry read during layout. Its stack and owner request are retained in PROGRESS.md for the lag-fix lane; the virtual-frame gate suppresses no framework exceptions.
UI-Evidence: none -- test infrastructure; no shipped UI change.
🤖 Generated with Claude Code