R7 — A present, willing user has no way to make a foreground-denied retry happen now #16

Open
opened 2026-08-23 03:44:44 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-08-23 03:44:44 +00:00 (Migrated from github.com)

Finding R7 from the overnight max-effort review (Fable lead, Opus sub-agents). Full report: scratchpad/overnight/REVIEW.md.

R7 — A present, willing user has no way to make a foreground-denied retry happen now

severity: medium
verdict: CONFIRMED
where: app/src/main/java/org/libremediaconverter/work/FailureOutcome.kt:56-59; ConverterScreen.kt:171-188; JoinScreen.kt:119-133
scenario: Transcode interrupted by process death at 23:00; every WorkManager recovery is denied at setForeground (app in background); backoff doubles to 4h16m. User opens the app at 09:00 (runAttemptCount 9): screen says "Paused ... keeping the app open helps it along" and offers only Cancel. The next attempt may be hours away; the one thing that would fix the job — the user's foreground presence — cannot be spent on it. Close the app first and the job hits the bound and dies silently (see D16 note below).
evidence: Lead re-ran the greps: zero hits for ProcessLifecycleOwner/observers/enqueueUniqueWork/setBackoffCriteria in app/src/main; Waiting branch renders only Cancel. Reviewer verified against work-runtime 2.11.2 sources that no supported "run this one-time job now" API exists (setNextScheduleTimeOverride is periodic-only, WorkSpec.kt:423-434), so a fix must cancel + re-enqueue.
fix: "Try now" on the Waiting state: cancel old, enqueue equivalent, observe new. Must decide (a) reattached jobs have no recoverable input Uri (JobTags deliberately drops it) — offer only for jobs this ViewModel started, or carry the URI and own the dead-grant risk; (b) re-enqueue resets runAttemptCount, granting a fresh budget of 10 — defensible (the user asked) but must be decided, not inherited.
risk: Cancel must complete before enqueue or two live jobs share NOTIFICATION_ID 1001. Dispatch timing is not JVM-verifiable; the ViewModel contract (cancel->enqueue->observe, activeWorkId moves once) is, via WorkManagerTestInitHelper.


Cut: below — held for manual review: product decision, CI/workflow, hardware, or PLAUSIBLE verdict.

🤖 Generated with Claude Code

_Finding **R7** from the overnight max-effort review (Fable lead, Opus sub-agents). Full report: `scratchpad/overnight/REVIEW.md`._ ### R7 — A present, willing user has no way to make a foreground-denied retry happen now severity: medium verdict: CONFIRMED where: app/src/main/java/org/libremediaconverter/work/FailureOutcome.kt:56-59; ConverterScreen.kt:171-188; JoinScreen.kt:119-133 scenario: Transcode interrupted by process death at 23:00; every WorkManager recovery is denied at setForeground (app in background); backoff doubles to 4h16m. User opens the app at 09:00 (runAttemptCount 9): screen says "Paused ... keeping the app open helps it along" and offers only Cancel. The next attempt may be hours away; the one thing that would fix the job — the user's foreground presence — cannot be spent on it. Close the app first and the job hits the bound and dies silently (see D16 note below). evidence: Lead re-ran the greps: zero hits for ProcessLifecycleOwner/observers/enqueueUniqueWork/setBackoffCriteria in app/src/main; Waiting branch renders only Cancel. Reviewer verified against work-runtime 2.11.2 sources that no supported "run this one-time job now" API exists (setNextScheduleTimeOverride is periodic-only, WorkSpec.kt:423-434), so a fix must cancel + re-enqueue. fix: "Try now" on the Waiting state: cancel old, enqueue equivalent, observe new. Must decide (a) reattached jobs have no recoverable input Uri (JobTags deliberately drops it) — offer only for jobs this ViewModel started, or carry the URI and own the dead-grant risk; (b) re-enqueue resets runAttemptCount, granting a fresh budget of 10 — defensible (the user asked) but must be decided, not inherited. risk: Cancel must complete before enqueue or two live jobs share NOTIFICATION_ID 1001. Dispatch timing is not JVM-verifiable; the ViewModel contract (cancel->enqueue->observe, activeWorkId moves once) is, via WorkManagerTestInitHelper. --- **Cut:** `below` — held for manual review: product decision, CI/workflow, hardware, or PLAUSIBLE verdict. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMediaConverter#16