Skip to content

fix: backlog cleanup batch 3 — reproducibility, dead code, stop-timeout truth (stacked on #59)#60

Merged
m-szymanska merged 19 commits into
developfrom
fix/backlog-batch-3
Jul 10, 2026
Merged

fix: backlog cleanup batch 3 — reproducibility, dead code, stop-timeout truth (stacked on #59)#60
m-szymanska merged 19 commits into
developfrom
fix/backlog-batch-3

Conversation

@m-szymanska

Copy link
Copy Markdown
Contributor

Third and final batch of the quality-recon backlog cleanup (report 2026-07-09). Stacked on #59 — merge order: #58#59 → this one. GitHub will retarget the base after each merge.

Changes

  • 56d3a9f fix(bench): bench-stt.sh defaults to the reproducible repo corpus (tests/assets), removes the hidden auto fallback to the private local corpus, adds --list-fixtures smoke and stamps fixture_source into every report. Determinism proven: identical report SHA with empty vs normal $HOME.
  • 3615c73 chore(vad): remove dead Silero install path — ensure_downloaded_to_user_dir, download_silero_vad, SILERO_VAD_URL (loctree impact: zero consumers; model has been embedded since the Candle migration). user_model_path stays (live test consumer).
  • 4282b52 fix(controller): stop-timeout warnings derive from STOP_TIMEOUT.as_secs() instead of a hard-coded "45s" literal (message + comments; zero logic changes).
  • 72da7e7 chore(controller): remove unused VAD trigger accessors is_vad_triggered/clear_vad_triggered (zero callers, verified before and after).

EXT-1 audit (no code change — closed by evidence)

Falsification audit of the Busy state after #55/#56: both entries into State::Busy (toggle final-pass and hold/external finish) are wrapped in timeout(STOP_TIMEOUT, ...) with recover_from_stuck_stop() as the escape hatch, and both the normal and recovery paths end in reset_finished_recording_state()reset_session_fields(). No path into Busy without a guaranteed exit exists; the earlier recon claim that recovery bypasses session-field reset is no longer true on current code.

Gates

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace — all green on final HEAD; bash -n + shellcheck clean for the bench script.

🤖 Generated with Claude Code

- Observe one-shot Settings deep-link changes while the window is already open
- Share a single SettingsView consumption path for appear and focus-time updates
- Clear pending targets only after a real target is consumed to avoid replay loops
- Use the time-indexed SpeechTranscriber preset and emit bridge segments from audioTimeRange attributes.
- Map bridge segment fixtures into RawTranscript with validation before downstream pipeline use.
- Cover the Apple segment path with a Rust fixture that reaches the Silero tail-drop filter.
…ing state

- Route composer dictation listener engine errors back to the main adapter.

- Report active engine failures through AgentChatStore so the composer leaves .recording.

- Release a stale dictationBlocked flag on the terminal composer error path.

- Keep successful stop-and-insert dictation flow unchanged.
- Wrap remaining SwiftUI #Preview blocks in debug-only compilation guards

- Match the existing guarded preview pattern without changing runtime code

- Keep batch scope limited to macOS Swift preview guard lines
- Keep full raw Whisper text when Silero did not drop segments but segment text is a strict subset
- Reduce decoder control-token suppression from 16 generated tokens to the pre-first-token guard
- Add focused regression tests for Silero text preservation and short utterance termination
- Avoid pre-commit hook side effects by committing only the STT engine file
- Confine config-owned process env seeding behind a bootstrap gate

- Persist runtime settings updates to settings/json env stores without set_var

- Read bridge settings snapshots from persisted stores instead of live env side effects

- Update lifecycle tests for the single-writer env contract
- Run Commit requests before Live requests at Critical thermal level.

- Keep Live requests throttled at Critical while preserving coalescing behavior.

- Deregister scheduler senders on shutdown and drop to prevent registry growth.

- Add scheduler tests for Critical thermal priority and registry cleanup.
Save migrated Keychain secrets before writing the settings.json completion sentinel.\n\n- Return early on migrated secret persistence failure so startup retries migration\n- Add a test-only save_key failure injector without changing the env registry\n- Cover retry success and one-time completion behavior for migrated API keys
Convert account auth runtime creation into a bridge Config error instead of panicking.\n\n- Propagate runtime initialization failure through start_account_login\n- Preserve the existing CsError contract for Swift callers\n- Keep account login server failures on the existing account_auth_to_cs path
- Default STT bench fixture selection to repo assets so bare runs ignore private ~/.codescribe corpora.

- Keep historical corpora available only through explicit --fixtures historical.

- Add --list-fixtures for deterministic no-model fixture-selection smoke checks.

- Stamp fixture_source in both honest failure reports and full benchmark reports.
- Remove the unused async downloader API and its private download helper.

- Drop the stale Silero VAD URL export while keeping legacy path helpers used by tests.

- Keep core/vad/mod.rs changes limited to the install re-export surface.
…onstant

- Replace the stale 45s Busy warning with STOP_TIMEOUT.as_secs().
- Remove stale 45s references from nearby watchdog comments.
- Keep timeout behavior unchanged; only message/comment text changed.
- Remove dead public VAD trigger helpers from RecordingController.\n- Confirmed both identifiers had zero callsites with loct literal scans.\n- Keep Busy watchdog behavior unchanged after EXT-1 falsification.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request cleans up unused VAD (Voice Activity Detection) functionality, including removing the Silero VAD model downloader and unused controller methods, and refactors the STT benchmarking script. Specifically, the auto fixture mode has been removed from bench-stt.sh in favor of explicit repo or historical modes, a new --list-fixtures option has been introduced, and report generation now includes fixture source metadata. Additionally, hardcoded timeout references in the recording controller have been replaced with the dynamic STOP_TIMEOUT constant. There are no review comments, so we have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

vetcoders-agents and others added 6 commits July 9, 2026 23:16
- Clamp partially overlapping Apple STT segment starts to the previous end instead of dropping words.

- Keep fully contained or invalid segments filtered out.

- Preserve monotonic finite segment timestamps for downstream timeline consumers.
- Preserve raw Whisper text when Silero keeps all segments and only case or punctuation differs.

- Keep strict-subset preservation for no-drop segment text while retaining filtered fallback for real drops.

- Add regression coverage for no-drop equivalence and dropped-segment fallback.
- Post pendingSectionDidChange only when a real pending Settings section is set.

- Keep consume() as the one-shot clear path without triggering duplicate navigation.

- Preserve the existing SettingsView receiver contract for non-nil deep links.
- Replace the empty debug CARGO_FLAGS array with explicit debug/release cargo build branches.

- Keep make app behavior unchanged while making bash nounset safe on macOS.

- Unblock the required Swift app quality gate for debug builds.
@m-szymanska m-szymanska changed the base branch from fix/backlog-batch-2 to develop July 10, 2026 08:04
@m-szymanska m-szymanska reopened this Jul 10, 2026
@m-szymanska m-szymanska merged commit 4c7600c into develop Jul 10, 2026
3 checks passed
@m-szymanska m-szymanska deleted the fix/backlog-batch-3 branch July 10, 2026 08:21
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