Commit 8df59ba
committed
codex reader: propagate read_until I/O errors
Address review feedback on #372: the codex streaming loop was
swallowing `read_until` failures via `Err(_) => break`, which would
silently truncate the parse at a transient mid-file read error and
advance the resume cursor as if the bytes had been processed. The
claude.rs equivalents already use `?` to propagate.
Bubble the error by changing `parse_codex_buffer` to return
`std::io::Result<ParseCodexIncrementalResult>` and using `?` in the
loop, matching `parse_codex_session_incremental`'s outer signature.1 parent ab56ca6 commit 8df59ba
1 file changed
Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 199 | + | |
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
| |||
339 | 334 | | |
340 | 335 | | |
341 | 336 | | |
342 | | - | |
| 337 | + | |
343 | 338 | | |
344 | 339 | | |
345 | 340 | | |
| |||
395 | 390 | | |
396 | 391 | | |
397 | 392 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
403 | 397 | | |
404 | 398 | | |
405 | 399 | | |
| |||
1209 | 1203 | | |
1210 | 1204 | | |
1211 | 1205 | | |
1212 | | - | |
| 1206 | + | |
1213 | 1207 | | |
1214 | 1208 | | |
1215 | 1209 | | |
| |||
1218 | 1212 | | |
1219 | 1213 | | |
1220 | 1214 | | |
1221 | | - | |
| 1215 | + | |
1222 | 1216 | | |
1223 | 1217 | | |
1224 | 1218 | | |
| |||
0 commit comments