Reject incomplete Gemini batch transcriptions
Summary
Intent: Gemini can return HTTP 200 with partial text and an incomplete interaction status, which Anarlog currently accepts as success. Require completed before returning a transcript so partial provider output follows the existing error path and the user can retry.
Found while investigating a truncated recording on desktop 1.4.34. The original provider response was not retained, so this does not claim to establish that recording's root cause. Related provider report: https://github.com/googleapis/python-genai/issues/2923.
Missing or non-completed statuses fail closed. Completed responses retain the existing conversion behavior; no automatic retries are added.
Demo
Replay of actual local regression-test results before and after the guard, using a synthetic HTTP response and repository test audio. No private meeting content or live provider call.
https://github.com/user-attachments/assets/063de722-9633-42ea-a8f6-e6e3d7150f1a
Verification
- Regression reproduced without the guard: HTTP 200 with
status: incompleteand valid word annotations was incorrectly accepted. The same test passes with the guard and also checks thatcompletedremains accepted. cargo test --locked -p owhisper-client --lib: 302 passed, 8 existing ignored tests.cargo check --locked -p owhisper-client: passed.rustfmt --edition 2024 --check crates/owhisper-client/src/adapter/google_generative_ai/batch.rsandgit diff --check: passed.- Both license-boundary Python checks: passed (9 tests).
Broader check limitations
cargo clippy --locked -p owhisper-client --all-targets --no-deps -- -D warningsfails on existing diagnostics. Re-running the same command on the unchanged base produces the same error diagnostics (10 for the library, 40 for library tests).- The complete
node --testlist fromci.yaml: 90 passed, 3 failed because PowerShell (pwsh) and the root JS dependencybracesare unavailable in this checkout. - Authenticated
uvx zizmor --format sarif .completed and reported 337 findings in unchanged workflows/actions. This PR changes no workflow files. - Full desktop/native workspace builds and live Gemini transcription were not run.
Summary by cubic
Rejects incomplete Gemini batch transcription responses so partial output is no longer treated as a successful transcript.
Gemini can return HTTP 200 with text and an incomplete interaction status, which was previously accepted. The adapter now requires the status to be completed before returning a transcript; missing or non-completed statuses fail with a provider error so the user can retry. Completed responses keep the existing conversion behavior, and no automatic retries are added. Adds a regression test covering both accepted and rejected statuses.