Commit Graph
5 Commits
Author SHA1 Message Date
sudacode d6d541e51b fix(subsync): address PR review of track identity, tool output, and cancellation
- check the active target's source identity too (mpv reuses freed track ids)
- include device and inode in the source stamp so a retargeted symlink is caught
- reject external-engine output with no readable cues instead of installing it
- leave the user's secondary track alone if they changed it during the lookup
- reject scene-cut splits that would reorder dialogue lines
- document that full line-start agreement overrides the weak-quarter cap
- spawn ffmpeg launchers in their own process group and check aborts before
  spawning (an aborted signal hit a TDZ ReferenceError)
- cache the built-in VAD fallback under its own key so Silero is retried
- kill the tool directly when taskkill exits nonzero
2026-11-28 04:23:39 -08:00
sudacode bd3fe3140d fix(subsync): close remaining cancellation and install races from review
- treat a cancelled run as a changed session at every commit point (writes,
  delay resets, track loads, picker), so nothing lands after a media switch
- fail the secondary track load when the baseline track list cannot be read
- keep the cross-filesystem install atomic by staging next to the target
- register old temp dirs mpv still plays from so they are pruned later
- no detected speech in the combined pass means no audio reference
- start the align worker synchronously so a call cannot post to a stale worker
2026-11-28 04:02:39 -08:00
sudacode cde9362ee5 fix(subsync): address CodeRabbit review of cancellation, cleanup, and writes
- kill a tool's whole POSIX process group on cancel (orphaned children held the
  pipes open, so the run never finished); kill running groups on exit
- refuse an in-place rewrite when the subtitle changed on disk mid-sync
- pick only a freshly added track for the secondary slot, and reset its delay
  only after selecting it
- pass cancellation to the video-reference alass and ffsubsync runs, and never
  open a picker for media the user already left
- treat a failed media-path baseline read as unknown instead of null
- align worker: honor aborts during startup and finish queued calls on the
  main thread when the worker fails to start
- temp dirs: keep failed removals registered, never sweep a dir mpv still
  plays from, and clean up when writing a cleaned reference fails
- an empty cached audio result means no usable audio, as on a fresh decode
- compare external track paths case-sensitively on POSIX
- decode ffmpeg stderr as a stream; coverage lane for subtitle tests
- make the cancellation test wait for the tool to start
2026-11-28 03:53:12 -08:00
sudacode 5b39e850f6 fix(subsync): clean up temp dirs left by embedded and remote track syncs
Syncing an embedded or remote target kept its whole mkdtemp dir (original
extraction plus retimed copy) for the life of the machine. The original is now
removed right away; the dir holding the retimed file mpv loaded is retained
only while mpv lists it, pruned at the next run, removed on exit, and dirs a
crashed session left more than a day ago are swept once per process.
2026-11-28 03:34:55 -08:00
sudacode 241aab087f refactor(subsync): split the subsync service into focused modules
subsync.ts (2.4k lines) becomes a small facade over subsync-context (mpv state
and session checks), subsync-files (extract, write, reload), subsync-candidates
(reference discovery and audio), subsync-manual, subsync-auto, and
subsync-shared (deps, thresholds, formatting). Code moved verbatim; public
exports are unchanged.
2026-11-28 03:25:32 -08:00