fix: stream PayloadFile uploads end-to-end (AD0007)#62
Merged
Conversation
714aa56 to
19f7281
Compare
…on/AD0007
documenting the streaming invariant: PayloadFile\nuploads must be passed
to consumers (zipfile.ZipFile, validators,\nextractors) without
materializing to a path. The previous\nmaterialize_file() helper called
AsyncFileAdapter.read() with no size\nargument, triggering
FileReaderSync.readAsArrayBuffer() against the\nentire blob, which fails
with NotReadableError above the DOM File\nAPI ~2 GiB ArrayBuffer
cap.\n\nSucceeds extraction/AD0003 (whose ownership decision —
FlowBuilder\nowns upload safety — remains correct; only the size-check
placement\nchanges).\n\nReferences eyra/feldspar PR eyra#482 for upstream
design intent and\nfeldspar/AD0003 for the PayloadFile migration whose
intent this ADR\nenforces. Closes the deprecation window for
PayloadString/WORKERFS\n(SRC compat dropped 2026-04-30).\n\nRefs:
#61\n')
…accepts PayloadFile, adds logging for Upload skipped and other diagnostic logs (Upload prompt sent, Upload received).
trbKnl
reviewed
May 1, 2026
Collaborator
There was a problem hiding this comment.
I like the ADRs in general. But I think they are a bit too verbose.
I would like them as short as possible.
trbKnl
approved these changes
May 1, 2026
Collaborator
trbKnl
left a comment
There was a problem hiding this comment.
Thanks for the quick fix.
Collaborator
|
I see the PR is directly on master, which is fine, but we go do:
|
…orcing with CI, and reduced the verbosity of the ADR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes regression introduced in 68c59d8. Restores the streaming intent of upstream PR eyra#482.
Production reproduction confirmed against next.eyra.co with a 2.5 GiB Facebook fixture (FileReaderSync NotReadableError when materialize_file calls adapter.read() with no size).
PR 1 of 3:
Fixes #61