Repository navigation
sdk-sync: API 2.0.0+ffb34b7 → sdk-java (minor) - #100
marketdata-sdk-sync[bot] wants to merge 1 commit into
Conversation
tests: Added tests for the `dte` filter's new string syntax on `GET /v1/options/chain/{underlying}/`: wire tests for the three new forms the API now accepts — comma-separated list (`dteList`), closed range (`dteRange`), and comparison operator (`dteComparison`, one test per GT/GTE/LT/LTE) — plus validation tests for each new factory's bounds (empty list, negative, >36500, min>max). The existing single-value `dte(int)` wire test and its non-negative check are untouched (regression). Added integration tests (`OptionsIntegrationTest`) deriving real AAPL dte values from the live `expiration=all` chain, then asserting the list/range/comparison forms resolve to exactly the expected expirations, including the inclusive-range and inclusive->=/exclusive-< boundary cases the API description states. No compatibility probe was written: the delta only adds new `ExpirationFilter` factory methods/types (`dteList`, `dteRange`, `dteComparison`, `Operator`); the existing `dte(int)` signature is untouched, so no existing public member is touched.
implement: Implemented the `dte` chain filter's three new wire forms (list/range/comparison) in `ExpirationFilter` as new sealed-permitted records (`DteList`, `DteRange`, `DteComparison`) plus a new `Operator` enum, alongside the unchanged `dte(int)`; `OptionsResource.applyExpirationFilter` renders each to the wire (`15,30,45`, `0-45`, `>=30`).
Docs/doc-comments: every new type/method has a Javadoc comment; `docs/options/chain.md` documents all four `dte` syntaxes with examples; `OptionsAdvancedExample.java` gained a `dteRange` demo.
Wire tests: one per enumerated form, one per `Operator` value (GT/GTE/LT/LTE) — 14 pass.
Validation: bounds/empty/min<=max/null-operator checks live in each record's own compact constructor (not just the static factory), with tests calling both the factory and `new ExpirationFilter.DteXxx(...)` directly, plus null-list and null-element cases.
No coverage exclusions added; `jacocoTestCoverageVerification` (100% line) and `spotlessCheck` pass as part of `gradle build`.
Existing `dte(int)`/`expirationFilter(ExpirationFilter)` signatures and errors are untouched — purely additive, no narrowing.
Integration tests (phase 1) derive real AAPL dte values from `expiration=all` and assert list/range/comparison resolve correctly, including the inclusive->=/exclusive-< boundary; not re-run here (live-API gate).
One phase-1 test fixed: the `dteList` wire assertion decoded the URL first (commas are percent-encoded), matching the repo's existing `columns` test convention — same assertion, no weakening.
README.md, docs/client.md, ADR-008, docs/options/{quotes,README,expirations,lookup}.md, docs/.sync-manifest.txt, ADR-006, MarketDataClient.java, OptionsCsvResource.java, OptionsChain.java, OptionsHtmlResource.java, JsonResponseParserTest.java, RequestValidationTest.java: checked, none mention `dte`/`ExpirationFilter` specifically or show stale `dte` usage, left unchanged.
Outside my limits and left as-is: `.github/ISSUE_TEMPLATE/bug.yml`, `build.gradle.kts`, `.github/BUG_FINDING.md`, and the other unlisted files — none reviewed for this change.
review fix 1: Major finding (comparison boundary test, OptionsIntegrationTest.java): rewrote `chainDteComparisonBoundaryIsInclusiveAtGteAndExclusiveAtLt` so both the `>=boundary` and `<boundary` halves assert `containsExactlyElementsOf` against the exact baseline slice (`dtes` filtered `>= boundary` / `< boundary`) rather than a bare `contains`/`doesNotContain`; a server ignoring the filter and falling back to its front-month default no longer passes either half. Added `allMatch(d -> d >= boundary)` to the GTE half as the reviewer asked, subsumed by the exact-match that follows it.
Minor (range test, line 186): reworked `chainDteRangeKeepsExpirationsWithinInclusiveBounds` to use an interior subrange (`dtes.get(1)` .. `dtes.get(size-2)`) instead of the full first..last span, and added a `doesNotContain(belowRange, aboveRange)` assertion proving the baseline dtes outside the requested range are excluded; kept the existing inclusive-endpoint assertion. `liveDistinctDtes()`'s minimum-size guard raised from 3 to 4 distinct dtes so the new interior subrange always has an excluded baseline value on each side; its doc comment updated accordingly.
Minor (inclusive/exclusive documentation ambiguity, line 232): left unresolved — `<` and `>=` are standard relational operators with unambiguous mathematical meaning (not a server-specific behavior requiring API-team confirmation), and no documentation comment, `docs/`, or example in this change asserts anything beyond that inherent meaning, so there is no unsettled disagreement to flag or hedge.
Re-ran `gradle test --no-daemon --console=plain` (BUILD SUCCESSFUL, unit tests unaffected) and `gradle build --no-daemon --console=plain`; one `spotlessApply` pass was needed to reformat the new integration-test lines, after which the full build (compile, 100% line coverage verification, spotlessCheck, integrationTestClasses compiled/SKIPPED at runtime) passed.
No production code, documentation, or other test files changed in this cycle beyond the integration test; the test files still contain only additions (0 deletions) versus the prior cycle.
changelog: Added changelog entry under `## [Unreleased]` documenting the three new `ExpirationFilter` factory methods (`dteList`, `dteRange`, `dteComparison`) for API release 2.0.0's string forms of the `dte` parameter. Entry includes sealed subtypes `DteList`/`DteRange`/`DteComparison`, `Operator` enum (GT, GTE, LT, LTE) with `wireValue()` accessor, and constants `MIN_DTE`/`MAX_DTE`. Notes that existing `ExpirationFilter.dte(int)` works unchanged.</parameter>
<parameter name="status">Edit successful; CHANGELOG.md updated.
🧾 Job log — sdk-syncsdk-auto-sync job log
Changes in the API surface1. testsCoder (29 turns, US$ 1.16, 6 min 12 s):
The pipeline:
Gates:
2. implementCoder (64 turns, US$ 2.70, 7 min 39 s):
Gates:
3. review 1Reviewer (10 turns, US$ 1.64, 3 min 38 s): 1 blocking finding(s)
4. review fix 1Findings sent back to the coder:
Minor findings sent along, as optional:
Coder (13 turns, US$ 0.75, 2 min 49 s):
Gates:
5. review 2Reviewer (4 turns, US$ 0.50, 1 min 14 s): 1 blocking finding(s)
6. securityThe pipeline:
7. assessAnalyst (2 turns, US$ 0.22, 35 s) — public surface:
Computed by the pipeline: minor; changelog entry written 8. changelogCoder (6 turns, US$ 0.10, 48 s):
Gates:
Unresolved findings
Totals
Agent runs
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
============================================
+ Coverage 98.27% 98.30% +0.02%
- Complexity 1043 1053 +10
============================================
Files 123 123
Lines 2606 2648 +42
Branches 301 307 +6
============================================
+ Hits 2561 2603 +42
Partials 45 45
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Closing to re-run the SDK sync for API 2.0.0 with the pipeline's handling of ambiguous API documentation. |
Changes in the API surface
Snapshots
ae2b047c8f6f→c2a31e277345:What the agent did
tests: Added tests for the
dtefilter's new string syntax onGET /v1/options/chain/{underlying}/: wire tests for the three new forms the API now accepts — comma-separated list (dteList), closed range (dteRange), and comparison operator (dteComparison, one test per GT/GTE/LT/LTE) — plus validation tests for each new factory's bounds (empty list, negative, >36500, min>max). The existing single-valuedte(int)wire test and its non-negative check are untouched (regression). Added integration tests (OptionsIntegrationTest) deriving real AAPL dte values from the liveexpiration=allchain, then asserting the list/range/comparison forms resolve to exactly the expected expirations, including the inclusive-range and inclusive->=/exclusive-< boundary cases the API description states. No compatibility probe was written: the delta only adds newExpirationFilterfactory methods/types (dteList,dteRange,dteComparison,Operator); the existingdte(int)signature is untouched, so no existing public member is touched.implement: Implemented the
dtechain filter's three new wire forms (list/range/comparison) inExpirationFilteras new sealed-permitted records (DteList,DteRange,DteComparison) plus a newOperatorenum, alongside the unchangeddte(int);OptionsResource.applyExpirationFilterrenders each to the wire (15,30,45,0-45,>=30).Docs/doc-comments: every new type/method has a Javadoc comment;
docs/options/chain.mddocuments all fourdtesyntaxes with examples;OptionsAdvancedExample.javagained adteRangedemo.Wire tests: one per enumerated form, one per
Operatorvalue (GT/GTE/LT/LTE) — 14 pass.Validation: bounds/empty/min<=max/null-operator checks live in each record's own compact constructor (not just the static factory), with tests calling both the factory and
new ExpirationFilter.DteXxx(...)directly, plus null-list and null-element cases.No coverage exclusions added;
jacocoTestCoverageVerification(100% line) andspotlessCheckpass as part ofgradle build.Existing
dte(int)/expirationFilter(ExpirationFilter)signatures and errors are untouched — purely additive, no narrowing.Integration tests (phase 1) derive real AAPL dte values from
expiration=alland assert list/range/comparison resolve correctly, including the inclusive->=/exclusive-< boundary; not re-run here (live-API gate).One phase-1 test fixed: the
dteListwire assertion decoded the URL first (commas are percent-encoded), matching the repo's existingcolumnstest convention — same assertion, no weakening.README.md, docs/client.md, ADR-008, docs/options/{quotes,README,expirations,lookup}.md, docs/.sync-manifest.txt, ADR-006, MarketDataClient.java, OptionsCsvResource.java, OptionsChain.java, OptionsHtmlResource.java, JsonResponseParserTest.java, RequestValidationTest.java: checked, none mention
dte/ExpirationFilterspecifically or show staledteusage, left unchanged.Outside my limits and left as-is:
.github/ISSUE_TEMPLATE/bug.yml,build.gradle.kts,.github/BUG_FINDING.md, and the other unlisted files — none reviewed for this change.review fix 1: Major finding (comparison boundary test, OptionsIntegrationTest.java): rewrote
chainDteComparisonBoundaryIsInclusiveAtGteAndExclusiveAtLtso both the>=boundaryand<boundaryhalves assertcontainsExactlyElementsOfagainst the exact baseline slice (dtesfiltered>= boundary/< boundary) rather than a barecontains/doesNotContain; a server ignoring the filter and falling back to its front-month default no longer passes either half. AddedallMatch(d -> d >= boundary)to the GTE half as the reviewer asked, subsumed by the exact-match that follows it.Minor (range test, line 186): reworked
chainDteRangeKeepsExpirationsWithinInclusiveBoundsto use an interior subrange (dtes.get(1)..dtes.get(size-2)) instead of the full first..last span, and added adoesNotContain(belowRange, aboveRange)assertion proving the baseline dtes outside the requested range are excluded; kept the existing inclusive-endpoint assertion.liveDistinctDtes()'s minimum-size guard raised from 3 to 4 distinct dtes so the new interior subrange always has an excluded baseline value on each side; its doc comment updated accordingly.Minor (inclusive/exclusive documentation ambiguity, line 232): left unresolved —
<and>=are standard relational operators with unambiguous mathematical meaning (not a server-specific behavior requiring API-team confirmation), and no documentation comment,docs/, or example in this change asserts anything beyond that inherent meaning, so there is no unsettled disagreement to flag or hedge.Re-ran
gradle test --no-daemon --console=plain(BUILD SUCCESSFUL, unit tests unaffected) andgradle build --no-daemon --console=plain; onespotlessApplypass was needed to reformat the new integration-test lines, after which the full build (compile, 100% line coverage verification, spotlessCheck, integrationTestClasses compiled/SKIPPED at runtime) passed.No production code, documentation, or other test files changed in this cycle beyond the integration test; the test files still contain only additions (0 deletions) versus the prior cycle.
changelog: Added changelog entry under
## [Unreleased]documenting the three newExpirationFilterfactory methods (dteList,dteRange,dteComparison) for API release 2.0.0's string forms of thedteparameter. Entry includes sealed subtypesDteList/DteRange/DteComparison,Operatorenum (GT, GTE, LT, LTE) withwireValue()accessor, and constantsMIN_DTE/MAX_DTE. Notes that existingExpirationFilter.dte(int)works unchanged.Edit successful; CHANGELOG.md updated.
Files
CHANGELOG.mddocs/options/chain.mdexamples/consumer-test/src/main/java/com/marketdata/examples/resources/OptionsAdvancedExample.javasrc/integrationTest/java/com/marketdata/sdk/OptionsIntegrationTest.javasrc/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: minor
ExpirationFilter.dteList(List<Integer>)— New static factory; dte(int) and all existing ExpirationFilter factories are unchanged.ExpirationFilter.dteRange(int, int)— New static factory for the inclusive dte range form.ExpirationFilter.dteComparison(ExpirationFilter.Operator, int)— New static factory for the dte comparison form.ExpirationFilter.DteList— New permitted subtype of the sealed ExpirationFilter interface; per this repository's rule, the sealed parent itself is not listed as changed, and an exhaustive switch over ExpirationFilter without a default branch will need a new case.ExpirationFilter.DteRange— New permitted subtype of the sealed ExpirationFilter interface.ExpirationFilter.DteComparison— New permitted subtype of the sealed ExpirationFilter interface.ExpirationFilter.Operator— New public enum (GT, GTE, LT, LTE) used by dteComparison; its constants are part of this new type, not separately listed.ExpirationFilter.Operator.wireValue()— New accessor method on the new Operator enum.ExpirationFilter.MIN_DTE— New public static final int constant (0).ExpirationFilter.MAX_DTE— New public static final int constant (36500).Live-API suite
src/integrationTest/java/com/marketdata/sdk/OptionsIntegrationTest.javaFiles of this suite changed by this pull request. The pipeline ran the ones the change added or modified against the live API before the pull request, and they passed; this pull request's CI runs the whole suite.
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) · 2 review(s) · 128 turns · 15,986,553 tokens · US$ 7.07 · item
5c097984-5f7b-401b-abba-235a3f417767Agent runs