Skip to content

Make the weekly SDK regen actually release - #30

Merged
callumreid merged 1 commit into
mainfrom
callum/sdk-release-automation
Jul 30, 2026
Merged

Make the weekly SDK regen actually release#30
callumreid merged 1 commit into
mainfrom
callum/sdk-release-automation

Conversation

@callumreid

Copy link
Copy Markdown
Collaborator

You thought the weekly regen-and-publish was already set up. Half of it was: the regen runs weekly and opens a PR. The publish half never existed.

What was actually wired

Workflow Trigger Publishes?
regenerate-sdks.yml weekly Mon 02:00 PST no — opens a PR only
publish-coval-sdk.yml tag python-sdk-v* yes
publish-coval-npm.yml tag typescript-sdk-v* yes

Nothing connects a merged regen PR to a release. PyPI confirms it — five releases ever, on three days (May 13, Jul 14, Jul 29). Never weekly.

And a regen PR could not have been released even if merged: it never bumped a version, and its add-paths allowlist excluded pyproject.toml and package.json. That's why #26 needed #27 purely to become releasable.

Changes

1. The regen bumps versions. Patch bump for whichever SDKs actually changed, via scripts/bump-sdk-version.py. Re-runs codegen when Python moved, since the package version is baked into the generated tree by generate-sdks.sh. Manifests and the pinned test assertion are added to add-paths.

2. release-on-version-bump.yml tags any version on main lacking a matching tag, which fires the existing publish workflows. Uses REGEN_PR_TOKEN deliberately — a tag pushed with GITHUB_TOKEN does not trigger other workflows, so the publish jobs would silently never run.

3. Failure alerting. The regen files an issue when it fails, reusing one issue so repeated weekly failures accumulate in a thread rather than spamming.

That third one is the real bug. This job failed silently every week from July 13 to July 29 — sixteen days of the SDKs drifting from the API, through the entire Upstart investigation, with no signal. A scheduled workflow has no reviewer and nobody watches the Actions tab.

Resulting cadence

Monday 02:00 PST → regen → PR with the version already bumped → you merge → auto-tag → published. One click a week, with a human still seeing the diff. Worth keeping that gate: the last regen silently introduced breaking model renames (CovalRunsAPIRunCovalRunsAPIRunResource), which no CI check can distinguish from a docstring tweak.

Verified

The bump step was extracted from the YAML and run under bash, as Actions would:

case result
no generated changes exits 0, no bump
TypeScript changed only bumps TS to 0.4.1, leaves Python at 0.5.0, exits 0

Tag logic checked against the live repo: python-sdk-v0.5.0 and typescript-sdk-v0.4.0 are correctly detected as already released, so a no-op push does nothing.

Two bugs found and fixed while testing:

  • changed X && args=... aborts the whole step under set -euo pipefail when changed returns false, since a failing && list is itself a failing statement. That would have killed every run where only one SDK changed — the common case. Now uses explicit if blocks and a bash array.
  • Change detection uses git status, not git diff: a new spec model arrives as an untracked file and never appears in a diff against HEAD.

Note

No Linear issue attached — the Linear MCP isn't reachable from this session and there's no API key on disk.

The weekly job regenerated the SDKs and opened a PR, but nothing connected a
merged regen to a published package. It also never bumped a version, and its
add-paths allowlist excluded the manifests, so a merged regen PR was
structurally incapable of being released. Every release since May has been a
hand-pushed tag.

Three changes:

- the regen bumps the patch version of whichever SDKs actually changed, and
  re-runs codegen when Python moved, since the package version is baked into
  the generated tree
- release-on-version-bump.yml tags any version on main without a matching tag,
  which fires the existing publish workflows. Uses the PAT, because a tag
  pushed with GITHUB_TOKEN does not trigger other workflows
- the regen files an issue when it fails, reusing one so weekly failures
  accumulate in a thread

That last one is the actual bug: this job failed silently every week from
07-13 to 07-29 and the SDKs drifted from the API for sixteen days with no
signal at all.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@callumreid, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 00f055c4-dab3-4993-9e55-11ab51e186bf

📥 Commits

Reviewing files that changed from the base of the PR and between feb489f and 3699849.

📒 Files selected for processing (3)
  • .github/workflows/regenerate-sdks.yml
  • .github/workflows/release-on-version-bump.yml
  • scripts/bump-sdk-version.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@callumreid
callumreid merged commit 82575a4 into main Jul 30, 2026
5 checks passed
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