Skip to content

Fix long Fluid-1 dictation fallback - #902

Merged
altic-dev merged 3 commits into
mainfrom
B/fix-long-dictation-fallback
Aug 26, 2026
Merged

altic-dev merged 3 commits into
mainfrom
B/fix-long-dictation-fallback

Conversation

@altic-dev

Copy link
Copy Markdown
Owner

Description

Prevents long Fluid-1 dictations from silently returning truncated model output when the transcript cannot fit alongside a complete response.

The private-AI path now checks context headroom before generation. When the full transcript cannot be preserved, it throws into FluidVoice's existing raw-transcript fallback, notification, and history-error path.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #899

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 27.0 (26A5368g)
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally: focused long-dictation token-budget and provider-short-circuit tests (2 passed)

Additional validation:

  • Private FI build installed and launched successfully.
  • Deep code-sign verification passed.
  • Installed app health endpoint returned version 1.6.10.
  • A real 623-word history transcript at the minimum 2,048-token context triggered the overflow guard before generation.

Screenshots / Video

  • No UI/visual changes; screenshots/video are not applicable.

Notes

The budget check is intentionally conservative near the context boundary: preserving the complete raw transcript is preferred over risking silently truncated output.

Reject dictation before generation when the context window cannot preserve the full transcript, allowing the existing raw-transcript fallback and notification path to run.

Fixes #899
@greptile-apps

greptile-apps Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR prevents long Fluid-1 dictations from reaching generation without sufficient context headroom, routing them through the existing raw-transcript fallback instead.

  • Adds a conservative word- and UTF-8-based input-token estimate.
  • Rejects over-budget private-AI dictation before provider invocation.
  • Adds focused coverage for long prose, dense identifiers, and unspaced CJK input.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (3): Last reviewed commit: "test split dictation budget coverage" | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15b10ba8c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

FluidVoice PR build ready

Download FluidVoice-PR-902-268fa8b9cc80

The artifact contains the ad-hoc-signed app ZIP, Xcode archive, build manifest, and installation instructions. It expires 5 days after the build.

Install the app

  1. Extract the downloaded artifact, then extract FluidVoice-PR-902.app.zip.

  2. Move FluidVoice Fix long Fluid-1 dictation fallback #902.app into the /Applications folder.

  3. Open Terminal and remove the download quarantine marker:

    xattr -dr com.apple.quarantine "/Applications/FluidVoice #902.app"
    
  4. In Applications, Control-click FluidVoice Fix long Fluid-1 dictation fallback #902.app and choose Open.

  5. If macOS still blocks it, open System Settings → Privacy & Security, click Open Anyway, and confirm.

This build has its own app identity, so its permissions are separate from the release version of FluidVoice.

View workflow run

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7209d07c89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +92 to +96
if byteCount > Self.privateAIDenseSegmentByteThreshold {
estimate += (byteCount + Self.privateAIDenseBytesPerToken - 1)
/ Self.privateAIDenseBytesPerToken
} else {
estimate += 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Account for token-dense short segments

When a long transcript contains many token-dense segments of 12 bytes or fewer—for example, space-separated short IDs, hashes, or codes—this branch charges every segment as exactly one token even though each may tokenize into several tokens. The newly added threshold is fresh evidence that the earlier overflow case remains for segmented identifiers: at a 4K context, hundreds of such segments can pass hasSufficientHeadroom while the real prompt exceeds the window, again risking truncated output. Apply the conservative byte/token estimate to every segment (or use the model tokenizer) rather than exempting short ones.

Useful? React with 👍 / 👎.

@altic-dev
altic-dev merged commit 197672f into main Aug 26, 2026
6 checks passed
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.

[BUG] Long dictation exceeding context window silently truncates output mid-sentence instead of notifying or falling back to raw ASR

1 participant