Record the first instrumented coverage measurement, and classify the 32 it found #255

Merged
JMR-dev merged 1 commits from docs/e8-instrumented-coverage into main 2026-09-06 19:54:10 +00:00
JMR-dev commented 2026-09-06 19:22:45 +00:00 (Migrated from github.com)

This commit missed #251 by eight minutes. It was pushed to that branch at 19:21:39Z; #251 merged at 19:13:56Z, so it sat on a merged branch, unmerged. Same class as the trap CLAUDE.md documents — MERGED is not proof it reached main — reached by a different route.

Adds E8 to docs/e2e-read-findings.md. Documentation only.

The measurement

enableAndroidTestCoverage was unset, so a connected run emitted no .ec at all and jacocoTestReport reads only testDebugUnitTest. Four coverage waves were steered by half the picture. Measured on API 34 by setting the flag temporarily (70/70, 0 failed, 3m21s — the instrumentation destabilised nothing), then reporting against the same class directories and exclusions the committed task uses:

suite line branch
JVM testDebugUnitTest 2236/2374 — 94.2% 1171/1338 — 87.5%
Instrumented, 70 tests 1711/2374 — 72.1% 669/1354 — 49.4%
Union 2342/2374 — 98.7% 1212/1354 — 89.5%

The JVM row reproduced the committed figure exactly. That is the control: both exec sets match the current class files, so the union is trustworthy.

What it establishes

The device suite closes 106 lines the JVM suite misses, and the first four files are precisely the 81 wave 4 wrote off as "native or device edges" — FFmpegEngine 32, Media3Engine 24, ConcatEngine 15, MainActivity 10. The union leaves one. That confirms the read's own hypothesis rather than overturning it: it always called those zeroes a measurement boundary. Nobody had measured past it.

All 32 lines neither suite reaches were read, and none is an e2e test gap. Nine are compiler-generated, ten are getForegroundInfo() for expedited work this app never enqueues (#252), three are F5, three are uncalled members (#253), one is the Vorbis encode arm (#254), four are F4-shaped error guards.

MediaProbe:210-212 gained a measurement rather than an assumption. F7 ruled probeWithExtractor's catch unreachable because Robolectric's MediaExtractor never throws — reasoning that does not transfer to probeWithFFprobe, which calls native ffmpeg-kit the JVM never loads. But probe() calls both on one line, and RemuxTest.probeDistinguishesAudioFromImagesFromRubbish drives it with 4096 bytes of garbage on a device. So that path has had malformed input on real hardware and did not throw.

Caveats recorded with the numbers

Branch denominators differ by 16 (1338 vs 1354), entirely inside MediaProbe — offline vs on-the-fly instrumentation. Line denominators are identical at 2374, so only line figures compare exactly.

And 72.1% is not a grade for the instrumented suite. Seventy end-to-end tests reach broadly and choose arms rarely. The gaps that mattered — #223's vacuous assertions, #238's two covered things nobody combined — are invisible to any percentage, which is why this document exists.

**This commit missed #251 by eight minutes.** It was pushed to that branch at 19:21:39Z; #251 merged at 19:13:56Z, so it sat on a merged branch, unmerged. Same class as the trap CLAUDE.md documents — *`MERGED` is not proof it reached `main`* — reached by a different route. Adds **E8** to `docs/e2e-read-findings.md`. Documentation only. ## The measurement `enableAndroidTestCoverage` was unset, so a connected run emitted no `.ec` at all and `jacocoTestReport` reads only `testDebugUnitTest`. Four coverage waves were steered by half the picture. Measured on API 34 by setting the flag temporarily (70/70, 0 failed, 3m21s — the instrumentation destabilised nothing), then reporting against the **same** class directories and exclusions the committed task uses: | suite | line | branch | |---|---|---| | JVM `testDebugUnitTest` | 2236/2374 — **94.2%** | 1171/1338 — **87.5%** | | Instrumented, 70 tests | 1711/2374 — **72.1%** | 669/1354 — **49.4%** | | **Union** | 2342/2374 — **98.7%** | 1212/1354 — **89.5%** | The JVM row reproduced the committed figure exactly. That is the control: both exec sets match the current class files, so the union is trustworthy. ## What it establishes **The device suite closes 106 lines the JVM suite misses**, and the first four files are precisely the 81 wave 4 wrote off as "native or device edges" — `FFmpegEngine` 32, `Media3Engine` 24, `ConcatEngine` 15, `MainActivity` 10. The union leaves **one**. That *confirms* the read's own hypothesis rather than overturning it: it always called those zeroes a measurement boundary. Nobody had measured past it. **All 32 lines neither suite reaches were read, and none is an e2e test gap.** Nine are compiler-generated, ten are `getForegroundInfo()` for expedited work this app never enqueues (**#252**), three are F5, three are uncalled members (**#253**), one is the Vorbis encode arm (**#254**), four are F4-shaped error guards. **`MediaProbe:210-212` gained a measurement rather than an assumption.** F7 ruled `probeWithExtractor`'s catch unreachable because Robolectric's `MediaExtractor` never throws — reasoning that does not transfer to `probeWithFFprobe`, which calls native ffmpeg-kit the JVM never loads. But `probe()` calls both on one line, and `RemuxTest.probeDistinguishesAudioFromImagesFromRubbish` drives it with 4096 bytes of garbage on a device. So that path *has* had malformed input on real hardware and did not throw. ## Caveats recorded with the numbers Branch denominators differ by 16 (1338 vs 1354), entirely inside `MediaProbe` — offline vs on-the-fly instrumentation. Line denominators are identical at 2374, so only line figures compare exactly. And **72.1% is not a grade for the instrumented suite.** Seventy end-to-end tests reach broadly and choose arms rarely. The gaps that mattered — #223's vacuous assertions, #238's two covered things nobody combined — are invisible to any percentage, which is why this document exists.
Sign in to join this conversation.