Skip to content

docs: document Coil's dormant transitive OkHttp dependency - #464

Merged
github-actions[bot] merged 1 commit into
devfrom
docs/463-coil-okhttp-dormant
Aug 23, 2026
Merged

github-actions[bot] merged 1 commit into
devfrom
docs/463-coil-okhttp-dormant

Conversation

@libravault-pipeline-bot

Copy link
Copy Markdown
Contributor

Summary

Issue #463 asked for a triage pass to confirm whether Coil (used app-wide for cover art) ever issues a real network request in this app's actual usage, given that it transitively pulls com.squareup.okhttp3:okhttp:4.12.0 onto the F-Droid runtime classpath.

Finding: no. Verified by reading every call site:

  • Every AsyncImage / rememberAsyncImagePainter model in this app (LibraryItemCard, ContinueCard, PlayerScreen, MiniPlayerBar) is a local file:///content:// URI derived from coverArtPath, which MetadataExtractor populates from embedded cover bytes written to local storage — never a URL.
  • CoilMarkdownImageTransformer (used for Markdown reader images) explicitly refuses to resolve http(s):// links by design (see its doc comment and resolveMarkdownAssetPath).
  • No AndroidManifest.xml anywhere in the tree (app/src/main, core/tts) declares the INTERNET permission, and neither does app/src/fdroid or app/src/play — because neither of those source-set directories exists. So even a hypothetical future code path handing Coil a remote URL would have the OS refuse the socket before OkHttp could act.

What changed

  • KNOWN_LIMITATIONS.md: added a bullet documenting Coil/OkHttp as present-but-dormant, per the issue's suggested next step. Also fixed an adjacent stale bullet claiming INTERNET is "stripped from app/src/fdroid/AndroidManifest.xml" — that file doesn't exist (never has, per git log), and the same is true for app/src/play; no flavor has ever declared the permission. Also updated the outdated "Donations are BTC/XMR addresses only, copy-pasted by the user" line — that flow was replaced by an external-link handoff (see SupportLink.kt's own doc comment, which independently confirms "this app makes zero network calls of any kind").
  • docs/threat-model.md: added a short section naming the same finding, so it's discoverable from the security-model doc, not just the limitations list.

Docs-only change, no code touched, no tests needed per AGENTS.md's trivial-change exemption.

Closes #463

Confirmed Coil never issues a real network request anywhere in this
app's actual usage (every AsyncImage/rememberAsyncImagePainter call
site is fed a local file://content:// URI, CoilMarkdownImageTransformer
explicitly refuses http(s):// links, and no manifest on any flavor
declares INTERNET), so the transitive OkHttp dependency it drags onto
the F-Droid classpath is present but structurally unable to be used.
Also fixes a stale KNOWN_LIMITATIONS.md line describing INTERNET as
"stripped from app/src/fdroid/AndroidManifest.xml" — that file (and
app/src/play) don't exist; no flavor has ever declared the permission.
@github-actions
github-actions Bot marked this pull request as ready for review August 23, 2026 11:47
@github-actions github-actions Bot added the risk:low Principal review classified this PR as low risk label Aug 23, 2026
@libravault-pipeline-bot libravault-pipeline-bot Bot added the status:needs-qa PR open, awaiting qa-agent verification label Aug 23, 2026
@claude

claude Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

QA verdict: PASS

Acceptance criteria (issue #463)

Issue #463 was a triage request, not a feature checklist. Its "suggested next step" was: (1) confirm whether Coil ever issues a real network request in actual app usage, and (2) if not, document that explicitly in docs/threat-model.md / KNOWN_LIMITATIONS.md.

  • Confirm no real Coil network usage — verified independently, not just taken on the PR's word:
    • AsyncImage/rememberAsyncImagePainter call sites (LibraryItemCard.kt, ContinueCard.kt, PlayerScreen.kt, MiniPlayerBar.kt) all feed local coverArtPath-derived URIs, confirmed by reading each file.
    • CoilMarkdownImageTransformer.kt delegates to MarkdownAssetResolver.resolveMarkdownAssetPath, which explicitly returns null for any http:///https://-prefixed link (core/storage/.../MarkdownAssetResolver.kt:63-67) — confirmed by reading the source, not just the doc comment.
    • No AndroidManifest.xml exists anywhere except app/src/main/AndroidManifest.xml, and it declares no INTERNET permission — confirmed by Glob/Read. app/src/fdroid and app/src/play directories genuinely don't exist (Glob empty) despite both flavors being declared in app/build.gradle.kts.
    • Ran app:testFdroidDebugUnitTest --tests "*ManifestPermissionsTest*" — passes, independently corroborating "INTERNET never requested" for the F-Droid variant specifically.
    • SupportLink.kt's doc comment (and an empty grep for BtcPayClient/StaticDonationClient across the tree) confirms the old BTCPay invoice flow is actually gone, not just hidden — so the PR's rewrite of the stale "BTC/XMR copy-paste" bullet is accurate too.
  • Document the finding — done in both KNOWN_LIMITATIONS.md and docs/threat-model.md, matching the issue's suggested locations.

What I ran

  • ./gradlew testDebugUnitTest --continue — BUILD SUCCESSFUL, 1020 tests / 0 failures / 0 errors across 124 test-result files (aggregated from the XML reports, not just the console tail). One red herring in the console log: a kotlinx.coroutines.DefaultExecutor background-thread stack trace ("Method getMainLooper... not mocked") during ReaderViewModelTest.setUp — checked the JUnit XML for that class and confirmed 0 failures/errors recorded, so this is a benign async logged exception, not an actual test failure, and it's unrelated to this docs-only diff anyway.
  • ./gradlew :app:testFdroidDebugUnitTest --tests "*ManifestPermissionsTest*" — BUILD SUCCESSFUL, corroborating the "no INTERNET permission" claim for real, not just via grep.
  • This is a docs-only change (KNOWN_LIMITATIONS.md, docs/threat-model.md, no .kt/.gradle touched), so per AGENTS.md's trivial-change exemption no new tests are required — correctly claimed in the PR body.

Non-blocking observation (not a fail condition)

CONTRIBUTING.md line 9 still says "the fdroid manifest strips INTERNET" and line 10 describes Play-flavor BTCPay invoice polling as current ("currently limited to") — both are the same class of staleness this PR fixed in KNOWN_LIMITATIONS.md, just in a different file the PR didn't touch. metadata/xyz.libravault.app.yml has a similar stale comment. Out of scope for #463 specifically (which was scoped to Coil/OkHttp), so not failing QA on it, but worth a follow-up issue since it's now inconsistent with SECURITY.md/docs/threat-model.md/KNOWN_LIMITATIONS.md, which all correctly state there's no fdroid manifest and no BTCPay flow anymore.

AGENTS.md conventions

Branch name (docs/463-coil-okhttp-dormant), commit message (explains the "why" and traces the verification method), and PR description (cites specific file/line evidence, states what's NOT established) all follow repo conventions. No hardcoded versions or code touched.

QA verdict: PASS

@github-actions github-actions Bot removed the status:needs-qa PR open, awaiting qa-agent verification label Aug 23, 2026
@libravault-pipeline-bot libravault-pipeline-bot Bot added the status:needs-review QA passed, awaiting principal-review-agent label Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Principal review — verdict: auto-merge

Docs-only change (KNOWN_LIMITATIONS.md, docs/threat-model.md), closes #463. Verified independently rather than taking the PR description at face value:

  • Call sites: grepped every AsyncImage/rememberAsyncImagePainter usage in the tree. Found the four named (LibraryItemCard, ContinueCard, PlayerScreen, MiniPlayerBar) plus CoilMarkdownImageTransformer, all feeding coverArtPath/SAF-resolved local URIs — confirmed correct.
  • One call site not named in either doc's enumeration: ReaderScreen.kt:523 also has an AsyncImage(model = nowPlaying.coverArtPath, ...) for the mini-player's cover thumbnail. It's still a local coverArtPath URI, so the underlying claim ("every call site is local, never remote") holds — this is a minor incompleteness in the file-name list, not a factual error. Not blocking, just flagging for whoever touches this doc next.
  • CoilMarkdownImageTransformer: confirmed it never resolves http(s):// — resolveMarkdownAssetPath (core/storage) has explicit unit tests asserting null for http:// and https:// inputs.
  • Manifests: confirmed only app/src/main/AndroidManifest.xml and core/tts/src/main/AndroidManifest.xml exist in the whole tree, neither declares INTERNET. Confirmed app/src only has main/test — no fdroid/play override directories exist, even though flavorDimensions/fdroid/play product flavors are declared in app/build.gradle. The old "stripped from app/src/fdroid/AndroidManifest.xml" line was indeed inaccurate (that file never existed) — good catch fixing it.
  • SupportLink.kt: doc comment independently corroborates "this app makes zero network calls of any kind" and that the BTCPay flow is gone, not hidden — matches what the PR cites.
  • Issue F-Droid classpath already carries a transitive OkHttp dependency via Coil (pre-existing, found while auditing core:cloudtts's own F-Droid isolation) #463: PR's summary of the finding and suggested next step match the issue body.
  • Policy checks: no .github/agent-policy.yml sensitive_paths touched (only the two doc files). No new networking dependency introduced — this is describing a pre-existing transitive dependency, not adding one. risk:low label is correct and current (single commit, label applied same-push). AGENTS.md's trivial-change exemption (docs/comment-only) correctly applies — no tests needed.

No CONFIRMED findings. Nothing to file as a follow-up issue.

@github-actions github-actions Bot added status:approved-auto-merge Principal review passed, risk:low — will auto-merge and removed status:needs-review QA passed, awaiting principal-review-agent labels Aug 23, 2026
@github-actions
github-actions Bot merged commit 46d0df3 into dev Aug 23, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Principal review classified this PR as low risk status:approved-auto-merge Principal review passed, risk:low — will auto-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F-Droid classpath already carries a transitive OkHttp dependency via Coil (pre-existing, found while auditing core:cloudtts's own F-Droid isolation)

0 participants