ci(jetbrains): lock release source before reviewed publish#10627
Conversation
Code Review SummaryStatus: No New Issues | Recommendation: Merge Incremental review covers commits since Note: Previous Issues (carried forward, unchanged code)
Files Reviewed (1 file in this round)
Reviewed by claude-sonnet-4.6 · 391,580 tokens Review guidance: REVIEW.md from base branch |
This reverts commit 070d82c.
Issue
No linked issue; release infrastructure follow-up.
Context
JetBrains production builds derive their version from a
jetbrains/v...tag that points atHEAD, while JetBrains Marketplace change notes are injected frompackages/kilo-jetbrains/CHANGELOG.mdduring Gradle publish. The release flow therefore needs two guarantees: the source code being released is locked before changelog review begins, and the reviewed changelog is present before Marketplace publishing.Release Flow
prepare-jetbrains-releasemanually withkind,version, and optionalfrom_tag.origin/main, resolves its exact SHA, and creates or verifiesjetbrains/v<version>at that SHA immediately.jetbrains/release/v<version>withpackage.jsonandCHANGELOG.mdrelease metadata.JetBrains-Version,JetBrains-Kind,JetBrains-From-Tag,JetBrains-Tag, andJetBrains-Commit.publish-jetbrains; tag pushes no longer trigger publishing.JetBrains-Commit.jetbrains/v<version>for the build, and restores that reviewed changelog into the tag checkout.Implementation
script/jetbrains-release-pr.tsbefore PR branch creation.script/jetbrains-release-validate.ts, which validates only and never creates, moves, deletes, or pushes tags.publish-jetbrainsfrom a tag-push workflow to a merged-release-PR workflow.tag-jetbrains-release.ymland updates the workflow allowlist.Failure And Recovery Model
mainmoves after prepare, publishing is still safe because the build source is the existing tag, not latestmainor the release PR merge commit.Screenshots / Video
N/A, workflow and release-infrastructure changes only.
How to Test
Manual/local verification
bun run script/check-workflows.tssuccessfully.bun script/jetbrains-release-validate.ts --helpsuccessfully.bun script/jetbrains-release-pr.ts --kind rc --version 7.3.13-rc.1 --from-tag jetbrains/v7.0.1-rc.1 --drysuccessfully.bun run script/check-opencode-annotations.tssuccessfully.bun run script/check-md-table-padding.tssuccessfully.bun run lint; it completed with 0 errors and existing warnings.git diff --checksuccessfully.bun turbo typechecksuccessfully.Reviewer test steps
prepare-jetbrains-releaseand confirm it still exposeskind,version, and optionalfrom_tag.script/jetbrains-release-pr.tsand confirm it creates/verifiesjetbrains/v<version>at resolvedorigin/mainbefore PR branch work.publish-jetbrainsand confirm it triggers on merged release PRs, checks out the validated tag, and restores the reviewed changelog beforegetChangelogandpublishPlugin.jetbrains/v<version>after PR merge.bun script/jetbrains-release-pr.ts --kind rc --version 7.3.13-rc.1 --from-tag jetbrains/v7.0.1-rc.1 --drylocally to inspect generated changelog output without creating tags, branches, commits, pushes, or PRs.Blocked checks and substitute verification
Checklist
Get in Touch
Kilo team internal.