Skip to content

Add generated TUS protocol contract canary#148

Closed
kvz wants to merge 1 commit into
mainfrom
tus-gen
Closed

Add generated TUS protocol contract canary#148
kvz wants to merge 1 commit into
mainfrom
tus-gen

Conversation

@kvz
Copy link
Copy Markdown
Member

@kvz kvz commented May 26, 2026

Why: this is the Java companion canary for the API2 contract generator work. API2 owns the TUS protocol contract; this PR proves tus-java-client can consume generated protocol facts without duplicating wire knowledge in the Java repo.

What changed:

  • add generated TusProtocol.DEFAULT_PROTOCOL_VERSION from the API2 TUS wire contract
  • source TusClient.TUS_VERSION from that generated constant
  • add a generated protocol contract fixture for operations, headers, responses, wire versions, and high-level feature facts
  • add a small handwritten test proving the runtime constant and singleUploadLifecycle feature consume the generated facts

Validation:

  • ./gradlew clean check --no-daemon
  • api2/bin/cli.ts contracts tus-sdks --no-motd --platform java --sdk-root ../tus-java-client --compare-existing

Companion PRs:

@kvz kvz added java Pull requests that update Java code and removed java Pull requests that update Java code labels May 26, 2026
@kvz
Copy link
Copy Markdown
Member Author

kvz commented May 26, 2026

Closing this draft-created PR and reopening as a normal PR so the existing GitHub Actions opened trigger has a clean event to run from.

@kvz kvz closed this May 26, 2026
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