Repository navigation
fix(ci): checkout repo before paths-filter in changes job - #517
Conversation
dorny/paths-filter falls back to local git history on push events (no checkout needed on pull_request, which uses the GitHub API instead), so every push to dev/main failed at "Detect Changed Paths" with "not a git repository". The fail-closed behavior from #416 correctly skipped the real test/build jobs in response, so no tests were silently passing — but every merge to dev/main has been reporting a false red, and the JVM tests / iOS build never actually ran on those runs. fetch-depth: 0 rather than a shallow depth, since paths-filter's default base for push is the commit before the push (github.event.before), which can be more than one commit back. Closes #514
📱 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. |
The previous push opened the PR as draft and immediately marked it ready, firing two near-simultaneous pull_request events into the same jvm-tests.yml concurrency group. The surviving run's steps all genuinely succeeded (checkout, tests, lint, coverage), but the job's overall conclusion was reported as "cancelled" by a race with the superseded run's cancellation signal. Empty commit to get one clean, unraced run.
📱 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. |
… 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>
QA verification — PR #517 vs issue #514Issue type: bug report, no acceptance checklist — criteria is "repro no longer reproduces + a regression test/verification proves it." Root cause matchIssue #514: Fix review
CI verification (PR's own pull_request-triggered runs, commit
|
| Criterion | Result |
|---|---|
| Checkout added before paths-filter in both workflows | ✅ |
fetch-depth: 0 used (handles multi-commit pushes) |
✅ |
Fix doesn't break the already-working pull_request path |
✅ (all jobs green on PR's own runs) |
| YAML valid | ✅ |
| No regressions in JVM test suite | ✅ (BUILD SUCCESSFUL) |
| AGENTS.md conventions (branch, commits) | ✅ |
QA verdict: PASS
Principal review — verdict:
|
…(Settings + partial Reader) (#512) * fix(ci): checkout before paths-filter; gate core:cloudtts; refresh coverage 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> * refactor(settings): split SettingsScreen into thin wrapper + pure SettingsContent (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> * test(reader): cover ReaderMiniPlayerBar/ReaderReadAloudMiniBar display 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> * docs: record Phase 7 partial execution and final coverage numbers 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> * revert(ci): drop this branch's paths-filter checkout fix, dev-agent's 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> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
) Small, real addition riding along with a throwaway PR whose actual purpose is triggering the circleci-job label against current dev, to confirm #517 + #519 actually fixed the dispatch path (not just that the two diffs looked right in review). Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Both
jvm-tests.ymlandios-app-build.yml'schangesjob runsdorny/paths-filter@v3with noactions/checkoutstep before it.paths-filterdiffs via the GitHub API onpull_requestevents (no checkout needed), but falls back to local git history onpushevents — with no checkout, that failed immediately withfatal: not a git repository.Since the
changesjob failed, the fail-closed behavior added for #416 correctly skipped the real test/build jobs — so this wasn't silently passing tests — but it did mean every push-triggered run todev/main(i.e. every merge) reported a false red, andUnit & Integration Tests (JVM)/ the iOS build job never actually executed on those runs.Verified via
gh run list --workflow=jvm-tests.yml --json event,conclusion: 100% of recentpush-triggered runs werefailureat "Detect Changed Paths", 100% ofpull_request-triggered runs weresuccess.Fix
Add
actions/checkout@v4withfetch-depth: 0as the first step of thechangesjob in both workflows. Full history (rather than a shallow depth) becausepaths-filter's default base forpushevents is the commit before the push (github.event.before), which can be more than one commit back for a multi-commit push — a shallowfetch-depth: 1or2would only reliably cover a single-commit push.Risk
This touches
.github/workflows/**, which is asensitive_pathsentry inagent-policy.yml— flagging explicitly per the dev-agent persona. The change only adds a checkout step ahead of an existing filter step; it doesn't change trigger conditions, permissions, or secrets handling.classify_pr_risk.pywill forcerisk:highon this PR regardless, so it will land onstatus:needs-human-mergerather than auto-merge.Testing
python3 -c "import yaml; yaml.safe_load(open(...))"— both workflow files parse cleanly.actionlintavailable in this environment to lint further; the real verification is CI's own run of these two workflows once this PR is opened (pull_requestevent — same code path as before, so this diff shouldn't be able to break the already-passing PR case) and, more importantly, the nextpushtodevafter merge.AGENTS.md's "build-script bumps" trivial-change exemption from the unit-test requirement.Closes #514