Files
hyperframes/packages
Michael Wang a694ae477d fix(cli): transcribe replaces a link at its output names instead of writing through it (#7982)
* fix(cli): transcribe replaces a link at its output names instead of writing through it

whisper-cli now writes its JSON in a private temp folder, and the CLI puts
transcript.json in place by rename. The HeyGen engine, the SRT/VTT caption
file and the caption script patch also write by rename. A link planted at
transcript.json, transcript.srt or transcript.vtt is replaced by a regular
file, and the file it pointed to is left unchanged.

* test(cli): prove the link was replaced from file contents, not lstat

CodeQL reads an lstat followed by a read of the same path as a race. The
outside file staying unchanged while the output name holds the new
content already shows the link was replaced.

* test(cli): make a caption write fail the same way on every OS

A dangling link through a file was refused on POSIX but replaced on
Windows, where access() on it reports ENOENT and the rename takes its
place. Both are safe, so the failure-message tests now use a caption
name the disk accepts but whose temp sibling is too long.
2026-11-16 23:37:37 +00:00
..
2026-11-16 15:15:30 +00:00