Skip to content

Add generated TUS protocol canary#6

Draft
kvz wants to merge 72 commits into
masterfrom
tus-gen
Draft

Add generated TUS protocol canary#6
kvz wants to merge 72 commits into
masterfrom
tus-gen

Conversation

@kvz
Copy link
Copy Markdown
Member

@kvz kvz commented May 26, 2026

Experimental Status

Experimental work: this PR is part of an exploratory contract/generated docs and SDK effort, and is intentionally kept as a Draft while the approach is validated.

Why

This adds the first generated island for the API2-owned TUS protocol client generator in tus-go-client. The goal is to prove that a non-TypeScript TUS client can consume the same raw protocol + feature-layer contract as tus-js-client without duplicating endpoint/header/status knowledge in the generator.

What

  • Add generated protocol_generated.go with the default Tus-Resumable wire version.
  • Add generated protocol_contract_generated_test.go with TUS wire operations, response shapes, and client feature metadata.
  • Use the generated default protocol version in NewClient without changing behavior.
  • Add a real create+patch lifecycle test that drives Client.CreateUpload and UploadStream.Write from generated contract facts.

Verification

  • go test ./...
  • From API2: api2/bin/cli.ts contracts tus-sdks --platform go --sdk-root ../tus-go-client --rewrite-sdk --compare-existing --no-motd

Companion PRs (tus org only)

@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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.

2 participants