R1 — D3's decision core is exhaustively tested; the edge that feeds it is not tested at all #10

Closed
opened 2026-08-23 03:44:41 +00:00 by JMR-dev · 1 comment
JMR-dev commented 2026-08-23 03:44:41 +00:00 (Migrated from github.com)

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

R1 — D3's decision core is exhaustively tested; the edge that feeds it is not tested at all

severity: high
verdict: CONFIRMED (5 demonstrated full-suite-green mutations)
where: app/src/main/java/org/libremediaconverter/work/JobSnapshots.kt:31,40; app/src/main/java/org/libremediaconverter/convert/ConversionViewModel.kt:199,206
scenario: Reattachment.choose has 20 tests and every mutation aimed at it bites. But jobSnapshots() — which computes every input choose reasons over — and reattach()'s two guards have none. Demonstrated regressions the 257-test suite misses: (a) drop the empty-file filter -> a zero-byte staged file is offered as a savable result; (b) hardcode outputModifiedAt=0 -> the newest-file tie-break is never fed real data, so an arbitrary-but-stable winner recurs every launch (the exact failure the tie-break exists to prevent); (c) delete the pick-race guard -> reattachment overwrites a file the user picked while the query was suspended (no test reaches the branch); (d) treat Ambiguous as Certain -> the card labels the file with the other job's input, the "confident lie" the KDoc rejects — the Ambiguous arm is unexercised end to end.
evidence: Mutations FULL-jobsnapshots-no-empty-check, FULL-jobsnapshots-zero-mtime, FULL-reattach-no-race-guard, FULL-ambiguous-job-named: all exit=0, classes=34, tests=257, failed=0. Control FULL-jobsnapshots-no-tags BITES ReattachedCleanupTest 1/3, proving the harness detects breakage in this file. Logs: scratchpad/overnight/tests/mutations.tsv, muts/M*.sh.
fix: One Robolectric test driving jobSnapshots() against real WorkManager + cacheDir (zero-byte file -> outputExists=false; two files, distinct mtimes -> ordered outputModifiedAt); two ReattachedCleanupTest-style cases (pick before reattach resolves -> pick survives; two aliased SUCCEEDED jobs -> neutral "Media file" label).
risk: mtime test must set timestamps explicitly (setLastModified), not rely on fs granularity. All JVM-verifiable with the existing Robolectric setup.


Cut: above — worked autonomously overnight.

🤖 Generated with Claude Code

_Finding **R1** from the overnight max-effort review (Fable lead, Opus sub-agents). Full report: `scratchpad/overnight/REVIEW.md`._ ### R1 — D3's decision core is exhaustively tested; the edge that feeds it is not tested at all severity: high verdict: CONFIRMED (5 demonstrated full-suite-green mutations) where: app/src/main/java/org/libremediaconverter/work/JobSnapshots.kt:31,40; app/src/main/java/org/libremediaconverter/convert/ConversionViewModel.kt:199,206 scenario: Reattachment.choose has 20 tests and every mutation aimed at it bites. But jobSnapshots() — which computes every input choose reasons over — and reattach()'s two guards have none. Demonstrated regressions the 257-test suite misses: (a) drop the empty-file filter -> a zero-byte staged file is offered as a savable result; (b) hardcode outputModifiedAt=0 -> the newest-file tie-break is never fed real data, so an arbitrary-but-stable winner recurs every launch (the exact failure the tie-break exists to prevent); (c) delete the pick-race guard -> reattachment overwrites a file the user picked while the query was suspended (no test reaches the branch); (d) treat Ambiguous as Certain -> the card labels the file with the other job's input, the "confident lie" the KDoc rejects — the Ambiguous arm is unexercised end to end. evidence: Mutations FULL-jobsnapshots-no-empty-check, FULL-jobsnapshots-zero-mtime, FULL-reattach-no-race-guard, FULL-ambiguous-job-named: all exit=0, classes=34, tests=257, failed=0. Control FULL-jobsnapshots-no-tags BITES ReattachedCleanupTest 1/3, proving the harness detects breakage in this file. Logs: scratchpad/overnight/tests/mutations.tsv, muts/M*.sh. fix: One Robolectric test driving jobSnapshots() against real WorkManager + cacheDir (zero-byte file -> outputExists=false; two files, distinct mtimes -> ordered outputModifiedAt); two ReattachedCleanupTest-style cases (pick before reattach resolves -> pick survives; two aliased SUCCEEDED jobs -> neutral "Media file" label). risk: mtime test must set timestamps explicitly (setLastModified), not rely on fs granularity. All JVM-verifiable with the existing Robolectric setup. --- **Cut:** `above` — worked autonomously overnight. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
JMR-dev commented 2026-08-23 04:52:38 +00:00 (Migrated from github.com)

Fixed in #48 (merged). Each fix is pinned by a mutation that was applied and reverted individually — the failure text is in the PR body. Suite 257 -> 276, 0 failures.

Fixed in #48 (merged). Each fix is pinned by a mutation that was applied and reverted individually — the failure text is in the PR body. Suite 257 -> 276, 0 failures.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMediaConverter#10