Repository navigation
Test coverage follow-up: CI paths-filter fix, cloudtts gate, Phase 7 (Settings + partial Reader) - #512
Conversation
…verage docs - jvm-tests.yml and ios-app-build.yml's `changes` job ran dorny/paths-filter with no actions/checkout step. paths-filter diffs via the GitHub API on pull_request events (no checkout needed) but needs local git history on push, so every push-triggered run to dev/main has been failing at 'Detect Changed Paths' with 'fatal: not a git repository', skipping the test job entirely. Verified against the last 15 jvm-tests.yml runs: 100% of push runs failed, 100% of pull_request runs passed. Fixed by adding actions/checkout@v4 to both jobs. - Re-ran koverXmlReportDebug across all 18 modules (was last measured 2026-08-17 against 16). Android overall 40.1% -> 46.9%. core:cloudtts and core:billing (both new since the last audit) are now measured; core:cloudtts holds user API keys/vendor credentials so it's added to GATED_PREFIXES alongside the three vault modules, and coverage-baseline.json is regenerated via --write-baseline. - docs/TEST_COVERAGE_PRD.md gets a dated status-update section (does not rewrite the original 08-16 audit) covering the above plus: PR #265 merged so Phase 7's feature:library sequencing blocker is cleared; #253/#256 already closed; #273 stays status:blocked pending a human decision on iOS snapshot approval, deliberately not implemented blind. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tingsContent (Phase 7) Per docs/TEST_COVERAGE_PRD.md Phase 7's PlayerScreen template: SettingsScreen was 0% covered because it takes viewModel = hiltViewModel() directly and reads its StateFlows/callbacks inline, so it can't render without a Hilt graph. - SettingsScreen(viewModel) is now a thin wrapper: it collects the ViewModel's state flows, resolves the Activity/Context-dependent bits (SAF folder picker, external browser intent, billing purchase calls), and hands everything else to a new pure SettingsContent(state, actions) with no Hilt/Context dependency. - SettingsContentState / SettingsActions bundle the collaborators, mirroring PlayerScreen's PlayerActions pattern. cloudVoicesActuallySending moved onto SettingsContentState as a computed property (was an inline call-site expression) so it's independently testable. - SettingsContentTest.kt (10 tests): the vaults empty/non-empty states, the three-way Support Development branch (F-Droid external link / Play no-products / Play subscribe), the remove-vault confirmation dialog, and cloudVoicesActuallySending's three-way AND. Existing 67 tests pass unchanged (evidence of preservation per the Phase 7 recipe). Two of the new assertions (cloudVoicesActuallySending's AND, the remove-vault callback wiring) were mutation-checked by hand: flipping AND to OR and dropping the callback each turned exactly the expected tests red. - SettingsScreenshotTest.kt (3 tests, Dark/Light/Sepia) — first per-screen Roborazzi baseline in the repo (previously only core:ui's generic theme sampler existed). Needed adding the roborazzi plugin/deps to feature/settings/build.gradle.kts, which had never had them. - Recording the first baseline caught a real, pre-existing bug: the reading theme filter-chip Row has no wrap or scroll, so with AppReadingTheme's 5th entry (System, #349) the System chip was squeezed to chip width and broke mid-word into 'Syst'/'em' in every theme. Fixed with horizontalScroll; re-recorded baselines confirm the fix, and the pre-fix baseline caught the regression when I ran the suite before fixing it (3 verify failures, all and only the screenshot tests). feature:settings coverage was 58.4% before this file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…y states (Phase 7, partial) ReaderScreen.kt is a Phase 7 target (246 missed lines, 0%) but does NOT fit the PlayerScreen/SettingsScreen thin-wrapper-plus-pure-content template: epubViewModel/markdownViewModel are obtained via sibling hiltViewModel() calls specifically so their instances are shared with the ViewModelStoreOwner EpubReaderScreen/MarkdownReaderScreen use downstream (see the code comment this file already had). Pulling that into a pure content composable risks silently breaking that sharing -- exactly the a-real-behaviour-change- slipping-in-unnoticed risk Phase 7 already calls out. This needs a deliberate design pass, not a mechanical extraction, so it is left alone here. selectReaderBottomBar/readAloudSupported (the file's other pure top-level functions) already have dedicated tests. ReaderMiniPlayerBar and ReaderReadAloudMiniBar were the remaining genuinely pure, untested pieces -- widened from private to internal and covered here for their state-dependent icon/text display (Play vs Pause, Resume vs Pause reading). Click/callback-wiring assertions were attempted but dropped: an extended isolation investigation found performClick() silently invokes nothing on either bar specifically when rendered with its real, distinct Material icon set together (SkipPrevious/FastRewind/Pause/PlayArrow/SkipNext/Stop/ Headphones) -- every icon works fine individually, and a same-icon-repeated reconstruction of the identical layout also clicks fine, so this isn't believed to be a production bug (the component is unchanged, shipped code), but a genuine, unexplained Robolectric/Compose test-harness interaction not worth further time right now. Recorded here rather than shipped as a flaky or silently-weakened assertion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Android overall 46.9% -> 50.4% after SettingsScreenKt (done) and ReaderScreenKt (re-scoped, partial). See PRD Sec 1b for the per-target writeup, including why ReaderScreenKt needs a design pass rather than the mechanical wrapper/content split, and a heads-up to check EpubReaderScreenKt/PdfReaderScreenKt for the same sibling-hiltViewModel sharing shape before assuming the template applies to them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This PR was opened outside the automated pipeline (author isn't |
📱 iOS Build Status: PASSED✅ iOS Simulator Build & Unit Tests - success iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
Principal review — verdict:
|
… PR #517 is canonical Filing issue #514 for the paths-filter bug (found during the 08-24 test coverage review) triggered the dev-agent pipeline to pick it up concurrently and ship a minimal, standalone fix (PR #517, already green) faster than this session could land its own bundled version of the same change. Reverting jvm-tests.yml/ios-app-build.yml back to origin/dev here to avoid two competing fixes for the same two lines; #517 is now the PR that closes #514. docs/TEST_COVERAGE_PRD.md's write-up of the bug stays (real, useful analysis) but now points at #517 instead of claiming this branch fixed it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
📱 iOS Build Status: PASSED⏭️ iOS Simulator Build & Unit Tests - skipped iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
Implements the prioritized plan from the 08-24 test coverage review (docs/TEST_COVERAGE_PRD.md).
What's in this PR
core:cloudttsgate — re-measured coverage (was stale since 08-17/18, predating the whole Cloud TTS module).core:cloudttsadded toGATED_PREFIXESsince it holds user API keys/vendor credentials, same risk class as the three vault modules already gated.SettingsScreenKt: full thin-wrapper + pure-content split (PlayerScreen template), 10 new tests + 3 Roborazzi baselines. Found and fixed a real bug while inspecting the first baseline: the reading-theme filter-chip row had no wrap/scroll, soAppReadingTheme's 5th entry ("System") broke mid-word into "Syst"/"em" in every theme (Settings: reading theme 'System' filter chip wraps mid-word ('Syst'/'em') in all themes #515).ReaderScreenKt: does not fit the template (itsepubViewModel/markdownViewModelare obtained via siblinghiltViewModel()calls specifically to share a ViewModelStoreOwner with child screens — extracting a "pure" content composable risks silently breaking that). Re-scoped in the PRD instead of forced through; covered the two genuinely-pure untested pieces (ReaderMiniPlayerBar/ReaderReadAloudMiniBar) for display state.CreateVaultScreenKt/EpubReaderScreenKt/PdfReaderScreenKtnot started — tracked as follow-up in Phase 7 remaining: CreateVaultScreenKt, EpubReaderScreenKt, PdfReaderScreenKt + a ReaderScreenKt design pass #521.Android coverage: 46.9% → 50.4% (
feature:settings58.4%→87.5%,feature:reader40.3%→45.1%).Deliberately not in this PR
jvm-tests.yml/ios-app-build.ymlpaths-filter checkout bug (CI: jvm-tests.yml/ios-app-build.yml 'changes' job fails on every push to dev/main (missing checkout before paths-filter) #514) and thecircleci-dispatch.ymlgh-repo-flag bug (circleci-dispatch.yml: gh pr comment/edit fail with 'not a git repository' after successfully triggering CircleCI #516) were both found during this review, but the dev-agent pipeline picked up both issues concurrently and shipped minimal standalone fixes faster than this branch's own bundled version — see PR fix(ci): checkout repo before paths-filter in changes job #517 and PR fix(ci): add --repo flag to gh calls in circleci-dispatch.yml #519. This branch's copy of those fixes was reverted to avoid two competing diffs on the same lines.status:blocked— needs a human-designed visual-approval workflow, not something to build blind with no macOS available here.xccovon a macOS toolchain, unavailable in this environment).Closes #515, Closes #518, Closes #520
🤖 Generated with Claude Code