Repository navigation
Add Java SDK (draft) - #1
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4ijWAJZzDChcsSYmgTYcD
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4ijWAJZzDChcsSYmgTYcD
…y-After floor, decode error, User-Agent - Retry a 409 conflict on keyed POSTs only; never idempotency-key-reused. - Do not retry certificate, unknown-host or malformed-request errors. - Retry-After floor at the retry base, with jitter; longer than the cap is surfaced. - Typed decode error (with status) for a 2xx body that is not JSON. - User-Agent carries version and URL; an empty custom one keeps the default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4ijWAJZzDChcsSYmgTYcD
clarivo-dev
marked this pull request as ready for review
October 27, 2026 20:01
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.
First import of the Java SDK (pre-release
0.1.0-SNAPSHOT, nothing is published to Maven Central or anywhere else).scripts/gen_operations.py+mvn -Pgenerate generate-sources; CI fails on drift.java.net.http: retries withRetry-After, oneIdempotency-Keyper call reused by retries, RFC 9457 typed errors, cursor pagination,warmRuns.waitFor.toString()or exception messages.Tested in the
maven:3.9-eclipse-temurin-17image:mvn test, 14 tests.The Maven groupId
com.sitewarmis a placeholder until the namespace is decided. The spec describes the planned API surface; the service may not offer every operation yet.Ported review findings
Ported from the Go SDK review: a keyed POST retries a 409
conflict(neveridempotency-key-reused); certificate verification, unknown-host and malformed-request errors are not retried, other network errors keep the existing rule;Retry-Afteris floored at the retry base with up to +25% jitter (above the cap it is still thrown); a 2xx body that is not JSON throwsSiteWarmException.Decode(status()); the defaultUser-Agentissitewarm-java/0.1.0-SNAPSHOT (+https://github.com/sitewarm/sdk-java)anduserAgent("")keeps it. Tests:LowsTest(35 tests pass inmaven:3.9-eclipse-temurin-17,mvn verify).Deviations: the version is the pom's
0.1.0-SNAPSHOT, kept in aSiteWarm.VERSIONconstant that a test compares with the pom. An invalid header or URL (which the JDK reports asIllegalArgumentExceptionwhile building the request) is now aSiteWarmExceptionwith a fixed message, never retried. JDKHttpClientreports an unresolvable host asConnectExceptioncaused byUnresolvedAddressException, which is treated as not-found (it cannot tell a temporary DNS failure apart).Decodecarries no cause (a parser message can quote the body). The base path already keeps%2F(getRawPath), so only a regression test was added. Ids stay opaque; key validation and error sentinels are out of scope.🤖 Generated with Claude Code