Repository navigation
[FAILED] sdk-sync: API 1.4.0+f19c2d4 - #12
Closed
MarketDataDev03 wants to merge 1 commit into
Closed
MarketDataDev03 wants to merge 1 commit into
MarketDataDev03 wants to merge 1 commit into
Conversation
tests: The build fails as required, with compilation errors on the new `dteRange`/`dteIn` symbols that don't exist yet — confirming the tests correctly specify not-yet-implemented behavior.
## Summary
Added unit tests to `src/test/java/com/marketdata/sdk/OptionsResourceTest.java` specifying the new `dte` query-parameter shapes for `GET /v1/options/chain/{underlying}/` (single number, range, comma-separated list), replacing the prior integer-only form:
- URL translation tests (alongside the existing `chainExpirationFilterDteTranslatesToDteParam`):
- `chainExpirationFilterDteRangeTranslatesToDashedDteParam` — `ExpirationFilter.dteRange(30, 45)` → `?dte=30-45`
- `chainExpirationFilterDteListTranslatesToCommaSeparatedDteParam` — `ExpirationFilter.dteIn(List.of(30, 45, 60))` → `?dte=30,45,60`
- Factory validation tests (alongside the existing `expirationFilterDteRejectsNegative`):
- `expirationFilterDteRangeRejectsNegativeBound`, `expirationFilterDteRangeRejectsMinGreaterThanMax`
- `expirationFilterDteInRejectsEmptyList`, `expirationFilterDteInRejectsNegativeValue`
These specify two new static factories, `ExpirationFilter.dteRange(int min, int max)` and `ExpirationFilter.dteIn(List<Integer> days)`, following the same sealed-filter/factory-validation convention as the existing `dte`/`between`/`monthYear` and the sibling `StrikeFilter.range`. No existing tests were weakened. Confirmed `gradle test --no-daemon --console=plain` fails at `compileTestJava` since these symbols don't exist yet.
implement: All within `src/main/java/` and `src/test/java/`. `gradle test` and `gradle build` both pass.
## Summary
Implemented the `dte` query-parameter change for `GET /v1/options/chain/{underlying}/` (now a string accepting a single number, a range, or a comma-separated list, instead of a plain integer):
- `ExpirationFilter.java`: `Dte` now wraps a formatted wire `String expression` instead of a raw `int days`. Added two new factories alongside the existing `dte(int)`: `dteRange(int min, int max)` (→ `min-max`, validates non-negative + `min <= max`) and `dteIn(List<Integer> days)` (→ comma-joined, validates non-empty + all non-negative), following the same sealed-filter/factory-validation style as the sibling `StrikeFilter`.
- `OptionsResource.java`: `applyExpirationFilter` now writes `v.expression()` for the `dte` query param instead of the old `v.days()`.
Also fixed one test from phase 1: `chainExpirationFilterDteListTranslatesToCommaSeparatedDteParam` asserted the URI with a literal comma, but the query encoder percent-encodes it (`%2C`); updated it to URL-decode before asserting, matching the existing convention used by `StocksResourceTest`'s `symbols=` assertions. No test was weakened — this only corrected an encoding-unaware expectation.
`gradle test --no-daemon --console=plain` and `gradle build --no-daemon --console=plain` both pass, including Spotless formatting (applied via `spotlessApply` to reflow a javadoc comment) and JaCoCo checks.
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.
Changes in the API surface
Snapshots
9c18fbb1f58e→72b3d15f59ad:What the agent did
tests: The build fails as required, with compilation errors on the new
dteRange/dteInsymbols that don't exist yet — confirming the tests correctly specify not-yet-implemented behavior.Summary
Added unit tests to
src/test/java/com/marketdata/sdk/OptionsResourceTest.javaspecifying the newdtequery-parameter shapes forGET /v1/options/chain/{underlying}/(single number, range, comma-separated list), replacing the prior integer-only form:chainExpirationFilterDteTranslatesToDteParam):chainExpirationFilterDteRangeTranslatesToDashedDteParam—ExpirationFilter.dteRange(30, 45)→?dte=30-45chainExpirationFilterDteListTranslatesToCommaSeparatedDteParam—ExpirationFilter.dteIn(List.of(30, 45, 60))→?dte=30,45,60expirationFilterDteRejectsNegative):expirationFilterDteRangeRejectsNegativeBound,expirationFilterDteRangeRejectsMinGreaterThanMaxexpirationFilterDteInRejectsEmptyList,expirationFilterDteInRejectsNegativeValueThese specify two new static factories,
ExpirationFilter.dteRange(int min, int max)andExpirationFilter.dteIn(List<Integer> days), following the same sealed-filter/factory-validation convention as the existingdte/between/monthYearand the siblingStrikeFilter.range. No existing tests were weakened. Confirmedgradle test --no-daemon --console=plainfails atcompileTestJavasince these symbols don't exist yet.implement: All within
src/main/java/**andsrc/test/java/**.gradle testandgradle buildboth pass.Summary
Implemented the
dtequery-parameter change forGET /v1/options/chain/{underlying}/(now a string accepting a single number, a range, or a comma-separated list, instead of a plain integer):ExpirationFilter.java:Dtenow wraps a formatted wireString expressioninstead of a rawint days. Added two new factories alongside the existingdte(int):dteRange(int min, int max)(→min-max, validates non-negative +min <= max) anddteIn(List<Integer> days)(→ comma-joined, validates non-empty + all non-negative), following the same sealed-filter/factory-validation style as the siblingStrikeFilter.OptionsResource.java:applyExpirationFilternow writesv.expression()for thedtequery param instead of the oldv.days().Also fixed one test from phase 1:
chainExpirationFilterDteListTranslatesToCommaSeparatedDteParamasserted the URI with a literal comma, but the query encoder percent-encodes it (%2C); updated it to URL-decode before asserting, matching the existing convention used byStocksResourceTest'ssymbols=assertions. No test was weakened — this only corrected an encoding-unaware expectation.gradle test --no-daemon --console=plainandgradle build --no-daemon --console=plainboth pass, including Spotless formatting (applied viaspotlessApplyto reflow a javadoc comment) and JaCoCo checks.Files
src/main/java/com/marketdata/sdk/OptionsResource.javasrc/main/java/com/marketdata/sdk/options/ExpirationFilter.javasrc/test/java/com/marketdata/sdk/OptionsResourceTest.javaReviewer notes
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.2 coder run(s) · 0 review(s) · 47 turns · 2,722,109 tokens · US$ 0.98 · item
0835296c-bc35-46d5-8c79-389cf2e18ef8Agent runs