Repository navigation
fix(publish): beta tags use PATCH+1 as base, fixing semver precedence - #1998
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
🐙 Octopus Review — PR #1998SummaryThis PR reverses a previously documented design decision: beta tags now use Score
Risk Assessment
Positive Highlights
Important Files Changed
DiagramstateDiagram-v2
[*] --> StableShips: stable release
state "Old scheme" as Old {
[*] --> OldBeta: v0.7.0 ships
OldBeta --> OldBeta2: v0.7.0-beta.1 (semver OLDER than v0.7.0)
OldBeta2 --> OldStable: v0.7.1 ships
}
state "New scheme - this PR" as New {
[*] --> NewBeta: v0.7.2 ships
NewBeta --> NewBeta2: v0.7.3-beta.1 (semver NEWER than v0.7.2)
NewBeta2 --> NewStable: v0.7.3 ships
}
StableShips --> Old
StableShips --> New
Last reviewed commit: 3e429ef5c Checklist
Reviewed by Octopus |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Shell | Jul 8, 2026 11:16p.m. | Review ↗ | |
| Swift | Jul 8, 2026 11:16p.m. | Review ↗ | |
| Secrets | Jul 8, 2026 11:16p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
📝 WalkthroughWalkthroughThe publish workflow now computes beta tags from the next patch version instead of the current stable version, and the release documentation is updated to match the new beta and stable versioning rules. ChangesBeta tagging base change
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
| VERSION="${NEXT_BASE}" | ||
| fi | ||
|
|
||
| echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
🟡 Beta and stable now produce the same NEXT_BASE, creating a tag collision risk
Both channels now derive their version from the same NEXT_BASE (PATCH+1). If a beta series is cut from stable v0.7.2 (producing v0.7.3-beta.*) and then the stable channel is also triggered before v0.7.3 ships, the stable job will also emit v0.7.3. This is semantically correct per semver but means the two channels are now tightly coupled to the same patch counter. More concretely: if a hotfix stable release of v0.7.3 ships while betas are still in flight at v0.7.3-beta.N, the next beta run will compute NEXT_BASE=0.7.4 (because stable is now v0.7.3), silently jumping the beta series. This is likely acceptable, but the comment block no longer documents this interaction, which the old design explicitly called out.
| echo "channel=$CHANNEL" >> "$GITHUB_OUTPUT" | |
| # After NEXT_BASE is computed, add a guard: | |
| if git tag --list "v${NEXT_BASE}" | grep -q "."; then | |
| echo "::error::Tag v${NEXT_BASE} already exists as a stable release; cannot create beta on this base." | |
| exit 1 | |
| fi |
AI Fix Prompt
Fix the following Medium (Logic Error) issue in `.github/workflows/publish.yml` at lines 163-176:
Problem: Both channels now derive their version from the same `NEXT_BASE` (PATCH+1). If a beta series is cut from stable `v0.7.2` (producing `v0.7.3-beta.*`) and then the stable channel is also triggered before `v0.7.3` ships, the stable job will also emit `v0.7.3`. This is semantically correct per semver but means the two channels are now tightly coupled to the same patch counter. More concretely: if a hotfix stable release of `v0.7.3` ships while betas are still in flight at `v0.7.3-beta.N`, the next beta run will compute `NEXT_BASE=0.7.4` (because stable is now `v0.7.3`), silently jumping the beta series. This is likely acceptable, but the comment block no longer documents this interaction, which the old design explicitly called out.
Suggested fix:
# After NEXT_BASE is computed, add a guard:
if git tag --list "v${NEXT_BASE}" | grep -q "."; then
echo "::error::Tag v${NEXT_BASE} already exists as a stable release; cannot create beta on this base."
exit 1
fi
| @@ -154,34 +166,11 @@ jobs: | |||
| else | |||
| NEXT_N=$(( HIGHEST_N + 1 )) | |||
| fi | |||
There was a problem hiding this comment.
🟡 Existing v*.*.Z-beta.* tags on the old base scheme are silently orphaned
The HIGHEST_N lookup now searches v${NEXT_BASE}-beta.* instead of v${BASE}-beta.*. Any existing beta tags cut under the previous scheme (e.g. v0.7.2-beta.1 when stable was v0.7.2) will no longer be found by the increment logic. The next beta run will start at beta.1 even if v0.7.3-beta.5 already exists under the old naming. This is a one-time migration artifact, but it is silent — there is no warning or assertion.
| fi | |
| # At the start of the beta branch, warn if old-scheme tags exist: | |
| OLD_BETA_COUNT=$(git tag --list "v${BASE}-beta.*" | wc -l | tr -d ' ') | |
| if (( OLD_BETA_COUNT > 0 )); then | |
| echo "::warning::Found ${OLD_BETA_COUNT} beta tag(s) under the old base v${BASE}-beta.* — these are now orphaned. Verify that the new base v${NEXT_BASE}-beta.* is intended." | |
| fi |
AI Fix Prompt
Fix the following Medium (Bug) issue in `.github/workflows/publish.yml` at lines 163-168:
Problem: The `HIGHEST_N` lookup now searches `v${NEXT_BASE}-beta.*` instead of `v${BASE}-beta.*`. Any existing beta tags cut under the previous scheme (e.g. `v0.7.2-beta.1` when stable was `v0.7.2`) will no longer be found by the increment logic. The next beta run will start at `beta.1` even if `v0.7.3-beta.5` already exists under the old naming. This is a one-time migration artifact, but it is silent — there is no warning or assertion.
Suggested fix:
# At the start of the beta branch, warn if old-scheme tags exist:
OLD_BETA_COUNT=$(git tag --list "v${BASE}-beta.*" | wc -l | tr -d ' ')
if (( OLD_BETA_COUNT > 0 )); then
echo "::warning::Found ${OLD_BETA_COUNT} beta tag(s) under the old base v${BASE}-beta.* — these are now orphaned. Verify that the new base v${NEXT_BASE}-beta.* is intended."
fi
| @@ -144,8 +135,29 @@ jobs: | |||
| BASE="${LATEST_STABLE#v}" | |||
| IFS='.' read -r MAJOR MINOR PATCH <<< "$BASE" | |||
|
|
|||
There was a problem hiding this comment.
🔵 Rollover threshold comment references docs/RELEASING.md but the file tree shows docs/releasing.md
The inline comment # rollover: intentional, see docs/RELEASING.md references an uppercase filename. The actual file in the repository is docs/releasing.md (lowercase). On case-sensitive filesystems this link is broken. It is a documentation-only issue, but it creates confusion for contributors following the reference.
| if (( NEW_PATCH > 9 )); then # rollover: intentional, see docs/releasing.md |
AI Fix Prompt
Fix the following Low (Style) issue in `.github/workflows/publish.yml` at line 137:
Problem: The inline comment `# rollover: intentional, see docs/RELEASING.md` references an uppercase filename. The actual file in the repository is `docs/releasing.md` (lowercase). On case-sensitive filesystems this link is broken. It is a documentation-only issue, but it creates confusion for contributors following the reference.
Suggested fix:
if (( NEW_PATCH > 9 )); then # rollover: intentional, see docs/releasing.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish.yml:
- Around line 78-113: Update docs/releasing.md so its beta versioning guidance
matches the Compute next tag logic in publish.yml: describe betas as using the
next patch base (PATCH+1) rather than the current stable base, and align the
examples and wording with the new beta.N scheme so the release docs are
consistent with the workflow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d33d6e5d-63e3-4cc7-97a4-f0ff58c77826
📒 Files selected for processing (1)
.github/workflows/publish.yml
| # 3. Beta: compute BETA_BASE = MAJOR.MINOR.(PATCH+1), find the highest | ||
| # existing beta.N for that base and increment N | ||
| # (or start at beta.1 if none exist). | ||
| # 4. Stable: bump PATCH by 1 (with rollover at 10). |
There was a problem hiding this comment.
Update release docs
docs/releasing.md is still the release process source of truth and still says beta tags share the current stable base (v0.7.0-beta.1 → v0.7.1 stable). After this workflow change, following the docs gives maintainers the opposite beta-versioning model from CI, so the release documentation should be updated in the same PR.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/publish.yml
Line: 104-107
Comment:
**Update release docs**
`docs/releasing.md` is still the release process source of truth and still says beta tags share the current stable base (`v0.7.0-beta.1` → `v0.7.1` stable). After this workflow change, following the docs gives maintainers the opposite beta-versioning model from CI, so the release documentation should be updated in the same PR.
**Context Used:** AGENTS.md ([source](https://app.greptile.com/eonist/github/eoncode/run-bot/-/custom-context?memory=02ac88f9-f20e-46ce-9bbb-decad86e51e4))
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/publish.yml">
<violation number="1" location=".github/workflows/publish.yml:79">
P2: The workflow comment block and the rollover-logic reference both cite `docs/RELEASING.md` as the project's release-process source of truth, but that file still documents the old beta-tagging model (betas share the current stable base). With this change shipping PATCH+1 as the beta base, the documentation will actively contradict CI behavior — consider updating `docs/RELEASING.md` in this PR to keep them in sync.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| # Tag scheme: | ||
| # beta channel → vMAJOR.MINOR.PATCH-beta.N (e.g. v0.7.0-beta.1) | ||
| # release channel → vMAJOR.MINOR.PATCH (e.g. v0.7.1) | ||
| # beta channel → vMAJOR.MINOR.(PATCH+1)-beta.N (e.g. v0.7.3-beta.1) |
There was a problem hiding this comment.
P2: The workflow comment block and the rollover-logic reference both cite docs/RELEASING.md as the project's release-process source of truth, but that file still documents the old beta-tagging model (betas share the current stable base). With this change shipping PATCH+1 as the beta base, the documentation will actively contradict CI behavior — consider updating docs/RELEASING.md in this PR to keep them in sync.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/publish.yml, line 79:
<comment>The workflow comment block and the rollover-logic reference both cite `docs/RELEASING.md` as the project's release-process source of truth, but that file still documents the old beta-tagging model (betas share the current stable base). With this change shipping PATCH+1 as the beta base, the documentation will actively contradict CI behavior — consider updating `docs/RELEASING.md` in this PR to keep them in sync.</comment>
<file context>
@@ -75,51 +75,42 @@ jobs:
# Tag scheme:
- # beta channel → vMAJOR.MINOR.PATCH-beta.N (e.g. v0.7.0-beta.1)
- # release channel → vMAJOR.MINOR.PATCH (e.g. v0.7.1)
+ # beta channel → vMAJOR.MINOR.(PATCH+1)-beta.N (e.g. v0.7.3-beta.1)
+ # release channel → vMAJOR.MINOR.PATCH (e.g. v0.7.3)
+ #
</file context>
| NEW_PATCH=0 | ||
| NEW_MINOR=$(( MINOR + 1 )) | ||
| if (( NEW_MINOR > 9 )); then # rollover: intentional | ||
| NEW_MINOR=0 |
There was a problem hiding this comment.
💡 Rollover threshold > 9 is less readable than >= 10
The rollover condition uses (( NEW_PATCH > 9 )) and (( NEW_MINOR > 9 )). The intent is to roll over when a component reaches 10 (since single-digit is the project convention). Writing >= 10 makes the invariant — 'components stay single-digit' — immediately legible without mental subtraction.
| NEW_MINOR=0 | |
| if (( NEW_PATCH >= 10 )); then # rollover: intentional, see docs/releasing.md | |
| NEW_PATCH=0 | |
| NEW_MINOR=$(( MINOR + 1 )) | |
| if (( NEW_MINOR >= 10 )); then # rollover: intentional | |
| NEW_MINOR=0 | |
| NEW_MAJOR=$(( MAJOR + 1 )) | |
| else | |
| NEW_MAJOR=$MAJOR | |
| fi |
AI Fix Prompt
Fix the following Nit (Style) issue in `.github/workflows/publish.yml` at lines 138-144:
Problem: The rollover condition uses `(( NEW_PATCH > 9 ))` and `(( NEW_MINOR > 9 ))`. The intent is to roll over when a component reaches 10 (since single-digit is the project convention). Writing `>= 10` makes the invariant — 'components stay single-digit' — immediately legible without mental subtraction.
Suggested fix:
if (( NEW_PATCH >= 10 )); then # rollover: intentional, see docs/releasing.md
NEW_PATCH=0
NEW_MINOR=$(( MINOR + 1 ))
if (( NEW_MINOR >= 10 )); then # rollover: intentional
NEW_MINOR=0
NEW_MAJOR=$(( MAJOR + 1 ))
else
NEW_MAJOR=$MAJOR
fi
…NEXT_BASE is intentional (#1997)
|



Closes #1997
What changed
Beta tags now use
PATCH+1as their base instead of the current stable.Before:
v0.7.2-beta.1 < v0.7.2by semver — betas are semver-older than stable. ❌After:
v0.7.3-beta.1 > v0.7.2by semver — betas are semver-newer than stable. ✅Why
Per the semver spec §9, a pre-release version has lower precedence than its associated normal version. Tagging betas against the already-shipped stable base means
UpdateChecker(and any semver-aware tool) treats them as older than stable and never offers them as updates.Gating stable users from receiving betas is handled by the update channel preference in
UpdateChecker, not by semver precedence — so there is no regression there.Notes
NEXT_BASEvariable is now computed once and reused by both the beta and stable branches, removing duplication.Summary by cubic
Fixes beta tag precedence by basing betas on PATCH+1 of the latest stable so semver-aware tools (including
UpdateChecker) surface them correctly. Updates releasing docs and workflow comments to match the new scheme and examples.Bug Fixes
UpdateChecker; only precedence changes.Refactors
NEXT_BASEonce and reuse for both channels; removed duplicate rollover code.docs/releasing.mdand workflow comments to reflect the PATCH+1 beta base, including a note that theHIGHEST_Ncounter resets when the beta base (NEXT_BASE) changes.Written for commit 6dbcb2f. Summary will update on new commits.
Summary by CodeRabbit