Skip to content

chore: Unblock the v3-beta release: align the next CLI release with the stamped version and stop release PRs failing the CLI version check#1325

Merged
hatayama merged 2 commits into
v3-betafrom
fix/release-please-cli-version-alignment
Jun 12, 2026
Merged

chore: Unblock the v3-beta release: align the next CLI release with the stamped version and stop release PRs failing the CLI version check#1325
hatayama merged 2 commits into
v3-betafrom
fix/release-please-cli-version-alignment

Conversation

@hatayama

@hatayama hatayama commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • The release-please PR (chore: release v3-beta #1278) no longer fails the build-cli check: release PRs are now exempt from the CLI minimum version reminder, which is meant for human-authored CLI changes.
  • The next CLI release is pinned to 3.0.0-beta.31 so it matches the version already stamped in cli/contract.json and required by the Unity package.

User Impact

  • Before: the pending release would have published the CLI as cli-v3.0.0-beta.25 while the Unity package rejects any CLI older than 3.0.0-beta.31 and tells users to update to a version that does not exist. The build-cli check on the release PR also failed, blocking the release.
  • After: the release ships the CLI as cli-v3.0.0-beta.31, matching what the package requires, and release PRs pass the build-cli check.

Background

Since cli-v3.0.0-beta.24, seven merged PRs each manually bumped cliVersion in cli/contract.json (now 3.0.0-beta.31) together with MINIMUM_REQUIRED_CLI_VERSION, but release-please still computes the next CLI version as 3.0.0-beta.25 from its manifest. The release PR therefore tried to downgrade the stamped versions, which both tripped the minimum-version check and would have produced a broken release.

Changes

  • cli/internal/automation/minimum_version_warning.go: skip the check when GITHUB_HEAD_REF starts with release-please--, since release PRs only contain release-please version stamps.
  • Architecture test harness now always sets GITHUB_HEAD_REF explicitly so CI-inherited values cannot leak into the script under test; added unit and end-to-end tests for the skip.
  • release-please-config.json: one-shot "release-as": "3.0.0-beta.31" for the cli component. Remove it right after cli-v3.0.0-beta.31 is published, otherwise the next release reuses the same version.

Verification

  • scripts/check-go-cli.sh (fmt, vet, lint, full test suite): all green
  • scripts/test-release-please-config.sh, scripts/test-cli-minimum-version-warning-workflow.sh, scripts/test-comment-cli-minimum-version-warning.sh: all green

Review in cubic

hatayama added 2 commits June 13, 2026 01:59
Release PRs only contain release-please version stamps for
cli/contract.json and cli/internal/tools/default-tools.json, but the
check classified those stamps as Go CLI changes and failed because the
release PR never bumps MINIMUM_REQUIRED_CLI_VERSION. The reminder is
meant for human-authored CLI changes, so detect the
release-please--branches--* head branch via GITHUB_HEAD_REF and skip.

The architecture test harness now always sets GITHUB_HEAD_REF
explicitly because CI inherits the real PR head branch into the test
process, which would otherwise trigger the new skip path on release
PRs themselves.
Since cli-v3.0.0-beta.24, seven PRs each manually bumped
cli/contract.json cliVersion (now 3.0.0-beta.31) and
MINIMUM_REQUIRED_CLI_VERSION, but release-please still computes the
next CLI release as 3.0.0-beta.25 from its manifest. Releasing that
would downgrade the embedded cliVersion below the package's minimum
requirement and tell every user to update to a CLI version that does
not exist.

Pin the cli component to release-as 3.0.0-beta.31 so the release
matches the already-stamped contract version. This is a one-shot
override: remove it right after cli-v3.0.0-beta.31 is published, or
the next release would try to reuse the same version.
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

PR adds detection for release-please PR head branches to skip the minimum-version CLI warning/comment check. When a PR's head branch matches the release-please-- prefix (sourced from GITHUB_HEAD_REF), the minimum-version check is bypassed, verified through both unit and integration tests. Release configuration version is pinned to 3.0.0-beta.31.

Changes

Release-Please PR Skip Detection

Layer / File(s) Summary
Release-please skip logic and unit test
cli/internal/automation/minimum_version_warning.go, cli/internal/automation/minimum_version_warning_test.go
Introduces releasePleaseBranchPrefix constant, adds headBranch field to config struct, populates it from GITHUB_HEAD_REF, and implements early return in RunMinimumVersionWarning to skip the check when head branch matches release-please pattern. Unit test validates exit code 0, expected skip message in stdout, and empty stderr.
Comment CLI test harness and integration test
cli/internal/architecture/comment_cli_minimum_version_warning_test.go
Adds HeadBranch field to commentScriptOptions, updates runCommentScript environment setup to set GITHUB_HEAD_REF from the option, and adds integration test verifying that release-please branch names skip check mode without issuing GitHub API calls.

Release Configuration

Layer / File(s) Summary
Version pinning
release-please-config.json
Adds release-as field under packages.cli to pin the generated release tag to 3.0.0-beta.31.

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#1224: Introduced the Go-owned RunMinimumVersionWarning behavior that this PR extends with release-please skip detection.
  • hatayama/unity-cli-loop#1244: Updates minimum-version warning logic in the context of release-please workflows, addressing dispatch-release-please-pr-checks behavior.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objectives: unblocking the v3-beta release by aligning CLI version and preventing release PRs from failing the version check.
Description check ✅ Passed The description comprehensively explains the changes, their rationale, user impact, and verification, and is directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-please-cli-version-alignment

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 and usage tips.

@hatayama
hatayama merged commit d5ae563 into v3-beta Jun 12, 2026
7 of 8 checks passed
@hatayama
hatayama deleted the fix/release-please-cli-version-alignment branch June 12, 2026 17:04
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