Skip to content

fix: reliability batch 0A — secure-field capture, durable dictionary writes, language-correct filler cleanup - #78

Merged
GalaxyRuler merged 7 commits into
mainfrom
codex/reliability-batch-0a
Jul 20, 2026
Merged

fix: reliability batch 0A — secure-field capture, durable dictionary writes, language-correct filler cleanup#78
GalaxyRuler merged 7 commits into
mainfrom
codex/reliability-batch-0a

Conversation

@GalaxyRuler

Copy link
Copy Markdown
Owner

Before Submitting This PR

Please confirm you have done the following:

Human Written Description

I ran a deep three-round adversarial audit of the dictionary, context-awareness, and language pillars and this is the first containment batch from it: seven bounded reliability fixes, no new features. The ones I care most about are the privacy fix (selected-text transforms could read password fields on all three platforms) and the two that silently corrupt bilingual usage — filler cleanup keyed to the UI language instead of the dictation language, and Android applying dictionary entries the user had quarantined.

Related Issues/Discussions

Fixes # — internal reliability audit findings (no public issue filed)
Discussion: —

What's in the batch

  1. Selected-text transforms fail closed on secure fields (Win/mac/Linux) — password/secure check runs before any text read; error while checking = secure. New stable reason codes secure_field / secure_check_error, localized toast on the shortcut path.
  2. Adaptive reprocess blocked in private sessions — gate is the first side-effecting decision (private_session_active).
  3. UTF-8-safe punctuation extraction — byte-index panic on Arabic/emoji fixed via char_indices.
  4. Android formatter integrity — snapshot now serializes only active dictionary entries; startup no longer overwrites the on-device snapshot with empty/failed store loads.
  5. Ambiguous dictionary-ID mutations rejected — duplicate persisted IDs can no longer cause delete-one-deletes-all (ambiguous_entry_id); migration comes in the next batch.
  6. Durable dictionary writes — new fallible locked+forced-save settings writer; commands and the post-paste learner report success and emit events only after the value is persisted (rollback on save failure).
  7. Filler cleanup keyed to validated dictation language — English filler lists no longer applied to Arabic/other dictation; auto/multilingual modes skip language-default fillers; explicit custom fillers always apply.

Testing

  • Full Rust suite: 727 passed, 0 failed (run twice — implementation session and an independent review session).
  • tsc, ESLint, Prettier, cargo fmt --check, translation completeness (869 keys × 19 locales), Bun unit tests for the Android snapshot module: all pass.
  • Windows device verification: probe against a live UIA password box returns secure_field before any text read; normal editable field still captures. mac/Linux and Android on-device checks are listed as follow-up debt.

Screenshots/Videos (if applicable)

AI Assistance

  • No AI was used in this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Codex (implementation), Claude Code (audit, adversarial review rounds, code review, device verification)
  • How extensively: implementation and review were AI-driven end to end from a human-approved hardening plan; every item was code-reviewed against spec and the security item was device-verified on Windows before push

🤖 Generated with Claude Code

@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: c53f45510e

ℹ️ 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 +1375 to +1379
let final_result = apply_local_text_transforms(
result.text,
&settings,
is_whisper,
effective_language.as_deref(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the output language for translated cleanup

When translate_to_english is enabled, result.text is already English, but this call still passes effective_language derived from the selected source language (or None in auto mode) into filter_transcription_output and the adaptive cleanup path. In translated dictation from auto or any locked non-English language, default English filler removal is skipped, so the new language-correct cleanup regresses translated output; derive the cleanup language from result.translated/the translation target before applying local transforms.

Useful? React with 👍 / 👎.

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