fix: retry mismatched translation batches in halves #276

Merged
naps62-yolo merged 1 commits from fix/split-mismatched-batches into main 2026-11-10 22:04:22 +00:00
Owner

Requested by naps

A translation batch whose reply has the wrong cue count or numbering is now split in half and both halves are sent again, up to four times (down to 1/16 of the batch), before the translation fails. A mismatched reply is still never accepted. This covers both manual translations and the reconcile loop, since both go through arr_subs::translate::translate.

Worst case for a backend that mangles every reply is 31 requests per batch instead of 1.

Why

qwen-14b on the local llama server returned 145 cues for a 139-cue batch, failing a Coyote vs. Acme translation after 7.5 minutes. On a 59-cue batch it kept count.

Verification

just ci passes (830 tests). New tests cover a batch that only answers correctly at 2 cues (8 → 4 → 2, cues stay in order) and the split limit.

🤖 Generated with Claude Code

<!-- claude-projects-attribution: {"github_login":"naps62"} --> _Requested by **naps**_ A translation batch whose reply has the wrong cue count or numbering is now split in half and both halves are sent again, up to four times (down to 1/16 of the batch), before the translation fails. A mismatched reply is still never accepted. This covers both manual translations and the reconcile loop, since both go through `arr_subs::translate::translate`. Worst case for a backend that mangles every reply is 31 requests per batch instead of 1. <details><summary>Why</summary> qwen-14b on the local llama server returned 145 cues for a 139-cue batch, failing a Coyote vs. Acme translation after 7.5 minutes. On a 59-cue batch it kept count. </details> <details><summary>Verification</summary> `just ci` passes (830 tests). New tests cover a batch that only answers correctly at 2 cues (8 → 4 → 2, cues stay in order) and the split limit. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
naps62-yolo added 1 commit 2026-11-10 21:05:31 +00:00
fix: retry mismatched translation batches in halves
ci / web (pull_request) Successful in 25s
e2e / e2e (pull_request) Failing after 48s
ci / rust (pull_request) Successful in 1m35s
ci / image (pull_request) Skipped
157515a9b8
qwen-14b returned 145 cues for a 139-cue batch and failed a whole movie
after 7.5 minutes. A mismatched reply is still never accepted, but the
batch is now halved and resent, up to four times, before giving up.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
naps62-yolo merged commit 15f4b4a7cb into main 2026-11-10 22:04:22 +00:00
naps62-yolo deleted branch fix/split-mismatched-batches 2026-11-10 22:04:22 +00:00
Sign in to join this conversation.