Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 872e54dcbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await pipeline(Readable.fromWeb(body), meter, createWriteStream(partialPath), { signal }); | ||
| signal.throwIfAborted(); | ||
| await rename(partialPath, destPath); |
There was a problem hiding this comment.
Preserve existing output permissions during atomic replacement
When nonstreaming synthesis overwrites an existing 0600 output under the usual 022 umask, createWriteStream(partialPath) creates a 0644 file and rename installs those wider permissions over the destination. The previous createWriteStream(destPath) preserved the existing file's mode; a focused before/after check confirmed this regression. In a directory accessible to other users, regenerating a private recording therefore makes it readable to them without warning. Preserve the existing destination's mode on the staged file before renaming it.
Useful? React with 👍 / 👎.
Closes #309.
Nonstreaming speech synthesis first requests an audio URL, then downloads it. The download did not use the command timeout, so it could stall after receiving audio bytes. One deadline now covers both requests, including headers and the response body. A timed-out download reports exit code 5 and a structured error. Audio is staged beside its destination and replaces the destination only after a successful download, preserving ordinary POSIX permission bits when replacing an existing regular file. A failed concurrent operation cancels and awaits its local peers while preserving the original error.
Verification on macOS, Node.js 24.22.1, pnpm 10.33.2, Vite+ with 4 test workers:
--timeoutexit behavior.022, both POSIX mode regressions failed against the previous PR commit (1.59 s) and passed with this patch (1.49 s): a successful WAV replacement preserves0600and0664and writes the new bytes. The mode cases are skipped on Windows.pnpm exec vp checkpassed with two warnings in unchanged files. No live DashScope, distributedblbinary, or server-side cancellation was verified.Prepared with Codex; all provider responses used in the regressions are local fixtures.