Repository navigation
fix(process): honor cancellation at bounded file read completion - #8908
Conversation
Codex Review SummaryThis 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] This PR appears safe to merge; no actionable issues were found. Summary
Reviews (1) · Last reviewed commit: "fix(process): honor cancellation at boun..." · Reviewed by Greptile |
|
Both CI and author readiness are now passing on current head |
Problem
readBoundedFileBytesreturns an empty success for an already-aborted zero-byte expected read. It also returns success or overflow when cancellation arrives during the final asynchronous read, because cancellation is checked only before I/O.Changes
Check the caller's abort signal after option validation and after each successful read, before interpreting EOF, expected-size completion, or overflow. Preserve the caller's exact abort reason and existing
cancellationFailuremapping. The caller continues to own and close the file handle.This fixes the shared file-read boundary without changing the admitted byte limit or expected-size read semantics.
Validation
tests/boundary/filesystem/boundedFileBytes.test.ts: 10 passed on Node 24.22.1 / Vitest 5.0.3, with a focused external test configuration.git diff --checkpassed.The full project checks and provider workflows were not run.
Author readiness
Human owner: @Afloat16