Repository navigation
Fix historical period requests rejected by the API - #145
karlwaldman wants to merge 2 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Adversarial review of exact head f10ee09: BLOCK — silent historical truncation in the newly supported period routes. Read-only production, internal QA key, 2026-10-31: Re-ran exact-head historical + pagination unit suites in an isolated worktree: 37 tests passed, but they do not model the live 100-row window cap. Production also confirmed the old period query returns 400 and the three selected window endpoints return 200, and a 2024 explicit-date window returns rows within its requested range. Those checks do not resolve the truncation. Please have the generator honor the effective page size or next-page/truncation metadata for these window routes, add a 500-request/100-response multi-page regression and a normal short final-page test, verify against live window pagination, and rerun tests. The existing installed package remains broken until a compatible SDK is actually published or an independently tested server compatibility path ships. |
|
Adversarial re-review of exact head b87632b: APPROVE, subject to CI and repository release controls. The earlier BLOCK was silent pagination truncation at the production 100-row window cap. The updated generator clamps its request/short-page comparison to 100, and tests model a capped 100-row response across many pages and a short final page. In an independent detached exact-head worktree, Tradeoffs and limits: the exported |
|
Clarification: the review does not assert that required checks exist on this repository. The PR description says main has no required status checks and auto-merge is disabled. CI passing is useful evidence, but it does not supply the missing repository protection; the risk gate must fail closed. |
getHistoricalPrices({ period: "past_week" })sent an unsupportedperiodquery to/v1/prices/past_year, which production rejects with HTTP 400UNKNOWN_PARAMETERS. Select the requested supported window route instead; keep custom dates onpast_year, and reject unknown periods or period-plus-date combinations before a request.The paginator also assumed a 500-row cap. Live raw window responses currently apply a 100-row cap, so a 500-row request could stop after the first 100 rows. Clamp automatic historical pagination to 100 and update the documented exported cap. This can require more calls, but prevents silently truncated history.
Reproduced the 400 with an internal QA key. The period regression and a 100-row-server-cap regression failed before the fixes. The historical and pagination suites now pass (42 tests),
pai-checkpassed for all changed TypeScript files, and the package build passed. The built SDK returned WTI data from all three period routes and fetched two distinct 100-row raw pages in production using an internal QA key.Fixes #144 when merged and released. Existing installed SDK versions remain affected until updated; evaluate a separately tested backend compatibility path for them in OilpriceAPI/oilpriceapi-api#5913. Repository auto-merge is disabled and main has no required status checks; do not merge by bypassing repository release controls.