ci: add Stainless SDK build workflow#221
Merged
declan-scale merged 3 commits intomainfrom May 5, 2026
Merged
Conversation
Triggers on PRs and pushes to main that touch agentex/openapi.yaml. The committed spec is the source of truth (kept fresh by the openapi-spec CI job and the agentex-openapi-spec pre-commit hook), so the workflow can read it directly via git history at base/head SHAs — no in-CI generation needed.
a5848ae to
08abdb4
Compare
smoreinis
approved these changes
May 5, 2026
✱ Stainless preview buildsNo changes were made to the SDKs. This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Stainless SDK build workflow that runs whenever
agentex/openapi.yamlchanges. The committed spec is the source of truth (kept fresh by theopenapi-specCI job and theagentex-openapi-specpre-commit hook from #220), so the workflow reads it directly via git history at PR base and head SHAs — no in-CI spec generation, no submodule gymnastics.Why here instead of scaleapi/agentex
SDK preview comments now land on the PR that actually changed the API, so contributors see "did this break the SDK?" before merging — not after a downstream submodule bump. Replaces the more complex workflow proposed in scaleapi/agentex#342, which I'll close in favor of this.
Test plan
agentex/openapi.yamlproduce a Stainless merge buildGreptile Summary
.github/workflows/stainless.ymlworkflow that triggers Stainless SDK preview builds on PRs touchingagentex/openapi.yamland merge builds on pushes tomain, using a sparse full-history checkout so the action can compare base and head spec versions without submodule complexity.concurrencyblock usescancel-in-progress: truewith agithub.ref-based group; forpushevents tomainthis can silently drop intermediate merge builds (already flagged in an existing review thread).fail_on: fatalmeans only fatal Stainless validation errors will fail the job — schema warnings and non-fatal issues pass silently.Confidence Score: 4/5
Safe to merge with minor concerns; the concurrency issue on main was already flagged and the workflow is otherwise well-structured.
No new P0/P1 issues beyond the already-flagged cancel-in-progress concern. The workflow is minimal, uses a pinned action SHA, appropriate OIDC permissions, and efficient sparse checkout. Score capped at 4 due to the outstanding P1 in the existing thread.
No files require special attention beyond the concurrency block in .github/workflows/stainless.yml.
Important Files Changed
Sequence Diagram
sequenceDiagram participant GH as GitHub participant WF as stainless.yml workflow participant Checkout as actions/checkout@v6 participant Stainless as stainless-api/build action GH->>WF: pull_request (openapi.yaml changed) WF->>Checkout: sparse-checkout agentex/openapi.yaml, fetch-depth: 0 Checkout-->>WF: full history + sparse tree WF->>Stainless: org=sgp, project=agentex-sdk, oas_path, fail_on=fatal Stainless-->>GH: Post SDK preview comment on PR GH->>WF: push to main (openapi.yaml changed) WF->>Checkout: sparse-checkout agentex/openapi.yaml, fetch-depth: 0 Checkout-->>WF: full history + sparse tree WF->>Stainless: org=sgp, project=agentex-sdk, oas_path, fail_on=fatal Stainless-->>GH: Trigger Stainless merge build (SDK publish)Reviews (3): Last reviewed commit: "remove dummy commit" | Re-trigger Greptile