Skip to content

Reject incomplete Gemini batch transcriptions - #8181

Open
ruben-davia wants to merge 1 commit into
fastrepl:mainfrom
ruben-davia:codex-ruben/reject-incomplete-gemini-transcripts
Open

ruben-davia wants to merge 1 commit into
fastrepl:mainfrom
ruben-davia:codex-ruben/reject-incomplete-gemini-transcripts

Conversation

@ruben-davia

@ruben-davia ruben-davia commented Nov 2, 2026 •

Copy link
Copy Markdown

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: googleapis/python-genai#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.

gemini-incomplete-regression.mp4

Verification

  • Regression reproduced without the guard: HTTP 200 with status: incomplete and valid word annotations was incorrectly accepted. The same test passes with the guard and also checks that completed remains 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.rs and git 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 warnings fails 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 --test list from ci.yaml: 90 passed, 3 failed because PowerShell (pwsh) and the root JS dependency braces are 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.

Written for commit e8560b8. Summary will update on new commits.

View guided diff

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: f6d0f79a-a1d8-406c-83a0-5a69109b606a
Commits

Reviewing files that changed from the base of the PR and between 428903e and e8560b8.

Files selected for processing: 1
  • crates/owhisper-client/src/adapter/google_generative_ai/batch.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The batch transcription handler now accepts a response only when its status is completed. It returns a provider failure for other statuses, even when the response contains transcription content. An async test covers completed and incomplete responses.

Suggested reviewers: computelesscomputer

Merge Risk: Minimal · up to e8560

Completed transcriptions remain accepted, while incomplete responses are rejected. No merge-blocking issue was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: rejecting incomplete Gemini batch transcriptions.
Description check Passed The description directly explains the change, its intent, affected behavior, regression test coverage, and validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ruben-davia
ruben-davia marked this pull request as ready for review November 2, 2026 21:30

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant