Decide whether the workers getForegroundInfo has a seam worth cutting, or record that it does not #88
Closed
opened 2026-08-25 03:22:09 +00:00 by JMR-dev
·
1 comment
No Branch/Tag Specified
main
fix/102-picker-back-press-overshoot
fix/268-saf-picker-determinism
feat/ogg-vorbis-libvorbis
feat/expedited-conversion-work
fix/gate-cache-in-worktrees
chore/gate-runs-shellcheck
test/publish-delete-arm-real-provider
docs/e8-instrumented-coverage
docs/api37-carrier-count-drift
docs/e7-second-constraint
test/publish-to-a-real-saf-destination
fix/api37-report-match-line
fix/api37-task-snapshot-crash
test/join-failure-message-on-device
docs/e2e-read-findings-e7
test/cancelling-a-running-export
test/reattach-to-a-running-job
test/content-uri-reaches-ffmpeg
fix/launcher-wiring-waits-for-the-pick
fix/cancel-tests-need-a-slower-encode
test/cancelling-a-running-join
test/cancelling-a-running-session
test/notification-cancel-action
test/ffmpeg-progress-is-observed
test/fallback-asserts-the-path
test/flac-and-opus-assert-their-format
docs/e2e-read-findings
docs/wave4-coverage-numbers
fix/injectable-startup-sweep-scope
test/session-outcome-seam
test/launcher-callback-identity
test/theme-follows-system-dark
test/audio-drop-arm
fix/rotation-waits-for-recreation
fix/convert-guards-on-ready
test/retry-save-mime
test/hardware-progress-reaches-workmanager
test/ffprobe-mapping-seam
test/device-codec-enumeration-seam
test/unknown-container-row
test/null-message-fallbacks
test/cancel-reaches-workmanager
docs/coverage-wave3-recovery
test/concat-engine-seam
docs/coverage-wave3
test/mediaprobe-merge-seam
test/adaptive-shell-wiring
test/aac-audio-args
test/notification-progress-text
test/media3-muxer-guard
test/hardware-fallback-and-cancellation
test/unprobeable-join-clip
test/one-branch-outcomes
test/foreground-type-regimes
fix/bound-wedge-diagnostics
docs/coverage-wave2
test/screen-wiring
test/viewmodel-setters
test/join-state-mapping
test/conversion-state-mapping
test/dedupe-user-messages
fix/restore-stack-merges
test/refused-jobs
test/concatworker-failure-arms
test/container-capabilities-audio
test/readspec-enum-fallbacks
test/outputpublisher-seams
test/mediaprobe-track-seam
test/outputpublisher-partial-branches
test/fake-provider-scaffolding
docs/coverage-read-findings
chore/gitignore-kotlin
test/bound-the-hangs
docs/coverage-remeasure
ci/baseline-counter-precision
fix/invalid-suggestion-chip
ci/wedged-leg-report
fix/reattachment-overwrites-pick
test/theme-live-branches
fix/failed-save-retry
fix/empty-composition-crash
ci/advisory-failure-report
docs/seven-run-counts
test/release-permission-guard
ci/build-workflow-permissions
docs/api37-point-release
docs/benchmark-populate-path
fix/dead-assertion-probe-test
ci/actionlint
test/device-codecs-encode-consequence
fix/sdkmanager-pipefail
docs/readme-restart-claim
fix/saf-picker-root-discovery
fix/probe-dispatcher-seam
test/media3engine-mime-tables
test/mediaprobe-pure-helpers
fix/codec-vocabulary-drift
docs/robolectric-rationale-correction
docs/api37-advisory-counts
test/r38-8-saf-e2e
test/r38-7-join-states
test/r38-6-conversion-states
test/r38-5-state-seam
fix/jacoco-robolectric-coverage
docs/instrumented-tests-correction
test/r38-2-filecard
test/r38-4-advanced-picker
test/r38-3-pickers
tools/file-issue-script
tools/api-37-emulator
fix/review-app-gaps
docs/review-corrections
No results found.
Labels
Clear labels
above-cut
accessibility
backlog
bug
confirmed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
plausible
question
sev:high
sev:low
sev:medium
wontfix
Worked autonomously overnight: local, JVM-verifiable, no product decision
Barrier affecting people with disabilities
Held for manual review: product/UX call, CI/workflow, hardware, or unverifiable here
Something isn't working
Reviewer demonstrated the defect
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Reviewer could not fully demonstrate it; treat as unproven
Further information is requested
High severity
Low severity
Medium severity
This will not be worked on
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JMR-dev/LibreMediaConverter#88
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Filed from a coverage read on
ad28293. Both workers miss the same method, which is what makes it worth one ticket rather than two.getForegroundInfois 5/5 missed in both workerswork/ConversionWorker.ktandwork/ConcatWorker.kteach report 0 of 5 lines on it. Also missed:ConversionWorker.runMedia3OrFallBack(11/11) and about half ofConcatWorker.doWork(15/39).Be careful what you conclude from that
The workers are heavily tested — sixteen JVM test classes touch
ConversionWorker, plus six inandroidTest, andConversionWorkerTestdrives a realsetForegroundwith a foreground-service type on a device. This is not neglected code.getForegroundInfois what WorkManager calls to promote the job to a foreground service. It is reachable on a device andwork/FailureOutcome.kt's KDoc already explains why the surrounding cases resist testing:So the honest question is not "why is this 0%" but "is there a seam here, or is this genuinely the thin edge the pure-seam pattern leaves behind?"
What to actually decide
getForegroundInfoin both workers. If it makes a decision — picking a notification, choosing a service type by API level, handling a null — that decision is a pure seam and belongs in a tested function, the wayFailureOutcomealready isolates the retry-vs-fail rule.ForegroundInfofrom values decided elsewhere, say so and close this: five lines of construction with no branch is the thin edge, andProgressNotificationTestplusDeniedForegroundStartTestalready cover the decisions feeding it.runMedia3OrFallBack(11/11) deserves the same read —ForcedFailureTestandHardwareFallbackTestdrive its fallback on a device, so check whether the choice is separable from the execution.Either outcome is a valid close. What is not valid is mocking WorkManager to make the number move.
Done means
Either a pure seam extracted and tested with a named mutation, or a written finding on this ticket saying which of the three sites have no seam worth cutting and why — recorded so the next coverage read does not re-open the same question.
Not the acceptance
The coverage number. JaCoCo did not count Robolectric here until #76, #52's premise was an artifact of that, and
CLAUDE.mdsays plainly: the norm is behaviours having tests that bite, not a percentage rising.Investigated. The answer is outcome (2): there is no seam worth cutting here. Closing with the evidence, so the next coverage read does not re-open it.
ConcatWorker.getForegroundInfo— no decision at allA constant title, a constant 0, a constant flag. Five lines of construction with no branch. There is nothing here a pure function could hold.
ConversionWorker.getForegroundInfo— one fallback, and a delegationThe only decision is
?: "input"when the display name is missing from inputData. Everything else is assembly.notifications.build(...)is covered byProgressNotificationTest; the foreground-denial rules live inFailureOutcomeand are covered byDeniedForegroundStartTestandFailureOutcomeTest.The real decision was already extracted — and already tested
ConversionForegroundType.current()is the seam this ticket was looking for. Three API regimes:MEDIA_PROCESSINGfrom 35,DATA_SYNCfrom 34,0at 33.It has a test, and a good one —
ConversionWorkerTest.foregroundTypeMatchesTheRunningApiLevel:Two things make it bite rather than tautologise:
>= 35,>= 34) while production spells them as named constants (VANILLA_ICE_CREAM,UPSIDE_DOWN_CAKE). Moving a production threshold therefore reddens it rather than moving with it. That independence is what separates a mirror test from a real one.So the 0% was a measurement boundary again
ConversionForegroundTypeis reached only fromandroidTest, and JaCoCo measurestestDebugUnitTestonly. Same shape asMedia3EngineandAndroidDeviceCodecs.probein #85 and #86: the report cannot see the tests that cover it.runMedia3OrFallBack(11/11 missed) is the same story — its decision isisCancellation(e), covered byWorkerCancellationTeston the JVM, and the hardware-to-FFmpeg fallback itself byHardwareFallbackTestandForcedFailureTeston a device.Named exemption, deliberately not fixed
inputData.getString(KEY_DISPLAY_NAME) ?: "input"has no test. It is a one-line fallback for a key the worker's ownrequest()always writes, and its only consequence is the title on a notification that is replaced by the first progress tick a second later. Testing it would need a hand-builtDatamissing a key nothing omits. Naming it rather than covering it — implied coverage is the problem this repo cares about, not a gap that is written down.What would reopen this
A
getForegroundInfothat starts branching — different notifications per engine, a service type chosen from something other than the API level, or a title derived rather than passed. None of those is true today.