Skip to content

feat: regenerate for openapi 0.99.2 (202 on getBacktestResult) - #2

Merged
mrmx merged 1 commit into
mainfrom
feat/regenerate-for-spec-0.99.2
Jul 27, 2026
Merged

feat: regenerate for openapi 0.99.2 (202 on getBacktestResult)#2
mrmx merged 1 commit into
mainfrom
feat/regenerate-for-spec-0.99.2

Conversation

@mrmx

@mrmx mrmx commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Regenerated from spec 0.99.2, which declares the 202 the execute-result endpoint already returned. Bumped to 0.6.0.

The generated change

GetBacktestResultResponse widens from BacktestJobResult to a union with the 202's empty-object type:

export type GetBacktestResultResponses = {
    200: BacktestJobResult;
    202: { [key: string]: never };   // job known, result not readable yet — keep polling
};

Why minor, not patch

Reading data.state still compiles — the 202 member is an index signature, so the property resolves and the union access is fine. But assigning the response to BacktestJobResult no longer does, so a consumer doing const r: BacktestJobResult = data! breaks. That is a consumer-visible type change and deserves the minor.

A polling caller must treat the 202 member as "ask again", never as a finished job: it carries no state, which is exactly what stops a poll loop from mistaking it for a completed run with no results.

Validation

tsc --noEmit clean, tsup build clean. Diff is limited to sdk.gen.ts (doc comment) and types.gen.ts (the union member) — no other operation moved.

The spec now declares the 202 the execute-result endpoint already returned: the
job is known but its result is not readable yet, so the response carries an
empty body and no state.

GetBacktestResultResponse widens from BacktestJobResult to a union with the
202's empty-object type. That is why this is a minor and not a patch: reading
`data.state` still compiles (the 202 member is an index signature, so the
property resolves), but assigning the response to BacktestJobResult no longer
does. A polling caller must treat the 202 member as "ask again", never as a
finished job.

Bumped to 0.6.0. Typecheck and build clean.
@mrmx
mrmx merged commit dbf33d4 into main Jul 27, 2026
3 checks passed
@mrmx
mrmx deleted the feat/regenerate-for-spec-0.99.2 branch July 27, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant