docs(android): M12 phase 8 as landed, and the two defects AC-5 found
Phase 8 was scoped as docs, coverage and the cutover. The AC-5 walk turned it into a phase with code in it, which is the outcome the walk existed to produce - so the record is longer than a phase-8 note would normally be. THEMING_AND_NAV.md gains "Phase 8 as landed": what the walk confirmed, the two defects it found and why they are phase 2's trap repeating, the role sweep that says which Material roles are still unmapped and which of them have a reader, the coverage-glob narrowing, and the adb-reverse rig note for the next walk. The phase 2 note is amended where it claimed the card shadow was the milestone's only visible change to an untouched instance - it is now one of three, and the third (an untouched instance drawing a hero, because brand.hero carries the env default) is a correction to the record with no code behind it. PLAN.md's M12 entry stopped at phase 2; it now runs through 6, records phase 8 including the defects, and drops the same "one deliberate change" claim. COVERAGE_PLAN.md gains an amendment section explaining why the ui/theme/** directory glob became wrong the moment M12 put three pure resolvers behind it, and the general rule it suggests: prefer file globs to directory globs once a directory is mixed. Its own §5 already forbade excluding testable code. Pairs with Android-app phase 8. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -202,3 +202,28 @@ class LoginViewModelTest {
|
||||
- `MainDispatcherRule` + a documented ViewModel test pattern exist and are reused.
|
||||
- Coverage exclusions list only genuinely non-unit-testable files (UI composables, Android-framework
|
||||
glue) — no ViewModel, repository, DTO, or pure core-logic file is excluded.
|
||||
|
||||
## 6. Amendment (2026-08-08, M12 phase 8): `ui/theme/**` narrowed to one file
|
||||
|
||||
**A directory glob in the exclusion list went stale as soon as another milestone put testable code
|
||||
in that directory.** §2 phase 0 excluded `app/src/main/java/**/ui/theme/**` because at the time the
|
||||
directory held `Color.kt`, `Type.kt` and the composables — constants and composable bodies, nothing
|
||||
a JVM test could execute. M12 then added three *pure* resolvers to it: `ShardPalette`,
|
||||
`ShardStructure` and `ShardTypeface`, which exist precisely so the theming milestone's no-op
|
||||
invariants could be plain JVM assertions. JaCoCo measures them at **98%, 100% and 100%**, and the
|
||||
glob was discarding every line.
|
||||
|
||||
The exclusion is now the single file it was really about, `ui/theme/Theme.kt` (the composable, 52%).
|
||||
Everything else in `ui/theme/` is measured and all of it covers at 93% or better.
|
||||
|
||||
Two things worth carrying forward:
|
||||
|
||||
- **This did not rescue the gate and was not meant to.** M12's already-measured code
|
||||
(`data/appearance/` at 100%, `ui/navigation/` at 93–100%) clears `new_coverage ≥ 50` on its own.
|
||||
The point is that a future change deleting those resolvers' tests would now move the number, where
|
||||
before it would not have — the exclusion was hiding well-tested code, which is the opposite of what
|
||||
§1 built the list for and what §5's third bullet asks for.
|
||||
- **Prefer file globs to directory globs when a directory is mixed.** `ui/components/**` stays a
|
||||
directory glob and correctly so: `BrandAssets.kt` sits at 11% because only `brandAssetUrl` is pure,
|
||||
and the rest is composable bodies. The distinction is whether the directory is *uniformly*
|
||||
untestable, not whether it is under `ui/`.
|
||||
|
||||
Reference in New Issue
Block a user