fix(release): dry-run synthetic candidates on next#356
fix(release): dry-run synthetic candidates on next#356marcusrbrown wants to merge 3 commits intomainfrom
Conversation
c888cc0 to
8ac0ec8
Compare
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
The PR correctly moves semantic-release dry-runs from the protected release branch to the disposable next branch, ensuring branch protection is never violated during release preparation.
Blocking issues
None. The implementation is sound and aligns with the architecture plan.
Non-blocking concerns
1. .releaserc.yaml branch configuration mismatch
The .releaserc.yaml only defines branches: [release]. When running --branches next, semantic-release won't find a matching branch config and will use defaults. This works for dry-run mode, but consider documenting this behavior.
Recommendation: Add a comment to .releaserc.yaml explaining that next is used for dry-run staging and intentionally not configured for actual releases:
branches:
- release
# Note: 'next' branch is used for dry-run staging only (ci.yaml, prepare-release-pr.yaml)
# and is not configured for actual releases per docs/plans/2026-03-22-auto-release-no-force-push-plan.md2. GITHUB_EVENT_NAME=push addition not documented in PR description
Both workflow files now set GITHUB_EVENT_NAME=push. This ensures semantic-release treats the dry-run as a push event (vs merge_group or pull_request), which affects its behavior. Consider updating the PR description to mention this change.
Missing tests
None identified. The workflow changes are difficult to unit test without mocking the entire GitHub Actions environment.
Risk assessment: LOW
Why LOW:
- Changes are narrowly scoped to dry-run execution paths
- The
nextbranch is already designed to be disposable (cleared on no-release, deleted post-publish) - Real release publishing on
releasebranch (auto-release.yaml) is unchanged - The architecture plan explicitly documents this approach
Potential regression:
- If semantic-release version or behavior changes, the
--branches nextworkaround might need adjustment - Mitigation: Document the expected semantic-release behavior in comments
Code Quality
Positive patterns:
- Clear, single-purpose changes
- Consistent approach across both workflows (ci.yaml and prepare-release-pr.yaml)
- Proper ordering: push to
nextBEFORE running semantic-release (so commits are visible) - Idempotent cleanup:
|| trueon branch deletion prevents failures
Follows existing patterns:
- Uses same
--force-with-leasepattern for safe pushes - Maintains same
git push --force-with-lease origin HEAD:nextpattern - Preserves
--dry-run true --ci falseflags
Implementation Details Verified
| Aspect | Status |
|---|---|
Push to next before dry-run |
✅ Correct ordering |
--branches next flag |
✅ Valid semantic-release workaround |
GITHUB_REF env var |
✅ Points to next |
GITHUB_EVENT_NAME=push |
✅ Simulates push event |
| Branch protection untouched | ✅ release remains protected |
| Post-publish cleanup unchanged | ✅ auto-release.yaml still deletes next |
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | fro-bot/agent |
| Run ID | 23406884924 |
| Cache | hit |
| Session | ses_2e9b6b7c7ffeDSpcDu9dT3uXmO |
Verdict: PASS ✅The implementation correctly moves semantic-release dry-runs from the protected Architecture AlignmentThis PR correctly implements the plan from
Implementation Correctness
Code QualityPositive patterns:
One minor suggestion (optional): Consider adding a comment to branches:
- release
# Note: 'next' is used for dry-run staging (ci.yaml, prepare-release-pr.yaml)
# Actual releases occur on 'release' via auto-release.yamlRisk Assessment: LOWWhy LOW:
Run Summary
|
|
Superseded by new PR using release preview script instead of semantic-release branch emulation |
Summary
nextbefore running semantic-release in the prepare workflownextin both prepare and CI so protectedreleaseis no longer treated as the synthetic branchnext -> releasepublish path unchanged