GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: release the SDK on any change that alters what it ships by josecarneiro · Pull Request #470 · epilot-dev/sdk-js

Conversation

@josecarneiro

@josecarneiro josecarneiro commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Why

The auto-release gate fires only on clients/*/openapi.json. That misses everything else that changes what @epilot/sdk actually ships:

  • The SDK's own runtime — proxy.ts, retry.ts, client-factory.ts, authorize.ts, overrides.ts, large-response.ts. A bug fix in any of these never publishes.
  • Hand-written client modules — schema-model.ts, additional-types.ts, index.ts.
  • The generator — scripts/generate-sdk-v2.ts, which changes the output of all 51 APIs.

This is not hypothetical: #464 and #469 both landed on main and published nothing. #464 only reached npm ~90 minutes later, as a passenger on #467, an unrelated spec PR. #469 is still unpublished.

The trap this has to avoid

The auto-release job commits back to main, and that commit touches generated SDK output. From 5e39d9ce:

packages/epilot-sdk-v2/package.json                  |   2 +-
packages/epilot-sdk-v2/src/types/entity-mapping.d.ts | 197 +++-

So a naive packages/epilot-sdk-v2/src/** pattern would make the release commit re-trigger its own gate → bump → push → trigger → an unbounded release loop. The existing [skip release] guard does not save you, because the release commit's message is @epilot/[email protected], @epilot/[email protected].

The gate works today partly by accident: the release commit happens to match nothing in it. Widening removes that accidental protection, so this PR restores it deliberately.

What changed

The gate matches hand-written paths and excludes generated output:

SDK_PATHS='^(clients/.*/openapi\.json$|clients/[^/]+/src/(schema-model|additional-types|index)\.ts$|scripts/generate-sdk-v2\.ts$|packages/epilot-sdk-v2/src/)'
SDK_GENERATED='^packages/epilot-sdk-v2/src/(apis|types|models|definitions|docs)/|^packages/epilot-sdk-v2/src/client-map\.ts$'

if echo "$CHANGED_FILES" | grep -E "$SDK_PATHS" | grep -qvE "$SDK_GENERATED"; then

A denylist for the generated dirs rather than an allowlist of runtime files, so a new hand-written module is covered by default instead of silently missed.

The release commit now carries [skip release], which the job's own if already honours — a second layer, in case the exclusion is later widened carelessly. The path exclusion alone closes the loop; this makes it hard to reopen by accident.

The CLI gate is untouched.

Test plan

Ran the new expression against real commit file lists, including the actual release commit:

Case Expected Result
Spec change (today's only trigger) trigger ✅ sdk=true
#464 — generator + pricing schema-model.ts trigger ✅ sdk=true
#469 — entity + pricing allowlists trigger ✅ sdk=true
SDK runtime fix (src/retry.ts) trigger ✅ sdk=true
Generator change alone trigger ✅ sdk=true
The auto-release commit 5e39d9ce itself no trigger ✅ sdk=false
Docs-only no trigger ✅ sdk=false
Changeset-only no trigger ✅ sdk=false
Generated output only no trigger ✅ sdk=false
  • .github/workflows/ci.yml parses as valid YAML, all five jobs intact
  • pnpm lint clean

Out of scope

This covers @epilot/sdk only. The client packages (@epilot/pricing-client et al.) publish through changesets, which is manual — that is why pricing-client sits at 3.56.2 in the repo against 3.55.1 on npm. Whether that should auto-publish on merge is a separate decision.


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
ci: release the SDK on any change that alters what it ships
a83d231
The auto-release gate only fired on `clients/*/openapi.json`, so a change
to the SDK's own runtime (proxy.ts, retry.ts, client-factory.ts), to a
hand-written client module (schema-model.ts, additional-types.ts), or to
the generator itself never published. #464 and #469 both landed on main
unpublished and only shipped when an unrelated spec PR swept them up.

The gate now matches those paths too, and excludes the generated output
under src/{apis,types,models,definitions,docs} — the auto-release commit
rewrites those itself, so matching them would make it re-trigger this job
and bump versions in a loop. The release commit also now carries
`[skip release]`, which the job's own `if` already honours, as a second
layer in case the exclusion is later widened carelessly.

Verified the new expression against real commit file lists: a spec change,
#464, #469, an SDK runtime fix and a generator change all trigger; the
auto-release commit 5e39d9c, docs-only, changeset-only and
generated-output-only changes all do not.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PXhwfYV419Bodt42E3aw2C
@josecarneiro josecarneiro mentioned this pull request Sep 2, 2026
ci: release the SDK when any client source file it ships from changes #476
Merged
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@josecarneiro @claude
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.