Skip to content

chore: copy Plate release CI setup#292

Merged
zbeyens merged 3 commits into
mainfrom
codex/copy-plate-release-ci-setup
Jun 15, 2026
Merged

chore: copy Plate release CI setup#292
zbeyens merged 3 commits into
mainfrom
codex/copy-plate-release-ci-setup

Conversation

@zbeyens

@zbeyens zbeyens commented Jun 15, 2026

Copy link
Copy Markdown
Member

🐛 Fixes ➖ N/A

🟢 95-100% confidence

Phase 🧪 Tests 🌐 Browser
Reproduced Source-audited Plate release CI/setup against KitCN N/A: CI/release setup only
Verified bun check; focused release helper tests; autoreview clean N/A: no UI changed

✅ Outcome

  • Ported Plate-style release workflow, release-note prompt, cache cleanup workflow, shared Bun install action, and release helper scripts/tests into KitCN.
  • Moved auto-release helper to tooling/scripts/auto-release-pr.mjs and updated workflows to use it.
  • Reused the shared install action in CI, skill checks, and Convex matrix jobs.
  • Removed Plate-style standalone ## Contributors and Full changelog release-note footers.

⚠️ Caveat

  • Did not port Plate sync-version-package-releases.*; it is tied to Plate's release-index/template sync system, which KitCN does not have.
  • Release execution still depends on repo secrets/vars (NPM_TOKEN, Claude token, optional release app credentials), which local checks cannot prove.

🏗️ Design

  • Keep release automation hardened: no PR-code helper execution with write tokens; checkout credentials are not persisted in CI.
  • Keep GitHub Releases explicit: package tags are validated/pushed, release notes are generated deterministically, AI rewrites are validated before use, and standalone release footers are rejected.

🧪 Verified

  • bun lint:fix
  • bun test ./tooling/scripts/auto-release-pr.test.ts ./tooling/scripts/prepare-release-changesets.test.ts ./tooling/scripts/published-package-tags.test.ts ./tooling/scripts/release-notes.test.ts ./tooling/scripts/release-workflow.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local
  • bun check passed after rerunning one unrelated package-intent timeout successfully

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-convex Ready Ready Preview, Comment Jun 15, 2026 6:50pm

Request Review

@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f0d7325

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be9e5db6b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +33 to +34
const contributorPattern =
/by \[@([A-Za-z0-9-]+)\]\(https:\/\/github\.com\/[^)]+\)/g;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Capture Changesets contributors in release notes

In this repo, Changesets changelog entries are emitted as Thanks [@zbeyens](...), but this regex only matches by [@...]. When generateRawReleaseNotes() runs for a normal package release, collectContributors() never adds those authors, so the generated GitHub Release omits the Contributors section even though the package changelog has contributors; I verified this against the existing kitcn 0.15.13 changelog shape.

Useful? React with 👍 / 👎.

echo "Deleting caches..."
for cacheKey in $cacheKeys; do
echo "Deleting cache: $cacheKey"
gh actions-cache delete "$cacheKey" -R $REPO -B $BRANCH --confirm

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Grant actions write before deleting caches

When this workflow runs in a repository/org with restricted default GITHUB_TOKEN permissions, this delete command calls the Actions cache delete API without permissions: actions: write; GitHub's REST docs for deleting Actions caches require Actions repository permissions (write), so closed-PR cleanup can 403 instead of clearing the caches it just listed.

Useful? React with 👍 / 👎.

process.exit(result.status ?? 1);
}

return JSON.parse(result.stdout || readFileSyncUtf8(statusOutputPath));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Read Changesets status from the output file

When a main push has a manual changeset, this parses result.stdout before the JSON file even though Changesets documents status --output={filePath} as writing the JSON status to that file; the CLI's normal human status output is not JSON, so a non-empty stdout report will make JSON.parse(result.stdout) throw before the release PR can be prepared. Since the command already writes .tmp/prepare-release-changesets-status.json, parse that file instead of preferring stdout.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce33d3c104

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
"check": "bun run check:ci && bun run test:verify && bun run test:runtime",
"check:ci": "bun lint && bun typecheck && bun run test && bun run test:cli && bun run test:concave && bun run fixtures:check",
"ci:release": "bun run release",
"ci:version": "bun changeset version && bun install --no-frozen-lockfile",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Run the Changesets binary in ci:version

When the release workflow reaches changesets/action with version: bun run ci:version, this script executes bun changeset version; Bun treats changeset as a Bun script/subcommand, not a package binary. I checked bun changeset --help in this repo and it exits with error: Script not found "changeset", so version PR creation fails before bun install; invoke the Changesets binary directly from the script PATH or via bunx instead.

Useful? React with 👍 / 👎.

);
const packageJsonPath = new URL('../../package.json', import.meta.url);

test('release workflow uses the copied GitHub Release path', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire release tooling tests into CI

These new workflow/release tests live under tooling/scripts, but the repo's Bun test config scopes default bun test to ./packages, and check:ci only runs that default test command. As a result the release workflow assertions are skipped in normal CI and can only fail when someone remembers the targeted command; move them under the configured test root or add an explicit CI script for the tooling tests.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0d732532a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +5 to +6
pull_request:
types: [closed]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run fork PR cleanup from the base context

When this workflow is triggered by a closed PR from a fork, pull_request runs with a read-only GITHUB_TOKEN, so the later cache delete call still cannot remove Actions caches even if the workflow requests actions: write. Since this cleanup does not need to execute PR code, use pull_request_target or explicitly skip fork PRs; otherwise fork PR caches remain after close.

Useful? React with 👍 / 👎.

@zbeyens zbeyens merged commit 91bc99a into main Jun 15, 2026
5 checks passed
@zbeyens zbeyens deleted the codex/copy-plate-release-ci-setup branch June 15, 2026 19:07
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