Repository navigation
Commit be292a0
merge(harden/407): keep audio recordings when permission denies fsync
origin/harden/407-audio-fsync-permission e927412 is one commit that is not on main. Since Node 26.9.0, FileHandle.sync() throws ERR_ACCESS_DENIED whenever the Permission Model is on (nodejs/node#65431). AudioRecorder treated that as a finalize failure, so every recording under --permission was discarded.
Finalize now catches only ERR_ACCESS_DENIED from sync() and still closes the handle. Any other sync error, including the injected EIO case, still fails finalize, removes the temp file, and leaves the destination untouched. The denied path stops cleanly, writes the PCM16 WAV, and leaves the fd at -1. The audio-capture doc says that on Node.js 26.9.0 or later with --permission the file is not forced to disk before the rename. Issue 407.
Merge-tree 690ba0c is clean, 0 path deletions, 3 files changed, 21 insertions(+), 10 deletions(-) across 3 files.
Files: packages/core/src/audio.ts, packages/core/src/tests/audio.test.ts, packages/web/src/content/docs/application-apis/audio-capture.mdx.
The OpenAI File Downloader user-agent lines stay in AGENTS.md and packages/web/AGENTS.md.
The harden ref is left in place. anomalyco/opentui is not pushed.
Co-Authored-By: Claude <[email protected]>3 files changed
Lines changed: 21 additions & 10 deletions
File tree
- packages
- core/src
- tests
- web/src/content/docs/application-apis
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
2522 | | - | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
2523 | 2526 | | |
2524 | 2527 | | |
2525 | 2528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2104 | 2104 | | |
2105 | 2105 | | |
2106 | 2106 | | |
2107 | | - | |
| 2107 | + | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | 2110 | | |
| |||
2113 | 2113 | | |
2114 | 2114 | | |
2115 | 2115 | | |
2116 | | - | |
2117 | 2116 | | |
2118 | 2117 | | |
2119 | 2118 | | |
| 2119 | + | |
2120 | 2120 | | |
2121 | 2121 | | |
2122 | | - | |
| 2122 | + | |
| 2123 | + | |
2123 | 2124 | | |
2124 | 2125 | | |
2125 | 2126 | | |
2126 | | - | |
2127 | | - | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
2128 | 2131 | | |
2129 | 2132 | | |
2130 | 2133 | | |
| |||
2134 | 2137 | | |
2135 | 2138 | | |
2136 | 2139 | | |
2137 | | - | |
2138 | | - | |
2139 | | - | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
2140 | 2146 | | |
| 2147 | + | |
2141 | 2148 | | |
2142 | 2149 | | |
2143 | | - | |
2144 | 2150 | | |
2145 | 2151 | | |
2146 | 2152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
| |||
0 commit comments