Skip to content

fix: deterministic SDK order in generated snippet overrides - #65

Closed
generall wants to merge 1 commit into
mainfrom
fix/deterministic-snippet-order
Closed

generall wants to merge 1 commit into
mainfrom
fix/deterministic-snippet-order

Conversation

@generall

Copy link
Copy Markdown
Member

Every PR showed thousands of changed lines in openapi-overrides.yml because tools/generate_snippet_overwrites.py listed SDKs with glob.glob("snippets/*"), which returns directories in filesystem order. The order differs between machines and CI runners, so each sync reshuffled the code samples.

  • Sort the SDK list so the generated order is stable (alphabetical).
  • Regenerate the master and v1.19.x overrides once with the stable order. Content is unchanged: only the order of code samples differs (verified by comparing sorted structures).

Note: preview.yml runs the full OpenAPI sync on every PR, so a "Sync OpenAPI" commit with upstream spec changes may be pushed here. Its overrides diff should be empty, which confirms the fix. Revert or drop that commit before merging if the spec update should wait for 1.20.

🤖 Generated with Claude Code

glob() returns snippet directories in filesystem order, which differs
between machines and CI runners, so every sync reshuffled code samples
in openapi-overrides.yml. Sort the SDK list and regenerate the overrides
once with the stable order (content unchanged, reorder only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Generating preview for the latest commit ⌛

@generall generall closed this Oct 21, 2026
@generall
generall deleted the fix/deterministic-snippet-order branch October 21, 2026 17:33
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