Repository navigation
sdk-sync: API 2.0.0+ffb34b7 → sdk-java (minor) - #101
marketdata-sdk-sync[bot] wants to merge 2 commits into
Conversation
tests: Added tests (no production code) for the GET /v1/options/chain dte parameter's type change (int → string with 4 forms). Unit wire tests in OptionsResourceTest cover the 3 new forms — comma-list (ExpirationFilter.dteList), closed range (dteRange), and all 4 comparison operators (dteComparison with GT/GTE/LT/LTE) — plus validation tests for empty/negative/>36500 inputs on these new methods only; the existing single-value dte(int) form and its validation are left untouched as the regression case. Integration tests in OptionsIntegrationTest add one test per form plus boundary-inclusion/exclusion checks, all derived from a live-discovered dte board (no hardcoded dates/values) against AAPL only. Added SdkSyncCompatProbe exercising today's ExpirationFilter.dte(int) and OptionsChainRequest builder usage. The exact wire syntax for the three new forms (dash-joined range, operator-prefixed comparison reusing StrikeFilter.Operator) is my design choice for phase 2 to implement — if the live API's actual encoding disagrees, that's for the implementer to surface. implement: Implemented the chain endpoint's dte parameter widening (int → string) by adding three additive ExpirationFilter variants — dteList (comma list), dteRange (closed range), dteComparison (reusing StrikeFilter.Operator) — alongside the unchanged dte(int) form, wired into OptionsResource's query-building. - Doc of new methods/types with example: docs/options/chain.md updated (signatures + Java example); OptionsAdvancedExample.java demos all three new forms. - Doc comment on every new public member: added to dteList/dteRange/dteComparison factories and DteList/DteRange/DteComparison records. - One wire test per form/enum value: unit tests cover list, range, and all 4 comparison operators separately (phase 1, unchanged); live-derived boundary tests for each form in OptionsIntegrationTest. - Validation holds on every public path: compact constructors on DteList/DteRange/DteComparison enforce non-negative/≤36500/min≤max/non-empty/non-null directly, not only via the static factories; added tests constructing DteList's record directly (empty, null list, null element). - No coverage exclusions added; gradle test and gradle build (incl. 100% JaCoCo, Spotless) both green. - Examples/docs already showing what changed: docs/options/chain.md and OptionsAdvancedExample.java updated; README.md's chain snippet and OptionsExample.java left unchanged — correct as-is, neither claimed to enumerate every filter form before. - Existing parameter keeps accepting everything it did: dte(int) and its validation/error type are untouched. Left unedited, not relevant to this delta (no dte-specific content found): docs/client.md, docs/options/quotes.md, docs/options/README.md, docs/options/expirations.md, docs/options/lookup.md, src/test/java/.../JsonResponseParserTest.java, RequestValidationTest.java, docs/adr/ADR-006 and ADR-008 (the sealed-filter convention they establish already covers this extension), docs/.sync-manifest.txt (marked auto-generated, do-not-hand-edit). Outside my limits, left as-is: .github/ISSUE_TEMPLATE/bug.yml and other files outside docs/src — not reviewed for dte-specific content per the task's scope. review fix 1: Fixed the three major findings in OptionsIntegrationTest.java, all about dte comparison/single-value tests that would pass even if the server ignored the filter (front-month default masking an ignored parameter): - chainDteSingleValueStillSelectsClosestExpiration: now picks the board's last entry (away from the front) instead of the front-month value, so an ignored dte would return the wrong expiration and fail. - chainDteComparisonGteIncludesExactBoundaryDte: bound is now the board's middle entry (above the front), and asserts every returned dte >= bound, not just contains(bound); a front-month-only (ignored-filter) answer now fails the >= check. - chainDteComparisonLtExcludesExactBoundaryDte: now asserts every returned dte < bound and that more than one distinct dte comes back, in addition to doesNotContain(max); a front-month-only answer fails the distinct-count check. Left unresolved for a person: the GT boundary-semantics question at line 265 (unchanged, as instructed) — it already fails correctly if the filter is ignored, so it was not touched beyond the finding itself being out of scope. Did not touch chainDteComparisonLteIncludesExactBoundaryDte, chainDteRangeIncludesInclusiveBoundaries, chainDteRangeExcludesDteBelowRaisedLowerBound, or chainDteListReturnsClosestExpirationPerValue — none were flagged, and each already fails if the filter is ignored (their bound/list values differ from the front-month default). gradle test and gradle build (compileIntegrationTestJava included) both pass; no production code, documentation, or other test files changed in this round. changelog: Added `### Added` section to `CHANGELOG.md` under `[Unreleased]` listing three new `ExpirationFilter` static factories: `dteList(int...)` for comma-separated selection, `dteRange(int, int)` for closed-range selection, and `dteComparison(StrikeFilter.Operator, int)` for comparison-operator selection. All reference API 2.0.0, the widening of the `dte` parameter from integer to string.
🧾 Job log — sdk-syncsdk-auto-sync job log
Changes in the API surface1. testsCoder (26 turns, US$ 1.34, 6 min 16 s):
Gates:
2. implementCoder (52 turns, US$ 2.36, 7 min 21 s):
Gates:
3. review 1Reviewer (9 turns, US$ 1.80, 3 min 20 s): 3 blocking finding(s)
4. review fix 1Findings sent back to the coder:
Questions for a person, shown to the coder and not for it to resolve:
Coder (9 turns, US$ 0.59, 2 min 17 s):
Gates:
5. review 2Reviewer (2 turns, US$ 0.39, 55 s): approved
6. securitySecurity (2 turns, US$ 0.43, 13 s): approved
7. assessAnalyst (4 turns, US$ 0.24, 29 s) — public surface:
Computed by the pipeline: minor; changelog entry written 8. changelogCoder (7 turns, US$ 0.09, 28 s):
Gates:
Questions for a personThe internal reviewers raised these for a person to answer. They did not block the change, and the coder was not asked to resolve them.
Totals
Agent runs
Code review fix 1 — 2026-10-30 13:34:18ZOutcome: done Time: 4 min 38 s (agents 3 min 41 s, gates 57 s) 1. code review fix 1The code review asked for changes:
Coder (25 turns, US$ 0.56, 2 min 20 s):
Gates:
2. review 1Reviewer (8 turns, US$ 0.61, 1 min 21 s): approved
3. securityThe pipeline:
Questions for a personThe internal reviewers raised these for a person to answer. They did not block the change, and the coder was not asked to resolve them.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
============================================
+ Coverage 98.27% 98.29% +0.02%
- Complexity 1043 1054 +11
============================================
Files 123 123
Lines 2606 2645 +39
Branches 301 309 +8
============================================
+ Hits 2561 2600 +39
Partials 45 45
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
⛔ Blocked — Code reviewThe patch adds list, range, and comparison forms for the options-chain DTE filter while preserving the existing single-value form. Version impact: minor; all six public symbols are additive. The implementation codifies strict comparison semantics even though the API release language remains contradictory. Rating patch 3/6 (incomplete) · proof 6/6 (comprehensive) · overall 3/6 Decision neededWhat are the intended boundary semantics for DTE comparison operators?
Recommended: Use standard operator semantics—strict Before merge
FindingsBlocking
Should fix
Since last review
Reviewed |
code review fix 1: Fixed the one blocking finding (contradictory boundary wording in `OptionsIntegrationTest.java`): the comments on `chainDteComparisonGteIncludesExactBoundaryDte`, `chainDteComparisonGtExcludesExactBoundaryDte`, and `chainDteComparisonLtExcludesExactBoundaryDte` quoted the release text's "...falls within the bounds, inclusive" next to assertions that `>`/`<` are strict, which read as contradictory. Checked `StrikeFilter.java`'s own javadoc ("Match strikes satisfying `operator price`") and `ExpirationFilter.java`'s existing `dteComparison` javadoc (which already says only "the syntax matches strike", never claims inclusive) — the strict `>`/`<` behavior the tests assert is what "the syntax matches strike" implies, and production code/docs never asserted the "inclusive" reading for comparisons in the first place (only `dteRange` is documented as inclusive, correctly). This is the second case in the brief: the release text is ambiguous/self-contradictory, and the real API does what the "matches strike" statement implies, so I reworded the three test comments to state the strict/inclusive split in those terms instead of quoting the inclusive phrase unqualified; the assertions themselves (already fixed in review round 1) were not weakened. The strictness-vs-release-text question itself is unresolved and still needs a person to confirm with the API team — this matches the two "question for a person" items already on record in `.sdk-sync/job-log.md` (lines tied to `chainDteComparisonGtExcludesExactBoardDte`), which this fix does not and cannot settle. No production code, CHANGELOG, or other docs changed — no behavior or public-surface change resulted from this fix.
🙋 Needs a person — sdk-syncWhy: git push: error: failed to push some refs to 'https://github.com/MarketDataApp/sdk-java.git' Pending findings
Decision needed
Code-review fix rounds used: 2 of 2 · CI repairs used: 0 of 2 What to do
This pull request is back to draft and labelled |
|
Closing to re-run the SDK sync for API 2.0.0 from the start. |
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: Added tests (no production code) for the GET /v1/options/chain dte parameter's type change (int → string with 4 forms). Unit wire tests in OptionsResourceTest cover the 3 new forms — comma-list (ExpirationFilter.dteList), closed range (dteRange), and all 4 comparison operators (dteComparison with GT/GTE/LT/LTE) — plus validation tests for empty/negative/>36500 inputs on these new methods only; the existing single-value dte(int) form and its validation are left untouched as the regression case. Integration tests in OptionsIntegrationTest add one test per form plus boundary-inclusion/exclusion checks, all derived from a live-discovered dte board (no hardcoded dates/values) against AAPL only. Added SdkSyncCompatProbe exercising today's ExpirationFilter.dte(int) and OptionsChainRequest builder usage. The exact wire syntax for the three new forms (dash-joined range, operator-prefixed comparison reusing StrikeFilter.Operator) is my design choice for phase 2 to implement — if the live API's actual encoding disagrees, that's for the implementer to surface.
implement: Implemented the chain endpoint's dte parameter widening (int → string) by adding three additive ExpirationFilter variants — dteList (comma list), dteRange (closed range), dteComparison (reusing StrikeFilter.Operator) — alongside the unchanged dte(int) form, wired into OptionsResource's query-building.
Left unedited, not relevant to this delta (no dte-specific content found): docs/client.md, docs/options/quotes.md, docs/options/README.md, docs/options/expirations.md, docs/options/lookup.md, src/test/java/.../JsonResponseParserTest.java, RequestValidationTest.java, docs/adr/ADR-006 and ADR-008 (the sealed-filter convention they establish already covers this extension), docs/.sync-manifest.txt (marked auto-generated, do-not-hand-edit).
Outside my limits, left as-is: .github/ISSUE_TEMPLATE/bug.yml and other files outside docs/src — not reviewed for dte-specific content per the task's scope.
review fix 1: Fixed the three major findings in OptionsIntegrationTest.java, all about dte comparison/single-value tests that would pass even if the server ignored the filter (front-month default masking an ignored parameter):
Left unresolved for a person: the GT boundary-semantics question at line 265 (unchanged, as instructed) — it already fails correctly if the filter is ignored, so it was not touched beyond the finding itself being out of scope.
Did not touch chainDteComparisonLteIncludesExactBoundaryDte, chainDteRangeIncludesInclusiveBoundaries, chainDteRangeExcludesDteBelowRaisedLowerBound, or chainDteListReturnsClosestExpirationPerValue — none were flagged, and each already fails if the filter is ignored (their bound/list values differ from the front-month default).
gradle test and gradle build (compileIntegrationTestJava included) both pass; no production code, documentation, or other test files changed in this round.
changelog: Added
### Addedsection toCHANGELOG.mdunder[Unreleased]listing three newExpirationFilterstatic factories:dteList(int...)for comma-separated selection,dteRange(int, int)for closed-range selection, anddteComparison(StrikeFilter.Operator, int)for comparison-operator selection. All reference API 2.0.0, the widening of thedteparameter from integer to string.Questions for a person
The internal reviewers raised these for a person to answer. They did not block the change, and the coder was not asked to resolve them.
src/integrationTest/java/com/marketdata/sdk/OptionsIntegrationTest.java:265— For a person to settle with the API team: the release text says a comparison operator "(>=30, <45) returns every expiration whose dte falls within the bounds, inclusive", yetchainDteComparisonGtExcludesExactBoardDte(requestdte=>N, N an expiration on the live AAPL board) came back without the row at exactly N — i.e.>and<behave strictly, as "the syntax matches strike" implies. Worth confirming which statement the API intends.src/integrationTest/java/com/marketdata/sdk/OptionsIntegrationTest.java:341— For a person, tied to the look-1 question onchainDteComparisonGtExcludesExactBoardDte: the fix addedallMatch(d -> d < max)alongsidedoesNotContain(max), so this test now pins<as strict, which the release text ("within the bounds, inclusive") contradicts even though the live run agrees with it. I asked for that assertion, so it is not a finding against the author; it needs settling with the API team before the docs or tests treat either reading as final.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(int...)— New static factory for the comma-separated dte form; no existing call is affected.ExpirationFilter.dteRange(int, int)— New static factory for the closed-range dte form; no existing call is affected.ExpirationFilter.dteComparison(StrikeFilter.Operator, int)— New static factory for the comparison-operator dte form, reusing StrikeFilter.Operator; no existing call is affected.ExpirationFilter.DteList— New permitted subtype of the sealed ExpirationFilter interface; per repo rule this is additive and the sealed parent is not listed as changed, even though an exhaustive switch over ExpirationFilter now needs a new case.ExpirationFilter.DteRange— New permitted subtype of the sealed ExpirationFilter interface, additive per repo rule on sealed types.ExpirationFilter.DteComparison— New permitted subtype of the sealed ExpirationFilter interface, additive per repo rule on sealed types.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) · 3 review(s) · 111 turns · 14,205,225 tokens · US$ 7.23 · item
5c097984-5f7b-401b-abba-235a3f417767Agent runs