Repository navigation
fix(server): two-step bm25 to avoid content-table JOIN restriction - #3
Merged
Merged
Conversation
…tion SQLite FTS5 bm25() fails in any query that JOINs the virtual table against a real table, even inside a subquery, when the FTS table uses content=. Fetch (rowid, score) from the FTS table alone, then resolve doc_id with a separate IN query on entries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mtib
added a commit
that referenced
this pull request
May 21, 2026
Replace Parakeet TDT 0.6B v3 (3 GB peak, not realtime on M1 Air) with three CTC-headed offline models behind the existing picker: - Parakeet TDT-CTC 110M (EN, ~99 MB) — default, best English quality - FastConformer CTC multilingual (EN/DE/ES/FR, ~98 MB) — adds German - Moonshine Tiny (EN, ~45 MB) — kept as lightest fallback Both new models settle at ~630 MB RSS with mic + system active; ~4 s load time under CoreML. Settings migrates the stored "parakeet" value. Pipeline: when system audio is voiced, the mic stream is now fully gated — no resample, no VAD, no decode. Mic VAD is flushed on gate entry so any open segment closes cleanly. The single shared recognizer (NSLock) is unchanged. Also tightened VAD buffer compaction (after every drain). Quit UX: applicationShouldTerminate now returns .terminateLater and drains on a detached task, replying once flush completes. MenuBarController gets beginQuitTransition() to dim the status item and freeze the label. Measured quit on a running pipeline: 0.74 s (was up to 5 s of frozen UI). Cleanup: delete the orphaned RNNoise wrapper, DenoisingAudioSource, and vendored CRNNoise target — Pipeline never wired them in. CLAUDE.md: refreshed architecture diagram and model table, documented NSString lifetime across C calls (bite #3) and why the 0.6B was dropped (bite #2).
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.
Problem
bm25()fails withunable to use function bm25 in the requested contextwhenever the FTS5 virtual table is joined against a real table — even inside a subquery — when the FTS table usescontent=.Fix
Fetch
(rowid, score)fromentries_ftsalone first, then resolvedoc_idwith a separateINquery onentries. Two round-trips, but avoids the SQLite restriction entirely.