Skip to content

fix: Create release tags explicitly before draft release creation#1798

Merged
hatayama merged 1 commit into
v3-betafrom
fix/publish-tag-before-release
Jul 15, 2026
Merged

fix: Create release tags explicitly before draft release creation#1798
hatayama merged 1 commit into
v3-betafrom
fix/publish-tag-before-release

Conversation

@hatayama

@hatayama hatayama commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

Both privileged publish jobs now create the release tag ref through the git refs API at the verified release commit before creating the draft release. This unblocks the uloop-project-runner-v3.0.0-beta.48 recovery and fixes release publishing for every future release.

Root cause

The recovery dispatch reached gh release create with correct inputs (RELEASE_SHA=2d8d1b94…, tag uloop-project-runner-v3.0.0-beta.48) and failed with HTTP 403: Resource not accessible by integration (run 29426478997). The pre-hardening workflow always ran git tag + git push before gh release create, so releases were only ever created for tags that already existed — that is why uloop-project-runner-v3.0.0-beta.47 published successfully on 2026-07-11 with the "Protect release tags" ruleset already active (created 2026-07-10). The hardening rewrite dropped the tag-first step; with the active tag ruleset, the workflow token cannot create a release for a not-yet-existing tag, while creating the tag ref itself is permitted (the ruleset only restricts deletion, update, and non-fast-forward).

Fix

  • After the existing tag-mismatch rejection and only when the tag is absent, the publish job runs gh api repos/…/git/refs -f ref="refs/tags/${RELEASE_TAG}" -f sha=<verified commit>RELEASE_SHA for the native workflow, the approved event commit for the dispatcher workflow.
  • No checkout is added; the publish jobs remain checkout-free and script-free.
  • Reruns stay idempotent: a tag already pointing at the verified commit skips creation; a mismatched tag is still rejected.
  • Both workflow test scripts assert the ref creation exists and precedes gh release create.

Verification

  • scripts/test-native-cli-publish-workflow.sh
  • scripts/test-dispatcher-publish-workflow.sh
  • YAML syntax validation
  • go run ./cmd/check-release-triggers --base origin/v3-beta --head HEAD
  • Live evidence for the mechanism: beta.47 (tag-first) succeeded under the same ruleset; this recovery run (release-first) received 403 at the same API with an otherwise identical token and permissions.

After merge

Re-dispatch the recovery:

gh workflow run native-cli-publish.yml --ref v3-beta -f dry-run=false -f recovery-target=true
gh workflow run dispatcher-publish.yml --ref v3-beta -f dry-run=false

The native build artifacts are rebuilt by the new run; both publish jobs again require cli-release environment approval.

Review in cubic

The publish rewrite removed the git tag push that previously preceded
release creation. With the active tag ruleset, the workflow token cannot
create a release for a tag that does not exist yet and GitHub returns 403
Resource not accessible by integration, which broke both the native CLI
and dispatcher publish paths for every new release.

The privileged publish jobs now create the tag ref through the git refs
API at the already-verified release commit before creating the draft
release, matching the previously proven tag-first flow without adding a
repository checkout. Existing tags keep the same mismatch rejection, and
reruns remain idempotent because a tag pointing at the verified commit
skips creation.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 4 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be842a84-0c50-4406-99f0-fcf4fae55b36

📥 Commits

Reviewing files that changed from the base of the PR and between db2e7f4 and 4ad7180.

📒 Files selected for processing (4)
  • .github/workflows/dispatcher-publish.yml
  • .github/workflows/native-cli-publish.yml
  • scripts/test-dispatcher-publish-workflow.sh
  • scripts/test-native-cli-publish-workflow.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/publish-tag-before-release

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.

@hatayama
hatayama merged commit 2c73c6a into v3-beta Jul 15, 2026
9 checks passed
@hatayama
hatayama deleted the fix/publish-tag-before-release branch July 15, 2026 15:29
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