chore: pin SDK consumers after release#120
Conversation
|
Created a monitoring plan for this PR. What this PR does: Automates the post-release step of opening dependency-pin PRs in Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 05d9182. Configure here.
| fi | ||
|
|
||
| raw="$(gh release list --repo "$GITHUB_REPOSITORY" --limit 10 --json tagName,publishedAt --jq 'sort_by(.publishedAt) | last | .tagName')" | ||
| version="${raw#v}" |
There was a problem hiding this comment.
Release fallback picks wrong version
Medium Severity
When workflow_run triggers pinning, the resolved SDK version often comes from gh release list (newest publishedAt among the last 10 releases) because workflow_run.head_branch is usually not a semver tag for release-triggered Publish NPM runs. That version is not tied to the completed publish run, so a delayed or overlapping release can pin dashboard/MCP to a different @onkernel/sdk than the one just published.
Reviewed by Cursor Bugbot for commit 05d9182. Configure here.
|
|
||
| git add packages/dashboard/package.json bun.lock | ||
| git commit -m "chore(dashboard): pin @onkernel/sdk to $SDK_VERSION" | ||
| git push "https://x-access-token:${GH_TOKEN}@github.com/${repo}.git" "HEAD:$branch" --force-with-lease |
There was a problem hiding this comment.
Lease push blocks branch updates
Medium Severity
Consumer repos are cloned with --depth 1 and a new local branch is pushed with --force-with-lease, but the remote automation branch is never fetched. If automation/pin-node-sdk-* already exists on the remote, Git typically cannot establish a lease and rejects the push, so reruns that need to refresh the same branch (e.g. lockfile updates) fail after changes are committed locally.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 05d9182. Configure here.


Summary
Validation
Note
Low Risk
CI-only automation and a local package.json helper; no runtime SDK or app code changes in this repo.
Overview
Adds post-release automation so downstream repos pick up the new
@onkernel/sdkwithout manual bumps.A new Pin SDK Consumers workflow runs after Publish NPM succeeds on a release (or via manual dispatch with a version). It resolves a semver, uses a GitHub App token, and for
kernel/kernel(dashboard) andkernel/kernel-mcp-serverclones each repo, runs a helper to set an exact SDK version inpackage.json, runsbun install, and opens or skips a PR on branchautomation/pin-node-sdk-<version>.The helper
scripts/utils/pin-sdk-consumer.mjsrewritesdependencies["@onkernel/sdk"]to that exact version and rejects invalid input (including semver ranges like^0.62.0).Reviewed by Cursor Bugbot for commit 05d9182. Bugbot is set up for automated code reviews on this repo. Configure here.