Files
LibreMediaConverter/.github
JMR-devandClaude Opus 5 39e0900928 Adapt LibreMail's emulator instrumentation for the E2E matrix
The E2E legs could fail with almost nothing to show for it. The previous handler
was a single line of semicolons printing meminfo and 60 lines of crash logcat,
and it only ran when gradle RETURNED non-zero -- a hang left nothing at all, and
`adb logcat -d` at the end only holds whatever survived in the ring buffer, which
a chatty run evicts.

The two failure shapes want different evidence, so they are handled separately:

  FAILED  -- gradle returned non-zero. The test reports already say which test and
             why, so this captures the surrounding state: guest memory and
             storage, whether the app even installed, native crashes, and the
             runner's own kvm/memory/disk.

  WEDGED  -- gradle never returned and the wrapper timeout killed it. There are no
             reports, so the evidence has to come off the live device: which test
             was in flight per the TestRunner logcat, whether the binder services
             are published, and SIGQUIT thread dumps of both processes. That last
             one is the point -- ART writes full stacks to logcat and /data/anr,
             which is what separates a deadlocked test from a stuck MediaCodec
             from a device that stopped answering. dumpsys media.player is in
             there because both engines transcode through MediaCodec, so a hung
             conversion shows up in it.

Logcat is now streamed to a file from the start of the step and uploaded whichever
way the leg goes, since the leg worth reading is usually the one that went red once
and green on re-run -- by which time the emulator is gone.

It is a script rather than inline YAML because it has to be. The action splits its
`script` input on newlines and runs each line as its own `sh -c`, so functions and
`if` blocks cannot survive there; that constraint is what produced the one-line
handler in the first place. One line calls the script now.

The wrapper timeout is 1200s against measured ~5-minute healthy legs, so it cannot
trip on a slow-but-working run, and sits far enough under the 60-minute cap to
leave room for the capture. It wraps only the foreground gradle client, never the
emulator the action owns, so it cannot hang the leg itself.

Not adopted from LibreMail: the hand-provisioned AVD boot, its SDK-integrity
installer and its focus gate. Those answer failures this repo has not had, and
replacing a boot path that works to fix problems we do not have is how a working
matrix breaks. Every emulator setting here -- ram-size, disk-size, the ABI filter,
swiftshader -- is untouched, along with the reasoning already written next to it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 15:20:23 -05:00
..