Skip to content

fix: defer committed inode stream reads (#115) - #117

Merged
aron-cf merged 1 commit into
node-modules-operationsfrom
fix/issue-115-1787339109
Aug 21, 2026
Merged

fix: defer committed inode stream reads (#115)#117
aron-cf merged 1 commit into
node-modules-operationsfrom
fix/issue-115-1787339109

Conversation

@agent-think

@agent-think agent-think Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Requested by @aron-cf

Closes #115

readCommittedFileByInode() in packages/dofs/src/fs/readFile.ts:159 used the default ReadableStream queue. Its high water mark lets the Workers runtime pull the first chunk while the stream is being created, so the regression test observed one blob query before its first read.

This sets the stream's high water mark to zero. Blob reads now start only when the consumer asks for data, which preserves the intended lazy behavior and is the smallest change that makes Node and Workers use the same scheduling contract.

Testing

The existing readFile.test.ts regression reproduced the Workers failure before this change and passed afterward (15 tests). npm test --workspace @cloudflare/dofs passed all 567 Node tests, npm run test:workers --workspace @cloudflare/dofs passed all 554 Workers tests, and the package build, typecheck, formatting, and lint checks passed.

Demo

No temporary deployment: this changes internal stream pull timing and has no click-visible runtime surface to demo.

🤖 generated by the pr-agent — please review carefully

ReadableStream's default queue can pull a chunk as soon as the stream is
created. Use a zero high water mark so blob reads begin only when a
consumer requests data across both supported stream runtimes.
@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: edae435

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aron-cf
aron-cf merged commit 0f0f397 into node-modules-operations Aug 21, 2026
15 checks passed
@aron-cf
aron-cf deleted the fix/issue-115-1787339109 branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant