Skip to content

test(upload): cover the upload coordinator and serve byte ranges of staged uploads - #936

Merged
butonic merged 3 commits into
workpackagesfrom
port-715
Nov 4, 2026
Merged

butonic merged 3 commits into
workpackagesfrom
port-715

Conversation

@butonic

@butonic butonic commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

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?
  • the Range handling in tus_adapter.go

Review 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.

@butonic butonic changed the title port the upload coordinator specs test(upload): cover the upload coordinator and serve byte ranges of staged uploads Nov 3, 2026
@butonic
butonic force-pushed the port-715 branch 2 times, most recently from def1bc3 to d986c54 Compare November 3, 2026 23:01
Base automatically changed from port-714 to workpackages November 4, 2026 06:11
f-firas and others added 3 commits November 4, 2026 07:11
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]>
@butonic
butonic merged commit 915387d into workpackages Nov 4, 2026
19 checks passed
@butonic
butonic deleted the port-715 branch November 4, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Maintenance E.g. technical debt, packaging, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants