feat(ci): Add kotlin to SDK generation workflows#21
Merged
gjtorikian merged 4 commits intomainfrom May 6, 2026
Merged
Conversation
Extract the current API surface from a clean HEAD worktree and pass it via --api-surface so generation stays aware of the existing public surface. Recover tracked manifest files missing from the working tree before extraction so a partially-deleted SDK still produces a faithful surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
workos/workos-go#545 surfaced two failure modes in the regen PR builder. (1) The spec dropped `default: desc` from 31 list endpoints' `order` query parameter, but the PR body had no entry for the silent server-default flip and release-please picked a minor bump. (2) Two `feat(…)!: Change email field type in multiple models` headlines were hallucinated by Claude Haiku from struct-tag diffs (`url:"-"` added to existing fields whose Go types did not change), then duplicated across services for the same shared field set. Both root-cause to the classify_changes step over-trusting the raw `git diff` text and ignoring the structured oagen diff. Two fixes in this workflow: Pre-render `diff-report.json` `behaviorChanges` deterministically into a single `feat!: change default for <param> in list operations` override line and a `## BREAKING: Behavior changes` section in the PR body. Force the rollup to feat! whenever any behavior change exists so release-please bumps the major — independent of whether Claude returns soft entries. Tighten the classify_changes tool: type-change verdicts must ground in the structured diff (a Go field gaining `url:"-"` is not a type change), add a `chore` prefix for cosmetic diffs that should not bump the version, and add an explicit dedup rule for cross-service identical change-sets.
The matrix entry alone is not enough to land kotlin in the generation mix: the workflow_dispatch choice list, the runtime setup action, and the diff-report test classifier each branch per-language and would silently drop kotlin otherwise. - generate-prs.yml: kotlin is selectable when manually triggering a single-language run. - setup-sdk-runtime: detect the JVM version from build.gradle.kts and install temurin + the gradle wrapper cache so the kotlin emitter's post-generate `./gradlew ktlintFormat` succeeds. - build-sdk-diff-report: classify src/test/**, *Test.kt, *Tests.kt as tests so they are not miscounted as code changes.
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
pick it up alongside the other backend SDKs.
list so it can be triggered as a single-language run.
version from build.gradle.kts and install temurin + the gradle
wrapper cache. The kotlin emitter shells out to
./gradlew ktlintFormatafter generation, so a JDK has to be on the runner.
src/test/**,*Test.kt,*Tests.kt) inbuild-sdk-diff-report so they don't get miscounted as code changes
in the PR diff report.
Test plan
languages=kotlinandconfirm the kotlin job reaches the Generate SDK step and that
./gradlew ktlintFormatruns without a missing-Java failure.matrix leg, including
script/ciand the compat snapshot.confirm files under
src/test/show up in the test bucketrather than the code bucket.