Skip to content

[bug-hunter] Preserve stopped dictation audio#1547

Closed
r3dbars wants to merge 8 commits into
mainfrom
codex/durable-dictation-audio
Closed

[bug-hunter] Preserve stopped dictation audio#1547
r3dbars wants to merge 8 commits into
mainfrom
codex/durable-dictation-audio

Conversation

@r3dbars

@r3dbars r3dbars commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • checkpoint stopped dictation samples as an owner-only WAV before model loading or transcription
  • discover pending audio after relaunch and give the user a direct recovery path
  • preserve the checkpoint on model, save, cancellation-timeout, and termination failures
  • remove it only after successful transcript persistence or explicit discard

Proof

  • bash build-deps.sh --force
  • bash build.sh --no-open
  • TRANSCRIPTED_DISABLE_FILE_LOGGER=1 bash run-tests.sh (13,211 passed)
  • focused stopped-audio recovery tests (20 passed before final timeout assertion)
  • git diff --check

Manual boundary

Real microphone capture, app restart, Finder reveal, and Home import were not exercised. Imported recovery WAVs remain until explicitly deleted because the import pipeline has no safe completion callback in this scope.

@r3dbars

r3dbars commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Exact-head repair pushed at 8949db3b.

Fixed the review findings and the follow-on lifecycle issues found during independent review:

  • revalidate cancellation/session ownership after resampling and before/after detached persistence
  • sort all discovered recoveries newest-first before applying the limit
  • keep WAV encoding and disk I/O off the main actor and reuse the prepared snapshot for inference
  • retain recoveries across external-model/import failures, retire them after a successful Home import, and clear ownership on cancel
  • shield and await checkpoint durability during app termination so quit-time cancellation cannot delete or skip the recovery WAV

Proof:

  • focused stopped-audio recovery suite: 35/35 passed
  • full fast suite: 13,225/13,225 passed
  • Swift parse + git diff --check: passed
  • app build + integration smoke + focused package tests: passed in the final review run
  • final codex review --base origin/main: clean, no actionable correctness issues
  • independent Claude risk review: clean (/Users/redbars/.codex/maestro/runs/20260717T115249Z-fix1547-risk-review-claude)

Keeping this PR as a draft until the real mic -> quit/relaunch -> Finder/Home recovery flow is manually proven. Fresh CI is now running on the repaired head.

@r3dbars

r3dbars commented Jul 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by current-main replacement #1570, now merged as 2f8e01e after focused stopped-audio proof and hosted checks.

@r3dbars r3dbars closed this Jul 18, 2026
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