feat(listReservations): lock in from/to ISO-8601 window passthrough (0.2.3)#78
Merged
Merged
Conversation
…0.2.3) Client-side companion to cycles-protocol-v0.yaml revision 2026-05-21 (runcycles/cycles-protocol#97) and runcycles/cycles-server#160. Closes the Spring Boot starter side of issue #159. The existing `DefaultCyclesClient.listReservations(Map<String, String>)` signature already forwards arbitrary keys to the URL query string, so the new `from` and `to` ISO-8601 date-time params work over the wire today without a code change. This commit adds a regression test that pins the contract — future tightening of the Map signature cannot silently drop the new params. Wire-format note caught by the test: Spring's WebClient leaves colons unencoded in the query component (RFC 3986 §3.4 permits this in the query production), so the emitted form is /v1/reservations?from=2026-05-21T00:00:00Z&to=2026-05-22T00:00:00Z&tenant=acme — not the percent-escaped variant. cycles-server accepts both shapes; the assertion now matches the literal WebClient output. No protocol or wire-format change; servers older than v0.1.25.20 silently ignore the new params per the additive-parameter guarantee in cycles-protocol-v0.yaml. 433 tests pass; JaCoCo coverage gate met. Bumped to 0.2.3 via the single .mvn/maven.config source of truth (propagates to both cycles-client-java-spring/pom.xml and cycles-demo-client-java-spring/pom.xml, keeping starter + demo in lockstep — the drift-protection invariant from the CI-friendly versions refactor in [Unreleased]). Updated AUDIT.md and CHANGELOG.md.
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.
Summary
Client-side companion to cycles-protocol-v0.yaml revision 2026-05-21 and cycles-server#160 (which together added
from/toISO-8601 window-filter query params toGET /v1/reservations). Matches the same shape we landed in runcycles/cycles-client-python#66, runcycles/cycles-client-typescript#103, and runcycles/cycles-client-rust#39.What this PR does
DefaultCyclesClient.listReservations(Map<String, String>)is already permissive — it forwards arbitrary keys to the URL query string. Sofrom/towork over the wire today, no code change. This PR:DefaultCyclesClient.listReservations(cycles-client-java-spring/src/test/java/.../DefaultCyclesClientTest.java) confirming the new ISO-8601 params land in the GET path. Pins the contract so future tightening of theMapsignature cannot silently drop the new keys.revisionfrom 0.2.2 → 0.2.3 via the single.mvn/maven.configsource of truth (propagates to bothcycles-client-java-springandcycles-demo-client-java-springpoms — the drift-protection invariant from the CI-friendly-versions refactor in[Unreleased]).AUDIT.mdandCHANGELOG.md.Wire-format note
Spring's
WebClientleaves colons unencoded in the query component (RFC 3986 §3.4 permits this), so the emitted path is:— not the percent-escaped form. cycles-server accepts both shapes; the test asserts the literal WebClient output.
Call-site syntax
No reserved-keyword issue (unlike Python where
fromrequires a dict-unpack workaround).Verification
mvn -B verify --file cycles-client-java-spring/pom.xml: 433 tests pass.[INFO] All coverage checks have been met.) per the project's ≥95% rule.Test plan
listReservationscallOut of scope
Map<String, String>signature is left as-is; a typedListReservationsParamswould be a separate ergonomic discussion (parallel to the Rust client's existing strongly-typed pattern).Closes the Spring Boot starter side of the issue cluster for runcycles/cycles-server#159.