Repository navigation
sdk-sync: API 1.4.0+f19c2d4 → sdk-java 2.0.0 (major) - #14
Closed
MarketDataDev03 wants to merge 2 commits into
Closed
MarketDataDev03 wants to merge 2 commits into
MarketDataDev03 wants to merge 2 commits into
Conversation
tests: Build fails as expected — the new `dte(int, int)` and `dte(List<Integer>)` overloads don't exist yet (production code untouched, per phase 1b scope). Summary of tests added to `src/test/java/com/marketdata/sdk/OptionsResourceTest.java` (all pre-existing tests left untouched): - `chainExpirationFilterDteRangeTranslatesToDteParam` (wire) — `ExpirationFilter.dte(30, 45)` must send `?dte=30-45`. - `chainExpirationFilterDteListTranslatesToDteParam` (wire) — `ExpirationFilter.dte(List.of(7, 14, 30))` must send the percent-encoded `dte=7%2C14%2C30` on the wire, decoding to `dte=7,14,30`. - `chainExpirationFilterDteRangeSyncMirrorsAsync` (parity) — `chain(...)` and `chainAsync(...)` must send identical requests for the range form. - `expirationFilterDteRangeRejectsReversedBounds`, `expirationFilterDteRangeRejectsNegativeMin` (validation) — `dte(min, max)` rejects `min > max` and negative `min`. - `expirationFilterDteListRejectsEmptyList`, `expirationFilterDteListRejectsNullList`, `expirationFilterDteListRejectsNegativeValue` (validation) — `dte(List<Integer>)` rejects empty, null, and negative-containing lists. The plan's item 3 (regression, single-number form) was already present verbatim at `chainExpirationFilterDteTranslatesToDteParam` — no change needed there. Confirmed `gradle test --no-daemon --console=plain` fails: `compileTestJava` errors because `ExpirationFilter.dte(int,int)` and `ExpirationFilter.dte(List<Integer>)` don't exist yet, as expected for this phase. implement: Only the three expected files changed. No commits made, nothing else touched. Summary for PR body: - `ExpirationFilter.dte(...)` (in `src/main/java/com/marketdata/sdk/options/ExpirationFilter.java`) now supports all three wire forms the API's `?dte=` string parameter accepts: `dte(int days)` (unchanged, single number — kept for backward compatibility), plus two new overloads `dte(int min, int max)` (inclusive range, e.g. `30-45`, rejecting a reversed or negative `min`) and `dte(List<Integer> days)` (comma-separated list, rejecting null, empty, or negative-containing lists). The `Dte` record now stores a pre-rendered wire `String` instead of a bare `int`, matching the API's type change from integer to string. - `OptionsResource.applyExpirationFilter` now reads `Dte.value()` (the rendered string) instead of `Dte.days()` (the former int). - Fixed two Spotless formatting nits (a Javadoc line-wrap and a line-length wrap) flagged by `gradle build`, in the same two files touched by the change plus the test file. `gradle test --no-daemon --console=plain` and `gradle build --no-daemon --console=plain` both pass; no other files were modified and nothing was committed. changelog: Added a `## [Unreleased]` changelog entry documenting the breaking `ExpirationFilter.Dte`/`dte` API change (new `dteRange`/`dteList` factories, `Dte.days()` → `wireValue()` rename, `Dte(int)` → `Dte(String)`) in response to Market Data API 1.4.0's `dte` parameter type change, with migration guidance for affected consumers — only `CHANGELOG.md` was touched in this step.
MarketDataDev03
marked this pull request as ready for review
September 17, 2026 15:09
tests: Build fails as expected — `compileTestJava` errors on the not-yet-implemented `ExpirationFilter.dteRange(...)` and `ExpirationFilter.dteList(...)` symbols. Stopping here per instructions.
Summary:
- Found the test file already contained stray, unreviewed test code (a different, conflicting design using `ExpirationFilter.dte(int,int)`/`dte(List<Integer>)` overloads, plus duplicate method names). Removed that block since it didn't match the reviewed plan and would have caused a hard compile error from duplicate methods.
- Added exactly the 6 new tests from the plan (cases 2, 3, 5, 6, 7, 8 — cases 1 and 4 were already present and untouched):
- `chainExpirationFilterDteRangeTranslatesToDteParam` — `ExpirationFilter.dteRange(30, 45)` → `?dte=30-45`
- `chainExpirationFilterDteListTranslatesToDteParam` — `ExpirationFilter.dteList(7, 14, 30)` → `?dte=7,14,30` (decoded)
- `chainSyncThreadsDteRangeToWire` — sync `chain(...)` threads `dteRange` to the same wire URL as async
- `expirationFilterDteRangeRejectsReversedRange` — `dteRange(45, 30)` → `IllegalArgumentException("min must be <= max")`
- `expirationFilterDteRangeRejectsNegativeMin` — `dteRange(-1, 30)` → `IllegalArgumentException("dte must be non-negative")`
- `expirationFilterDteListRejectsNegativeValue` — `dteList(30, -5)` → `IllegalArgumentException("dte must be non-negative")`
- No existing lines were removed or changed relative to `git HEAD`; the diff is a pure addition.
- Ran `gradle test --no-daemon --console=plain` once as instructed: it fails at `compileTestJava` with "cannot find symbol" for `ExpirationFilter.dteRange`/`dteList`, confirming the tests correctly anticipate not-yet-implemented production code.
tests (attempt 2): Confirmed: build fails as expected, with production code untouched.
Summary:
- Undid: production-code edits to `src/main/java/com/marketdata/sdk/OptionsResource.java` (the `v.days()` → `v.value()` change) and `src/main/java/com/marketdata/sdk/options/ExpirationFilter.java` (the `Dte(int days)` → `Dte(String value)` rewrite plus new `dte(int,int)`/`dte(List<Integer>)` overloads). Both files now match `git HEAD` exactly — no production code is touched.
- Kept: the 6 plan tests in `src/test/java/com/marketdata/sdk/OptionsResourceTest.java` (pure additions, nothing removed/changed relative to HEAD) — `chainExpirationFilterDteRangeTranslatesToDteParam`, `chainExpirationFilterDteListTranslatesToDteParam`, `chainSyncThreadsDteRangeToWire`, `expirationFilterDteRangeRejectsReversedRange`, `expirationFilterDteRangeRejectsNegativeMin`, `expirationFilterDteListRejectsNegativeValue`.
- Confirmed `gradle test --no-daemon --console=plain` still fails, now purely on missing `ExpirationFilter.dteRange`/`dteList` symbols (compile error), with no other diffs outside `src/test/java/`.
implement: Build is green.
Summary for PR body:
`GET /v1/options/chain/{underlying}/`'s `?dte=` parameter widened from integer to string, accepting a single number, an inclusive range (`30-45`), or a comma-separated list.
- `ExpirationFilter.Dte` now stores a pre-rendered wire string instead of a raw `int`.
- `ExpirationFilter.dte(int days)` keeps its existing signature and wire output (`?dte=N`) — fully backward compatible.
- Added `ExpirationFilter.dteRange(int minDays, int maxDays)` → `?dte=min-max`, validating `minDays <= maxDays` and both non-negative (mirrors `StrikeFilter.range`'s validation style).
- Added `ExpirationFilter.dteList(int first, int... rest)` → `?dte=d1,d2,...`, validating every value non-negative; the `first, rest...` signature makes an empty list unrepresentable at compile time (mirrors `OptionsQuotesRequest.builder`).
- `OptionsResource.applyExpirationFilter` now reads `Dte.wireValue()` instead of `Dte.days()`.
- Updated `docs/options/chain.md` to document the two new factory forms alongside the existing one.
- No test weakening: all 6 tests written in phase 1 pass unmodified against this implementation. `gradle test` and `gradle build` (including Spotless and JaCoCo coverage) both pass.
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.
Generated by sdk-auto-sync for API release 1.4.0 (commit
f19c2d4).Changes in the API surface
Snapshots
9c18fbb1f58e→72b3d15f59ad:What the agent did
tests: Build fails as expected — the new
dte(int, int)anddte(List<Integer>)overloads don't exist yet (production code untouched, per phase 1b scope).Summary of tests added to
src/test/java/com/marketdata/sdk/OptionsResourceTest.java(all pre-existing tests left untouched):chainExpirationFilterDteRangeTranslatesToDteParam(wire) —ExpirationFilter.dte(30, 45)must send?dte=30-45.chainExpirationFilterDteListTranslatesToDteParam(wire) —ExpirationFilter.dte(List.of(7, 14, 30))must send the percent-encodeddte=7%2C14%2C30on the wire, decoding todte=7,14,30.chainExpirationFilterDteRangeSyncMirrorsAsync(parity) —chain(...)andchainAsync(...)must send identical requests for the range form.expirationFilterDteRangeRejectsReversedBounds,expirationFilterDteRangeRejectsNegativeMin(validation) —dte(min, max)rejectsmin > maxand negativemin.expirationFilterDteListRejectsEmptyList,expirationFilterDteListRejectsNullList,expirationFilterDteListRejectsNegativeValue(validation) —dte(List<Integer>)rejects empty, null, and negative-containing lists.The plan's item 3 (regression, single-number form) was already present verbatim at
chainExpirationFilterDteTranslatesToDteParam— no change needed there.Confirmed
gradle test --no-daemon --console=plainfails:compileTestJavaerrors becauseExpirationFilter.dte(int,int)andExpirationFilter.dte(List<Integer>)don't exist yet, as expected for this phase.implement: Only the three expected files changed. No commits made, nothing else touched.
Summary for PR body:
ExpirationFilter.dte(...)(insrc/main/java/com/marketdata/sdk/options/ExpirationFilter.java) now supports all three wire forms the API's?dte=string parameter accepts:dte(int days)(unchanged, single number — kept for backward compatibility), plus two new overloadsdte(int min, int max)(inclusive range, e.g.30-45, rejecting a reversed or negativemin) anddte(List<Integer> days)(comma-separated list, rejecting null, empty, or negative-containing lists). TheDterecord now stores a pre-rendered wireStringinstead of a bareint, matching the API's type change from integer to string.OptionsResource.applyExpirationFilternow readsDte.value()(the rendered string) instead ofDte.days()(the former int).gradle build, in the same two files touched by the change plus the test file.gradle test --no-daemon --console=plainandgradle build --no-daemon --console=plainboth pass; no other files were modified and nothing was committed.changelog: Added a
## [Unreleased]changelog entry documenting the breakingExpirationFilter.Dte/dteAPI change (newdteRange/dteListfactories,Dte.days()→wireValue()rename,Dte(int)→Dte(String)) in response to Market Data API 1.4.0'sdteparameter type change, with migration guidance for affected consumers — onlyCHANGELOG.mdwas touched in this step.Files
CHANGELOG.mddocs/options/chain.mdsrc/main/java/com/marketdata/sdk/OptionsResource.javasrc/main/java/com/marketdata/sdk/options/ExpirationFilter.javasrc/test/java/com/marketdata/sdk/OptionsResourceTest.javaVersion
Public-surface change computed by the pipeline: major — next version 2.0.0 (from 1.0.0).
ExpirationFilter.dteRange(int, int)— New static factory producing a Dte filter with wire form dte=min-max; throws IllegalArgumentException if either value is negative or minDays > maxDays.ExpirationFilter.dteList(int, int...)— New static factory producing a Dte filter with wire form dte=d1,d2,...; throws IllegalArgumentException if any value is negative. Varargs signature guarantees at least one element.ExpirationFilter.Dte.wireValue()— Record component/accessor renamed and retyped from days():int to wireValue():String; a consumer calling .days() on a Dte no longer compiles.ExpirationFilter.Dte.days()— Removed as part of the record component rename to wireValue().ExpirationFilter.Dte(String)— Canonical public record constructor's parameter type changed from int to String (previously Dte(int)); source-incompatible for any consumer constructing Dte directly.ExpirationFilter.dte(int)— Signature and negative-value validation unchanged, but now builds a Dte wrapping Integer.toString(days) instead of the raw int, consistent with the new String-based Dte representation.Test plan
9 case(s) (wire 2, regression 1, validation 5, parity 1)
chainExpirationFilterDteRangeTranslatesToDteParamchainExpirationFilterDteListTranslatesToDteParamchainExpirationFilterDteTranslatesToDteParamchainExpirationFilterDteRangeSyncMirrorsAsyncexpirationFilterDteRangeRejectsReversedBoundsexpirationFilterDteRangeRejectsNegativeMinexpirationFilterDteListRejectsEmptyListexpirationFilterDteListRejectsNullListexpirationFilterDteListRejectsNegativeValueReviewer notes
new ExpirationFilter.Dte(...)(the record and its canonical constructor are implicitly public as a nested type of a public interface). Widening the backing type from int to a free-form String makes this loophole materially worse than before: a directly-constructed Dte can now carry any malformed string (e.g. "30--45", empty, or stray characters) straight onto the wire, andnew Dte(null)would be silently dropped by RequestSpec.Builder#query's null-skip rather than erroring, unlike the non-negative/range/non-empty guarantees the static factories advertise. Consider a compact constructor requiring non-null/non-blank value, consistent with OnDate's existing Objects.requireNonNull guard.Job log
The full record of this job — every phase, test and build result, review findings and how they were resolved — is in
.sdk-sync/1.4.0-f19c2d4.mdon this branch.5 coder run(s) · 4 review(s) · 140 turns · 6,691,085 tokens · US$ 3.68 · item
0b7816fd-0dea-4662-8360-efdc63be6838Agent runs