Repository navigation
test(upload): cover the upload coordinator and serve byte ranges of staged uploads - #936
Merged
Merged
Conversation
dragonchaser
approved these changes
Nov 3, 2026
dragonchaser
approved these changes
Nov 3, 2026
butonic
force-pushed
the
port-715
branch
2 times, most recently
from
November 3, 2026 23:01
def1bc3 to
d986c54
Compare
The fake driver's TouchFile and Delete only return an error, as ours do; the coordinator reads the touched node back through GetMD.
The processing filter follows the session status, so the spec sets it instead of relying on all bytes having arrived. A new spec checks that a session handed to postprocessing is persisted as processing. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Antivirus downloads only the first bytes of a file larger than its scan size, with a Range header. The decomposedfs upload sessions served the staged bytes as a tus content server for that; the coordinator did not, so tusd sent the whole file and a file with a virus past the scan size got scanned and deleted anyway. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
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.
Part of the upload coordinator stack, see #934.
Specs for the coordinator (initiate, PUT, TUS, events, metrics) and the session status, plus a fake driver to run them against. The one production change: staged uploads are served with byte range support again. Antivirus only reads the first bytes of a file larger than its scan size, and without a Range-aware content server it scanned (and deleted) the whole file.
Review focus:
fakefs_test.go: does the fake behave like the real drivers where it matters?tus_adapter.goReview commit by commit: the first commit is the generic change, the following ones adapt the pkg decomposedfs fork and posix.
stacked on #935
Assisted by Claude Code (claude-opus-5-5): it adapted the changes, split them into this stack and wrote this description.