Skip to content

perf: expect the persistent session on Android snapshot-raw - #3913

Merged
thymikee merged 1 commit into
mainfrom
perf/android-transport-followups
Oct 22, 2026
Merged

thymikee merged 1 commit into
mainfrom
perf/android-transport-followups

Conversation

@thymikee

@thymikee thymikee commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Applies the two non-blocking notes left on #3902 (4 files, no capture behavior change):

  • heavy-feed/snapshot-raw on Android now expects the persistent-session transport. A night where the helper session stays off fails that step as expectation_failed instead of mixing one-shot timings into the baseline. The step keeps its depth expectation. The README states the contract.
  • captureAndroidUiHierarchyFromHelper no longer assigns sessionCapture twice. The timer callback assignment stays, because the data thunk reads it when the timer settles. The recorded transport and answered fields are unchanged.

Follow-up to #3902.

Validation

Tested at the head SHA.

  • vitest run scripts/perf: 46/46 passed. The new suite test fails when the suite.ts change is reverted.
  • vitest run packages/platform-android/src/__tests__/snapshot: 22 files, 190 tests passed, including snapshot-helper-capture-timers.test.ts.
  • pnpm typecheck, pnpm format: clean.
  • pnpm check:affected --run --head <head>: passed, exactCommit: true. The first run hit an unrelated ENOTEMPTY temp-dir cleanup race in daemon-client-abort.test.ts. That file passes alone, and the re-run passed.
  • No device run, because capture behavior is unchanged. CI owns the device lanes.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Fail the heavy-feed snapshot-raw step with expectation_failed when the
persistent helper session did not answer, so one-shot timings stay out of
the session baseline. Drop the redundant second sessionCapture assignment
in the helper capture flow. Follow-up to #3902.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.56 MB 5.56 MB -2 B
Package (unpacked) 5.56 MB 5.56 MB -2 B
Package (download) 1.68 MB 1.68 MB -12 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 41.4 ms 39.4 ms -1.9 ms
CLI --help 80.4 ms 79.9 ms -0.5 ms

@thymikee

Copy link
Copy Markdown
Member Author

This is ready at a9564b0. I found no problems in the code, all 16 checks are green, and there are no conflicts. Not blocking, take or leave: expect.transport in scripts/perf/suite.ts is typed as string, so the 'persistent-session' literal (and the existing 'instrumentation' one near line 401) would not fail the typecheck if the transport is renamed in platform-android; typing SuiteExpect.transport as AndroidSnapshotHelperTransport would cover both. I did not run the perf suite on a live Android device or run the tests locally. The change only updates a perf-harness expectation and refactors without changing behavior, and the unit test covers the expectation.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 22, 2026
@thymikee
thymikee merged commit cca460f into main Oct 22, 2026
16 of 18 checks passed
@thymikee
thymikee deleted the perf/android-transport-followups branch October 22, 2026 18:22
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-22 18:22 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant