Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .speakeasy/overlays/retry-transient-status-codes.overlay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Retry request-timeout and rate-limit responses
version: 0.0.0
actions:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] No CI step regenerates the spec or applies this overlay to confirm the update action appends 408/429 rather than replacing the existing statusCodes array.

Details

Why: The PR description states speakeasy overlay apply was run manually and produced statusCodes: [5XX, 408, 429], but this repo's CI has no check that regenerates the spec from this workflow. If the overlay's array semantics ever behaved as a wholesale replace instead of an append (or a future Speakeasy version changed that behavior), 5XX would silently drop out of the retry config with no signal — every other overlay in this directory only ever sets a scalar or object field, so there's no existing regression test covering array-update semantics either.

Fix: Add a lightweight CI step (or a local pytest-style check) that runs the overlay against the base spec and asserts the resulting statusCodes list contains 5XX, 408, and 429 — turning the author's one-time manual verification into a repeatable regression guard.

Ref: OpenAPI Overlay Specification — array update semantics

Prompt for agents
In .speakeasy/workflow.yaml and .speakeasy/overlays/retry-transient-status-codes.overlay.yaml, add a CI check (e.g. a new step in an existing GitHub Actions workflow, or a small script under a test/ or scripts/ directory) that runs `speakeasy overlay apply` (or the equivalent library call) against `.speakeasy/in.openapi.yaml` with this overlay and asserts the resulting `x-speakeasy-retries.statusCodes` array contains all of "5XX", "408", and "429". This turns the manual verification described in the PR body into an automated regression guard against future Speakeasy version changes to array-update semantics.

Reviewed at 4e39d32

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, no CI covers it. Verified locally with speakeasy overlay apply: statusCodes becomes [5XX, 408, 429] (append keeps 5XX). -- Claude

- target: $["x-speakeasy-retries"].statusCodes
description: Also retry 408 (request timeout) and 429 (rate limit), not just 5XX
update:
- "408"
- "429"
1 change: 1 addition & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sources:
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
- location: .speakeasy/overlays/retry-transient-status-codes.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
Expand Down