Files
Lumotia/docs/issues/native-capture-worker-join.md
Jake 592b894790 docs(cr-2026-04-22): add release-blocker issue tracker at docs/issues/
Captures the 12 items from docs/code-review-2026-04-22.md that
must land before v0.1 ships. One markdown file per issue with:
severity, path:line, problem description, acceptance criteria,
fix scope, and dependency graph.

Split by severity:
- 3 CRITICAL: live-session race, migration atomicity, transcript-
  profile FK
- 9 MAJOR: monolith refactor, channel-fatality, capture worker
  join, runtime capabilities, macOS App Nap, decoder error prop,
  LLM prompt preflight, keystore thread-safety, hotkey device
  filter

README.md indexes them with a fix-order dependency graph and a
fish-shell script for bulk-converting to GitHub issues once `gh`
CLI is installed and authed. Deferred step by user decision —
markdown tracker is authoritative until then.
2026-04-22 09:46:08 +01:00

1.2 KiB

RB-06 MAJOR: native capture worker is detached, can outlive stop/start

Severity: MAJOR Path: src-tauri/src/commands/audio.rs:46-228 Source: 2026-04-22 code review Labels: release-blocker, major, concurrency, audio

Problem

start_native_capture and stop_native_capture coordinate through a channel but never retain the spawned worker handle. A previous capture can still be flushing / appending after stop_native_capture clears all_samples and before a new start_native_capture takes it — output can be truncated or contaminated with cross-session samples.

Acceptance

  • Store the worker's JoinHandle in the native capture state.
  • stop_native_capture awaits the handle before returning — start/stop/start is fully serialised.
  • Regression test: rapid start → stop → start sequence produces two distinct samples vectors with no cross-session leakage.

Fix scope

Medium. Requires adding JoinHandle storage and making the stop path await cleanly — probably needs a small refactor of the native capture state struct.

Dependencies

  • Independent of other items, though the fix pattern (retain handles, join on stop) mirrors what RB-04 will do for the live-session worker.