Reliability hardening: fix F-001, F-002, silent recording retention, CI security - #69
Conversation
… restore timing on it
…us immediately before keystroke
…tterances (F-002)
… fix caseless uppercase bug Update test_apply_custom_words_ngram_two_words to terminate at the replacement boundary. Its previous substring-only assertion accepted a greedy three-word replacement that consumed che and its comma, so it encoded corrupting behavior instead of the intended two-word correction.
…/unparseable envelopes to raw
…ilure, not silence
…silent truncation
…utput falls back to raw when speech observed
Disabled because untrusted PR code cannot safely reuse the privileged build workflow.
Require the exact ci-required context through branch rules so the policy check reports the live ruleset gap instead of querying the legacy branch-protection endpoint. Add one path-filter-free Windows PR gate for backend checks and lib tests, frontend lint/typecheck/build, and deterministic Specta binding verification. The bindings exporter receives the common-controls manifest after linking, limiting the workaround to that executable and preserving the default Cargo test wrapper.
The pull_request event builds the test merge commit (PR head merged into main), so a green PR already validated both jobs against main. The main ruleset has strict=false and this is a solo repo, so a post-merge rerun is near-pure duplication — and native-backend is the priciest job (macOS 10x + Windows 2x whisper.cpp native compile). code-quality stays the required check gating main; nix-check (packaging) and main-build (artifacts) are unchanged. Direct pushes to main are lint-gated only — open a PR for native + test coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50f8ff3ff8
ℹ️ 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".
| None | ||
| match selected_language { | ||
| "" | "auto" => None, | ||
| language => Some(language.to_string()), |
There was a problem hiding this comment.
Normalize Chinese variants before passing Whisper hints
When the user locks dictation to Simplified or Traditional Chinese, selected_language is zh-Hans/zh-Hant and validate_selected_language accepts those because the Whisper catalog advertises them, but this new hint passes the raw BCP variant straight into Whisper. The provider already has normalize_language_for_engine() because the engine expects zh, so locked Chinese dictation can fail or lose the intended language lock after this change; return the normalized code here instead of language.to_string().
Useful? React with 👍 / 👎.
Before Submitting This PR
Please confirm you have done the following:
Human Written Description
I kept hitting reliability problems in real use — the push-to-talk toggle would stop working after the first dictation, locking a language sometimes produced nothing at all, and every so often a whole transcription just vanished at paste time with no error. Rather than patch each symptom, I ran a full audit of the pipeline and worked through the fragile spots end to end: capture, transcription, the language handling, the last-mile paste, the audio device layer, and the history/privacy path. This matters because a dictation tool that silently loses your words — or silently keeps a "deleted" recording on disk — is worse than one that fails loudly, and those silent failures were the pattern underneath most of the bugs.
Related Issues/Discussions
Bug-fix work (top priority per CONTRIBUTING). Addresses the internally-tracked F-001 (toggle-stop drops after the first cycle) and F-002 (locked-language dictation withheld/mistranscribed), plus a full-codebase assessment that surfaced two P0s (silent recording retention; an over-privileged manual CI build lane) and a weak merge gate.
Fixes #
Discussion:
Testing
Every change is TDD'd (test-first, red→green) and the full Rust library suite passes (645/645). Beyond unit tests, each area was device-verified on a real Windows machine with synthetic audio (VB-CABLE + SAPI TTS), reading ground truth from the history DB and app logs rather than trusting the UI:
Screenshots/Videos (if applicable)
N/A (backend/reliability changes).
AI Assistance
If AI was used:
What's in this PR (reliability train, reviewed commit-by-commit)
ci-requiredPR gate that actually builds + tests the app, and trimmed redundant push-to-main CI runs.🤖 Generated with Claude Code