Repository navigation
Abstract BlurtEngine from AssemblyAI behind provider seams - #398
Merged
Merged
Conversation
Collaborator
Author
|
CI status at The one remaining failure is Generated by Claude Code |
alexkroman
force-pushed
the
claude/gifted-euler-i2gjt3
branch
from
November 25, 2026 13:30
6ae9a4f to
189de4e
Compare
alexkroman
marked this pull request as ready for review
November 25, 2026 13:49
alexkroman
enabled auto-merge
November 25, 2026 13:52
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 25, 2026
alexkroman
enabled auto-merge
November 25, 2026 15:59
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 25, 2026
alexkroman
enabled auto-merge
November 25, 2026 17:36
alexkroman
force-pushed
the
claude/gifted-euler-i2gjt3
branch
from
November 25, 2026 18:52
b4b62d5 to
2f46f60
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 25, 2026
alexkroman
force-pushed
the
claude/gifted-euler-i2gjt3
branch
from
November 25, 2026 19:36
2f46f60 to
33bf0c2
Compare
alexkroman
enabled auto-merge
November 25, 2026 19:36
alexkroman
force-pushed
the
claude/gifted-euler-i2gjt3
branch
from
November 25, 2026 20:06
33bf0c2 to
aca666b
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 25, 2026
Splits the AssemblyAI integration into three library products so the SDK can be used on its own and another provider can sit beside the engine: - AssemblyAI: the pure SDK. DictationClient (streaming upload plus the 413 /v1/transcribe fallback, warm-up and metrics), SpeechClient (TTS), GatewayChatClient (LLM Gateway), the realtime, async, OAuth and key-validation clients. No Blurt code. - BlurtEngine: provider-neutral. TranscriberProtocol and TranscriberError, SpeechSynthesizing, ChatCompleting with ChatRequest and ChatReply, GatewayConnection and GatewayClient, KeyValidation, SpeechServices, LiveTurn and KeyTermList. Imports neither other module. - BlurtAssemblyAI: the adapter that applies Blurt's policy to the SDK: AssemblyAITranscriber, AssemblyAISpeechSynthesizer, AssemblyAIChat, SpeechServices.assemblyAI(), FileTranscriber, the account and sign-in code, and UserAgent. The Mac and iPhone apps import BlurtAssemblyAI where they compose the provider, and BlurtEngine everywhere else; CI's ios-build builds the BlurtAssemblyAI scheme beside BlurtEngine's. The split files follow the all-opt-in SwiftLint rules from #392. Includes Alex's simplification of the split (one key-term parser, one User-Agent stamp). Also on the iPhone: - Labels whose title can wrap use WrappingLabelStyle (BlurtDesign), so the consent sheet's disclosures, Settings' "How fast can you type?" and Home's return hint can't come out a line short at AX XXXL. - The accessibility audit's default-size "Dynamic Type unsupported" is checked rather than taken on its word (ScalingCheck): it fails only if the same text is no taller at AX XXXL, ending the CI-only misreading of Settings' last rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V4svBfswwXUrVzCKq
alexkroman
force-pushed
the
claude/gifted-euler-i2gjt3
branch
from
November 25, 2026 20:49
aca666b to
08fd609
Compare
alexkroman
enabled auto-merge
November 25, 2026 20:49
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
No content conflicts: #398 moved AssemblyAIAccount.swift into BlurtAssemblyAI, and git carried this PR's comment at the early return along with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
#398 gave the iPhone audit pass a second result, the element a default-size Dynamic Type finding is about, for its ScalingCheck. That pass and this PR's timeout retry now live together in AccessibilityAuditTests+Pass.swift (auditPass, renamed from +Timeout.swift): the merged pass in the suite's body put it over SwiftLint's 250-line type budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
One conflict, in DictationSession+Pipeline.swift: #398 renamed the too-short check's error to the provider-neutral TranscriberError on the line this PR made log against its own press. Kept both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
One conflict, in check.yml's ios-build: #398 added a second library-only simulator build, for BlurtAssemblyAI, beside the BlurtEngine one this PR removed. The iPhone app links both products, so its build in the test step compiles both (and the AssemblyAI SDK) for iOS; both separate builds go, and the job's comment and AGENTS.md say why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
#398 made BlurtEngine provider-neutral: it imports neither the AssemblyAI SDK nor BlurtAssemblyAI. This PR had put the shared cancellation rule in the SDK and imported it into the engine's router, so: - isCancellationShaped and isAbandonment move into BlurtEngine, as an internal extension (Error+Cancellation.swift). The router and the dictation pipeline, the PR's behaviour change, use them unchanged. Internal, so nothing that imports both modules (the tests, BlurtAssemblyAI) sees two definitions. - The SDK states the one rule it needs in place: #398 moved the TTS request into SpeechClient, whose catch now reads a URLError.cancelled as a stop only when its task was cancelled, as this PR's synthesizer change did. AsyncTranscriptionClient and the SDK README are main's again: this PR never changed what it retries. - ARCHITECTURE.md: main's text, with this PR's note that a dropped read fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
2 of 3 tasks
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
#421 landed as a squash of the commits this branch was built on, so git saw its RealtimeTranscriber, LiveTranscriptionSession and tests changed twice. main's copies of those three files are exactly #421's, and this branch's are #421's plus this PR's change, so they are kept from here; a plain merge would have left two start() functions in the transcriber. #398's import and TextReader lines come in unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1Vp9Andd7LBEDhGKeC
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
BlurtEngineno longer imports the AssemblyAI SDK. It reaches speech services only through provider protocols, soAssemblyAIworks as a standalone SDK and another provider (Deepgram, say) can sit beside it.AssemblyAI(the SDK, no Blurt code) takes over the generic API code that used to live in the engine:DictationClient: the streamed dictation upload, the documented/v1/transcribefallback past the live route's 120 s cap, the connection warm-up, latency logging andAssemblyAIError.SpeechClient: streaming TTS.GatewayChatClient: the LLM Gateway.BlurtEngineexposes provider seams instead:TranscriberProtocol(withTranscriberError): dictation.SpeechSynthesizing: the read-aloud voice.ChatCompleting, wrapped inGatewayConnection: every LLM client.KeyValidation: the key check behindAPIKeyModel.LiveTurn: live recording.KeyTermList: parsing the user's key terms.SpeechServicesbundles the read-aloud voice and the LLM.BlurtAssemblyAI(new target) conforms the SDK to those seams and applies Blurt's policy:AssemblyAITranscriber(prompt, key terms, cleanup instruction, rewrite mode, which transcript gets pasted).SpeechServices.assemblyAI().FileTranscriber.Both apps now link
BlurtAssemblyAI, and the Mac project is regenerated for it. The invariant gate's file exemptions,ios-typecheck.sh, CI's iOS build step and the docs follow the moved files.Rebased onto main after #392: the new and moved files follow its SwiftLint rules (one declaration per file, one argument per line once wrapped, SwiftLint's member order).
How it was tested
scripts/check.shpasses (or CI will, if I'm not on a Mac):--portablepasses locally; the Swift build, tests and the macOS-only lint run on CI.