Skip to content

test(android-e2e): record rotation state and logcat rotation decisions on a failed step - #2350

Open
thymikee wants to merge 2 commits into
mainfrom
claude/android-e2e-rotation-evidence
Open

test(android-e2e): record rotation state and logcat rotation decisions on a failed step#2350
thymikee wants to merge 2 commits into
mainfrom
claude/android-e2e-rotation-evidence

Conversation

@thymikee

@thymikee thymikee commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

Diagnostics for the Android Smoke failures on the post-alert canary (get text id="automation-alert-result" since 2026-09-03, wait for Alert result: cancelled on #2344).

The failed-step screenshot and snapshot from https://github.com/callstack/agent-device/actions/runs/34021894996 show the device in landscape at the timeout: Open automation alert is 2220px wide and the alert-result canary sits below the fold, so 16 readable polls never contained it. Every tap before the alert landed at x=540, so the device was portrait through open alert; orientation portrait had been confirmed by the fixture 12s earlier. The same layout explains the earlier Selector did not match failures on that step. Nothing in the artifacts says what rotated it: the emulator's Vulkan surface events happen ~95s after boot in passing runs too, and the guest settings alone never flip a local emulator.

Change

A failed step now also writes failed-step-N-device.txt next to the screenshot and snapshot, through adb rather than agent-device so it stands even when the CLI path is what failed:

  • settings get system accelerometer_rotation and user_rotation (the two values orientation writes)
  • the rotation lines of dumpsys display
  • WindowManager's rotation decisions from logcat -d, with the reason Android logs for each

The shared harness gains an optional deviceEvidence hook; iOS does not implement it yet.

Validation

Probe commands verified against a local emulator (settings, display rotation lines, logcat rotation decisions all return output). Root typecheck, oxlint, oxfmt clean. The evidence itself only appears on a failed CI step, which the Android lane has been producing on roughly half its runs.

…s on a failed step

The Android smoke has failed on the post-alert canary since 2026-09-03,
and the failed-step screenshot from run 34021894996 shows why the reads
miss: the device is in landscape at that point, with the canary below
the fold, although `orientation portrait` had taken effect (the fixture
confirmed it and every tap before the alert landed at x=540). Nothing we
keep says what rotated it. A failed step now also writes
failed-step-N-device.txt with the two rotation settings, the display's
rotation lines, and WindowManager's rotation decisions from logcat, read
through adb so they stand even when the CLI path failed.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.49 MB 4.49 MB 0 B
Package (unpacked) 4.49 MB 4.49 MB 0 B
Package (download) 1.33 MB 1.33 MB +1 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.5 ms 27.9 ms -1.6 ms
CLI --help 81.9 ms 82.7 ms +0.8 ms

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