Repository navigation
sdk-sync: API 2.0.0+ffb34b7 → sdk-java (minor) - #89
marketdata-sdk-sync[bot] wants to merge 2 commits into
Conversation
tests: Confirmed: the build fails as expected, with compilation errors on the not-yet-existing `DteFilter` type and the `ExpirationFilter.dte(DteFilter)` overload. No production code or existing test lines were touched.
Added tests for the `dte` parameter's type change (`integer` → `string`) on `/v1/options/chain/{underlying}/`, assuming a new `DteFilter` sealed type (`values`/`range`/`comparison`) plus an additive `ExpirationFilter.dte(DteFilter)` overload, leaving the existing `dte(int)` single-value overload untouched (regression already covered by the pre-existing `chainExpirationFilterDteTranslatesToDteParam` test):
- Wire tests: comma-separated list, closed range, comparison operator (3 new forms; single-value form already tested).
- Validation tests: empty list, negative/over-36500 entries for list/range/comparison, reversed range — all on the new `DteFilter` type only.
- Integration tests: list (dedup bound), range (bounds check), comparison (operator check) against the live chain endpoint, asserting decoded `dte` values.
`gradle test --no-daemon --console=plain` fails at `compileTestJava` as expected, since `DteFilter` doesn't exist yet.
implement: All changes are within `src/main` and `src/test`/`src/integrationTest`, no build/gradle/CI files touched, and no test was weakened.
Added `DteFilter` (sealed: `Values`/`Range`/`Comparison`, 0–36500 day validation) for the chain endpoint's `dte` string syntax, reached via a new, additive `ExpirationFilter.dte(DteFilter)` overload alongside the untouched `dte(int)` single-value form. Wired translation into `OptionsResource.applyExpirationFilter`/`dteFilterWireValue` (comma-join, dashed range, operator prefix). No test from phase 1 was weakened; `gradle test` and `gradle build` (incl. 100% JaCoCo and Spotless) pass clean.
review fix 1: All three findings addressed, no build/gradle/CI files touched, no CHANGELOG edit.
- `docs/options/chain.md:23` — added the three `DteFilter` forms (`values`/`range`/`comparison`) next to the `dte(int)` line with their wire shapes, added the `DteFilter` import and three example calls to the Java example block.
- `OptionsResourceTest.java:1004` — added `chainExpirationFilterDteComparisonLtRendersWithOperatorPrefix`, `...GtRendersWithOperatorPrefix`, and `...LteRendersWithOperatorPrefix`, asserting `dte=%3C45`, `dte=%3E30`, `dte=%3C%3D45` respectively, so all four `DteFilter.Operator` constants now have a wire assertion.
- `OptionsIntegrationTest.java:152` — rewrote `chainDteValuesReturnsAtMostAsManyDistinctExpirationsAsRequested` (renamed to `chainDteValuesReturnsClosestExpirationPerRequestedValue`) to require 2–3 distinct expirations (ruling out the unfiltered front-month-only case) and to assert each row's `dte()` lands within 15 days of one of the requested values (7/30/60); this is a fix to a test I wrote in phase 1, not a weakening.
No production logic changed in this round beyond the doc; `DteFilter`/`ExpirationFilter`/`OptionsResource` wiring from phase 2 already covered the new operators, so only tests and docs needed updates.
changelog: Added changelog entry under `[Unreleased]` describing `DteFilter` sealed interface and extended dte parameter syntax (comma-separated lists, closed ranges, comparison operators) for the chain endpoint per Market Data API 2.0.0.
🧾 Job log — sdk-syncsdk-auto-sync job log
Changes in the API surface1. testsCoder (20 turns, US$ 1.06):
Gates:
2. implementCoder (22 turns, US$ 0.79):
Gates:
3. review 1Reviewer (18 turns, US$ 1.68): 3 blocking finding(s)
4. review fix 1Findings sent back to the coder:
Coder (15 turns, US$ 0.63):
Gates:
5. review 2Reviewer (6 turns, US$ 0.76): approved
6. securitySecurity (2 turns, US$ 0.38): approved
7. assessAnalyst (7 turns, US$ 0.11) — public surface:
Computed by the pipeline: minor; changelog entry written 8. changelogCoder (6 turns, US$ 0.08):
Gates:
Totals
Agent runs
Code review fix 1 — 2026-10-05 16:06:42ZOutcome: done 1. code review fix 1The code review asked for changes:
Coder (18 turns, US$ 0.39):
Gates:
2. review 1Reviewer (12 turns, US$ 1.14): approved
3. securitySecurity (2 turns, US$ 0.21): approved
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
============================================
+ Coverage 98.27% 98.30% +0.03%
- Complexity 1043 1054 +11
============================================
Files 123 124 +1
Lines 2606 2654 +48
Branches 301 308 +7
============================================
+ Hits 2561 2609 +48
Partials 45 45
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
⛔ Blocked — Code reviewThe change adds additive DTE list, range, and comparison filters, wires them into option-chain requests, and documents and tests the new forms. Version impact: minor; existing Java and Kotlin callers retain the unchanged Rating patch 5/6 (solid) · proof 3/6 (partial) · overall 3/6 Before merge
Since last review
Reviewed |
code review fix 1: Both gates pass (`gradle test` and `gradle build`, including JaCoCo coverage and Spotless) on the first attempt. Summary of findings addressed: - Public constructors bypass validation (`DteFilter.java`): moved all validation (non-empty/bounds for `Values`, bounds+ordering for `Range`, non-null operator+bounds for `Comparison`) into each record's compact constructor, so `new DteFilter.Values(...)`, `new DteFilter.Range(...)`, and `new DteFilter.Comparison(...)` now enforce the same invariants as the static factories, which now just delegate to the canonical constructors. Added tests calling the record constructors directly for the empty-list, reversed-range, and null-operator cases. - Reachable null branch excluded via `@Generated`: removed the `@Generated` annotation and its comment from `comparison(...)` (the check moved to `Comparison`'s compact constructor, which is not annotated) and added `dteFilterComparisonRejectsNullOperator`, asserting `DteFilter.comparison(null, 30)` throws `IllegalArgumentException`. - Left `StrikeFilter.java`'s identical `@Generated`/null-check pattern untouched — it's pre-existing code outside this PR's diff, not covered by these findings. - No CHANGELOG change: the existing `[Unreleased]` entry already documents "full validation" on the factories, and this fix only relocates that same validation to be enforced on every construction path, with the same exception type and messages.
🙋 Needs a person — sdk-syncWhy: the code review blocked the PR (⛔ Blocked) with nothing the pipeline can act on Nothing from the code review. Code-review fix rounds used: 1 of 2 · CI repairs used: 0 of 2 What to do
This pull request is back to draft and labelled |
|
Closed to rerun the sdk-sync pipeline from scratch for API 2.0.0 (complete-change list, live suite in CI). |
Generated by sdk-auto-sync for API release 2.0.0 (commit
ffb34b7).Changes in the API surface
Snapshots
ae2b047c8f6f→c2a31e277345:What the agent did
tests: Confirmed: the build fails as expected, with compilation errors on the not-yet-existing
DteFiltertype and theExpirationFilter.dte(DteFilter)overload. No production code or existing test lines were touched.Added tests for the
dteparameter's type change (integer→string) on/v1/options/chain/{underlying}/, assuming a newDteFiltersealed type (values/range/comparison) plus an additiveExpirationFilter.dte(DteFilter)overload, leaving the existingdte(int)single-value overload untouched (regression already covered by the pre-existingchainExpirationFilterDteTranslatesToDteParamtest):DteFiltertype only.dtevalues.gradle test --no-daemon --console=plainfails atcompileTestJavaas expected, sinceDteFilterdoesn't exist yet.implement: All changes are within
src/mainandsrc/test/src/integrationTest, no build/gradle/CI files touched, and no test was weakened.Added
DteFilter(sealed:Values/Range/Comparison, 0–36500 day validation) for the chain endpoint'sdtestring syntax, reached via a new, additiveExpirationFilter.dte(DteFilter)overload alongside the untoucheddte(int)single-value form. Wired translation intoOptionsResource.applyExpirationFilter/dteFilterWireValue(comma-join, dashed range, operator prefix). No test from phase 1 was weakened;gradle testandgradle build(incl. 100% JaCoCo and Spotless) pass clean.review fix 1: All three findings addressed, no build/gradle/CI files touched, no CHANGELOG edit.
docs/options/chain.md:23— added the threeDteFilterforms (values/range/comparison) next to thedte(int)line with their wire shapes, added theDteFilterimport and three example calls to the Java example block.OptionsResourceTest.java:1004— addedchainExpirationFilterDteComparisonLtRendersWithOperatorPrefix,...GtRendersWithOperatorPrefix, and...LteRendersWithOperatorPrefix, assertingdte=%3C45,dte=%3E30,dte=%3C%3D45respectively, so all fourDteFilter.Operatorconstants now have a wire assertion.OptionsIntegrationTest.java:152— rewrotechainDteValuesReturnsAtMostAsManyDistinctExpirationsAsRequested(renamed tochainDteValuesReturnsClosestExpirationPerRequestedValue) to require 2–3 distinct expirations (ruling out the unfiltered front-month-only case) and to assert each row'sdte()lands within 15 days of one of the requested values (7/30/60); this is a fix to a test I wrote in phase 1, not a weakening.No production logic changed in this round beyond the doc;
DteFilter/ExpirationFilter/OptionsResourcewiring from phase 2 already covered the new operators, so only tests and docs needed updates.changelog: Added changelog entry under
[Unreleased]describingDteFiltersealed interface and extended dte parameter syntax (comma-separated lists, closed ranges, comparison operators) for the chain endpoint per Market Data API 2.0.0.Files
CHANGELOG.mddocs/options/chain.mdsrc/integrationTest/java/com/marketdata/sdk/OptionsIntegrationTest.javasrc/main/java/com/marketdata/sdk/OptionsResource.javasrc/main/java/com/marketdata/sdk/options/DteFilter.javasrc/main/java/com/marketdata/sdk/options/ExpirationFilter.javasrc/test/java/com/marketdata/sdk/OptionsResourceTest.javaVersion
Public-surface change computed by the pipeline: minor
DteFilter— New sealed interface for extended dte parameter syntax supporting comma-separated lists, ranges, and comparisons.DteFilter.Values— New sealed subtype of DteFilter for comma-separated list syntax.DteFilter.Range— New sealed subtype of DteFilter for closed range syntax.DteFilter.Comparison— New sealed subtype of DteFilter for comparison operator syntax.DteFilter.Operator— New enum for comparison operators: GT, GTE, LT, LTE.DteFilter.Operator.GTDteFilter.Operator.GTEDteFilter.Operator.LTDteFilter.Operator.LTEDteFilter.Operator.wireValue()— Returns the wire-form operator string (e.g. ">=" for GTE).DteFilter.MAX_DAYS— Constant indicating maximum allowed days value (36500).DteFilter.values(List)— Factory method to create a Values variant from a list of integers.DteFilter.range(int, int)— Factory method to create a Range variant from min and max values.DteFilter.comparison(Operator, int)— Factory method to create a Comparison variant from an operator and days value.ExpirationFilter.dte(DteFilter)— New overload accepting DteFilter for extended syntax; original dte(int) remains unchanged.ExpirationFilter.DteSyntax— New sealed subtype of ExpirationFilter for the extended dte syntax variant.Live-API suite
src/integrationTest/java/com/marketdata/sdk/OptionsIntegrationTest.javaFiles of this suite changed by this pull request. The pipeline did not run the suite (it has no API token); the repository runs it with
/integrationtest.Job log
The full record of this job — every phase, test and build result, review findings and how they were resolved, and each fix round after the PR was opened — is in the job log comment.
4 coder run(s) · 3 review(s) · 96 turns · 8,222,126 tokens · US$ 5.48 · item
5c097984-5f7b-401b-abba-235a3f417767Agent runs