W2: the join side's state mapping, and the arity guard that duplicates ConcatWorker's message #155
Closed
opened 2026-08-27 11:59:02 +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
No labels
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#155
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.
The join side of W1, plus one guard above it that is more interesting than its size suggests.
The state machine
Same shape as W1 and the same reasoning, on a smaller matrix.
JoinViewModel.observemapsWorkInfoontoJoinState, and these arms are never chosen:RUNNING/BLOCKED→JoiningENQUEUED,runAttemptCount > 0→WaitingENQUEUED,runAttemptCount == 0→JoiningFAILEDwith a blank or missing messageCANCELLEDcancel()(307–309) has no coverage either.Do this after W1 so the two seams come out the same shape. They are the same refactor twice and should not diverge; if the join side needs a different split, that is worth a comment on both tickets rather than a quiet divergence.
The arity guard, and why it is not just three cold lines
onInputsPickedrefuses fewer than two inputs at 196–198:That string is emitted in two files.
ConcatWorker.kt:42emits the identical literal, and it was pinned by a test on #148 during the residual-gap audit. This copy is pinned by nothing — so today, changing the ViewModel's wording breaks no test while changing the worker's does, for one message the user sees from one condition.That is W5's subject. Land W5 first, then pin whatever survives here. Writing a test against this literal now would freeze the duplication in place, which is the opposite of useful.
Worth noting while you are in the file:
JoinScreen.kt:45filtersuris.isNotEmpty()before calling this, so the picker cannot deliver zero — but it can deliver one, which is exactly the case this guard is for. Do not conclude from the screen that the guard is unreachable.Done when
Every arm above is chosen by a test and killed by a mutation,
cancel()is covered, and the arity guard is pinned against a shared constant rather than a literal. As on W1,ENQUEUEDneeds both sides or it proves nothing aboutrunAttemptCount.PR #163. One thing this ticket did not anticipate, found by cutting the seam.
JoinViewModel'sSUCCEEDEDarm read the join strategy withConcatStrategy::valueOf, which throwsIllegalArgumentExceptionon a name this build does not define. It runs inside aviewModelScopecollect with no handler, so the throw is not aFailedstate — it takes the process down.Reachable on this ticket's own premise. WorkManager keeps finished work about a week, and
ConcatWorkerwritesresult.strategy.name, so a build that added a third strategy leaves this one crashing on its own completed joins after a rollback.The repo had already fixed exactly this one file over.
ConcatWorker.kt:49-54readsKEY_FORMATby lookup rather thanvalueOf, with a comment saying why — "a format name this build does not define used to throw past the catch". The matching read on the ViewModel side was never changed with it, and nothing pointed at the pair.Proven rather than argued — restoring
valueOf:This is the second time in this wave that cutting a seam exposed a defect rather than only a coverage gap, which is worth noting for #153's remaining children: the value of the seam is not just that the branches become testable, it is that the branches become readable — this line had been in front of every reader of
observeand its hazard was invisible until it stood alone.On the ticket's other two items: the arity guard is pinned by
SharedFailureMessagesTestfrom #161, which drivesonInputsPickedfor real, so it is not repeated here;cancel()is covered by the existing join tests.