ci(e2e): boot diagnostics + verbose/debug logging on the API 37 preview job #335

Merged
JMR-dev merged 1 commits from ci-334-api37-boot-diagnostics into main 2026-07-05 02:15:24 +00:00
JMR-dev commented 2026-07-05 02:09:48 +00:00 (Migrated from github.com)

Closes #334

Adds rich, on-by-default boot diagnostics to the API 37 preview E2E so its frequent boot flakes (#285, #333) become diagnosable without a re-run. Kept in parity across CI (.github/workflows/ci.yml e2e-preview job) and the local hand-provisioning script (.claude/skills/preflight/api37_e2e.py).

What changed

  • Emulator now launches with -verbose -debug init,avd_config,kernel by default (still redirected to $EMU_LOG). Diagnostics only — no boot-affecting flag (-gpu, snapshot, accel) is changed.
  • adb logcat -v time is streamed to a file from the moment the device registers (adb wait-for-device logcat, backgrounded).
  • On a boot timeout, a dump is collected: adb devices, emulator -accel-check, /dev/kvm presence, GPU mode, free mem/disk, AVD config.ini, and the emulator.log tail. CI writes it to boot-diagnostics.txt; the local script prints it.
  • CI uploads emulator.log + logcat.txt + boot-diagnostics.txt as an artifact with if: always() (survives timeout/cancel), and prints a concise summary (accel/KVM status + last 50 lines of emulator.log) to the step log.

The existing 2-attempt boot retry and boot-completed wait loop are unchanged; all diagnostics are additive.

Validation (no emulator/Gradle, per the ticket): ci.yml parses clean via yaml.safe_load; api37_e2e.py passes py_compile and --help renders. The diagnostics prove out on the next real API 37 run.

🤖 Generated with Claude Code

Closes #334 Adds rich, on-by-default boot diagnostics to the API 37 preview E2E so its frequent boot flakes (#285, #333) become diagnosable without a re-run. Kept in parity across CI (`.github/workflows/ci.yml` `e2e-preview` job) and the local hand-provisioning script (`.claude/skills/preflight/api37_e2e.py`). **What changed** - Emulator now launches with `-verbose -debug init,avd_config,kernel` by default (still redirected to `$EMU_LOG`). Diagnostics only — no boot-affecting flag (`-gpu`, snapshot, accel) is changed. - `adb logcat -v time` is streamed to a file from the moment the device registers (`adb wait-for-device logcat`, backgrounded). - On a boot timeout, a dump is collected: `adb devices`, `emulator -accel-check`, `/dev/kvm` presence, GPU mode, free mem/disk, AVD `config.ini`, and the `emulator.log` tail. CI writes it to `boot-diagnostics.txt`; the local script prints it. - CI uploads `emulator.log` + `logcat.txt` + `boot-diagnostics.txt` as an artifact with `if: always()` (survives timeout/cancel), and prints a concise summary (accel/KVM status + last 50 lines of `emulator.log`) to the step log. The existing 2-attempt boot retry and boot-completed wait loop are unchanged; all diagnostics are additive. **Validation** (no emulator/Gradle, per the ticket): `ci.yml` parses clean via `yaml.safe_load`; `api37_e2e.py` passes `py_compile` and `--help` renders. The diagnostics prove out on the next real API 37 run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.