Three sites need a seam cut before their branches can be tested, and one closed boundary that new evidence revises #133
Closed
opened 2026-08-27 02:21:02 +00:00 by JMR-dev
·
2 comments
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#133
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
main@dc8b7c3, 2026-08-26. Companion to #132, the seven-item JVM-gap ticket from the same read, which holds everything testable without new seam work; the code findings aredocs/coverage-read-findings.md(PR #131).Three sites cannot be tested as they stand. Two need a seam cut. One needs a boundary re-decided, because evidence found in this read contradicts what a closed ticket recorded — and that is the item worth reading first.
Children
Decomposed 2026-08-27. All three are independent of each other; #142 and #143 touch the same file,
so take them in either order but not in parallel.
MediaProbe's track-walking loop is reachable on the JVM after allMediaProbe:114-132,:279-293publish()'s null-return branch needs a seamOutputPublisher:174protected open fun openDestinationsweepStaging's re-read race has no seamOutputPublisher:267#141 carries the decision; the other two are small and mechanical once their seam is cut.
1.
MediaProbe's extractor half — this revises #84's boundary#84 closed by classifying these as device-bound and explicitly not a gap:
That was right about FFprobe and right about the measurement boundary. It is not right that these are only orchestration, and the reachability half of it is now falsified.
Reachability — verified, not assumed. Robolectric 4.16.1 ships
ShadowMediaExtractor, and its shadowed methods include the exact overloadMediaProbecalls:(read from
shadows-framework-4.16.1.jar, already on the test classpath.)MediaProbe.kt:106and:271both callsetDataSource(context, uri, null). The entry point is reachable on the JVM today.Why it is worth reaching. The uncovered code is not plumbing — it is a branch matrix:
:120,:126,:281,:286) — a file with two video tracks must report the first, andvideo == nullis what enforces itmaxOfduration across tracks (:117) — a container whose audio track is longer than its video trackcontainsKey(KEY_DURATION)guard (:116) — a track that omits duration entirely, whichMediaProbeTrackFieldsTest's KDoc already notes is common in real filesRemuxTestreaches these only through whatever the committed fixtures happen to contain, so none of the four is chosen by any test.ShadowMediaExtractor.addTrackconstructs each directly — a two-video-track file, a track with no duration key, an audio-first ordering — cases no fixture provides and no device test would provoke on purpose.What to decide: whether to test through the shadow, or to cut the track-walking loop into a pure function over a
List<MediaFormat>and test that (thework/FailureOutcome.ktpure-seam pattern). The second is more in keeping with the repo and makes theandroidTestcoverage the thin edge it should be. Either way, #84's boundary paragraph needs correcting, or the next read re-derives all of this.Mutation: change
video == nulltotrueat:120— a two-video-track test must go red.2.
OutputPublisher.publish— the null-return branchUnopenableUriTest.publishingToAnUnwritableDestinationThrowsRatherThanSilentlySucceedingasserts only that something threw:A dead provider throws
FileNotFoundExceptionfrom insideopenOutputStream; it does not return null. So that test passes through a different path and this line is untested — and the two are not interchangeable, because:177decides whether to delete a partially-written destination and only one of them has written anything.Seam needed: the
ContentResolvercall, so a test can force a null return specifically.publishis alreadyopenandOutputPublisheris already subclassed for tests (WorkerStubs.kt'sAlwaysRoomPublisher/NamingPublisher), so the shape exists — it wants oneprotected open fun openDestination(uri: Uri): OutputStream?and nothing more.3.
OutputPublisher.sweepStaging— the re-read raceThe second timestamp read, whose comment states exactly what it prevents: between the directory listing and this line, a worker resumed by WorkManager in this same process could have started writing this file, and unlinking an inode a running job holds open ends with the job reporting success for a path that no longer exists.
The false branch — a file that was collectable in the listing and is not by the time this runs — has never executed.
StagingSweep.collectableis pure and well tested; this is the guard around it, and it is the one thing standing between the sweep and a live job's output.Seam needed: something that can change a file's mtime between the listing and the re-read. A
protected open fun entriesIn(dir: File)hook, or hoisting the listing into an overridable call, both do it without touching the delete logic.Mutation: delete the
ifand delete unconditionally — the race test must go red.Considered and deliberately not included:
AndroidDeviceCodecs.probe()Recorded so the next read does not repeat the spike.
probe()(codec/AndroidDeviceCodecs.kt:49-75) is 19 of 31 lines uncovered, and #86 closed by ruling it device-bound:Robolectric does in fact offer
ShadowMediaCodecList.addCodec(MediaCodecInfo)plusMediaCodecInfoBuilder, which exposessetName,setIsEncoder,setIsVendor,setIsSoftwareOnlyandsetIsHardwareAccelerated. So the reachability objection is technically answerable — but it does not change the answer, for two reasons:setIsAliasand nosetCanonicalName, so the alias skip (:58) and the canonical-name dedup (:59) — the two things the class's KDoc calls out as easy to get wrong — are not reachable through it. What is reachable is theisHardwareAccelerated && !isSoftwareOnlyfilter and the video/non-video split, which is enumeration bookkeeping.DeviceCodecs, andConversionRouterTestalready drives 31 tests against fabricated profiles. AShadowMediaCodecListtest would cover the uninteresting half of an already-correct boundary.#86 stays closed. This paragraph exists so the shadow spike is not run a third time.
Not the acceptance
The coverage number, for the reason
CLAUDE.mdand #84, #86 and #88 all give. A seam is worth cutting when it turns a device-bound behaviour into a decision a test can choose the inputs for — which is the case for all three above and is not the case forAndroidDeviceCodecs.probe(). A seam cut only to make a percentage move is worse than the uncovered line it replaces.All children are implemented, and the batch integrates. Verified locally rather than assumed, because eight PRs touching overlapping files is exactly where a clean-per-PR result stops meaning much.
Merged all eight branches onto current
mainin a throwaway branch:ktlintCheck,detekt,lintDebug,testDebugUnitTest,compileDebugAndroidTestKotlinBranch moved more than line, which is what this batch was aimed at — nearly every test here targets a guard rather than a new code path.
Files this batch was about, after integration:
InputQuery.ktOutputPublisher.ktContainerCapabilities.ktMediaProbe.ktConcatWorker.ktConversionWorker.ktWhat remains in those files is the native/device half and the named exemptions recorded in each PR — not unclaimed gaps.
Follow-up worth its own ticket, not folded in here:
CLAUDE.md's coverage entry quotes 84.9%/63.8% and instructs re-measuring before quoting. It goes stale the moment this batch lands. Updating it now would be quoting a number that is not true ofmainyet, which is the exact failure that entry documents about itself.All three children closed. #142 and #143 closed on merge; #141 did not, for the reason recorded on #132 — its PR merged into a stack base rather than
main, so itsCloseskeyword never fired.#141 verified against
mainbefore closing by re-running its own named mutation. The ticket namedvideo == null -> trueat:120; that line moved when the seam was cut, so the equivalent guard inextractedFromwas dropped instead — and both the video and audio first-track-wins tests go red.This parent's premise held up better than expected. All three seams were cut, and two of them exposed something a test alone would not have: #143's proposed seam turned out not to reach the branch it was for (the override fired before the snapshot, so
collectablenever saw the old mtime), and the seam had to move tosnapshot(listing)before the race test would bite. That is recorded on #143.The pattern has since carried into wave 2 (#153), where cutting seams for
ConversionViewModel.observeandJoinViewModel.observeexposed a crash —ConcatStrategy::valueOfthrowing inside aviewModelScopecollect with no handler. Same shape as here: the defect was not hidden, it was unreadable in place.