GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — docs(proposals): add CalVer versioning and tag-based deploy proposal by kaseywright · Pull Request #245 · eten-tech-foundation/fluent-api Conversation
|
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe documentation proposes CalVer tags in ChangesCalVer release and deployment flow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
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 `@docs/proposals/versioning-calver/versioning-calver-workflows.md`:
- Around line 35-51: Serialize manually triggered release workflow runs before
the Compute CalVer tag step allocates SERIAL, using a workflow-level concurrency
group that prevents overlapping release cuts. Keep the existing tag computation
and Tag and push steps unchanged once runs are serialized.
- Around line 85-92: Update the workflow’s tag-triggered production path to
explicitly validate tags against ^v[0-9]{2}\.[0-9]{2}\.[1-9][0-9]*$ before any
production jobs run, and ensure validation failure blocks deployment. Keep the
existing main-branch development path unchanged.
- Around line 146-149: Update the versioning walkthrough so its deployment
description matches the actual post-merge workflow: either document dedicated
migrate-qa/deploy-qa jobs followed by an explicit promotion to production, or
remove the QA-gate claim and describe the tag as deploying through the existing
Production path.
- Around line 179-182: Update the hotfix release instructions in Scenarios B and
C to use the same tag-allocation contract as cut-release.yml instead of manually
running git tag and git push with a hardcoded version. Extend the release
workflow to accept the hotfix source ref, or document equivalent serial
collision checks and GitHub Release creation, while preserving the existing
hotfix deployment path.
- Around line 219-228: Update the Rollback section to use a deploy-only workflow
or invocation that skips migrate-prod when reverting to a previous tag; do not
instruct operators to rerun post-merge-deploy.yml unchanged. Document the
required artifact/database compatibility verification before rollback, and
reference the existing deploy-prod and migrate-prod jobs when describing the
separation.
- Around line 46-51: Update the “Tag and push” workflow and its surrounding
proposal to require immutable release tags: configure repository rules that
prevent deletion or updates to tags matching v*, and replace the lightweight git
tag creation with an annotated or signed tag while preserving the existing push
flow.
- Around line 126-130: Update the “Set version from tag” workflow so the CalVer
tag is normalized by npm without persisting the normalized result to
package.json. Capture or otherwise use npm’s normalized version output
separately, then remove or restore the package.json version so it contains a
semver-safe value without leading-zero components.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bc029b1d-072d-4e7a-b752-217e044a08a7
docs/proposals/versioning-calver/versioning-calver-summary.mddocs/proposals/versioning-calver/versioning-calver-workflows.md
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - name: Compute CalVer tag | ||
| id: version | ||
| run: | | ||
| YEAR_MONTH=$(date +'%y.%m') | ||
| SERIAL=$(git tag -l "v${YEAR_MONTH}.*" | sed -E "s/^v${YEAR_MONTH}\.//" | sort -n | tail -1) | ||
| SERIAL=${SERIAL:-0} | ||
| NEXT=$((SERIAL + 1)) | ||
| TAG="v${YEAR_MONTH}.${NEXT}" | ||
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | ||
| echo "Computed tag: $TAG" | ||
|
|
||
| - name: Tag and push | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git tag ${{ steps.version.outputs.tag }} | ||
| git push origin ${{ steps.version.outputs.tag }} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Serialize concurrent release cuts before allocating SERIAL.
Two manually triggered runs can both observe the same highest tag, compute the same next tag, and race at git push; one release-cut run then fails. Add a workflow-level concurrency group, or implement retry/recomputation after a rejected push.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
35 - 51, Serialize manually triggered release workflow runs before the Compute
CalVer tag step allocates SERIAL, using a workflow-level concurrency group that
prevents overlapping release cuts. Keep the existing tag computation and Tag and
push steps unchanged once runs are serialized.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - name: Tag and push | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git tag ${{ steps.version.outputs.tag }} | ||
| git push origin ${{ steps.version.outputs.tag }} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Protect release tags to make them immutable.
git tag "$TAG" creates a lightweight, mutable tag, but the proposal relies on tags remaining immutable for QA and rollback. Configure repository rules to prevent deletion or updates to v* tags, preferably alongside annotated or signed tags.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
46 - 51, Update the “Tag and push” workflow and its surrounding proposal to
require immutable release tags: configure repository rules that prevent deletion
or updates to tags matching v*, and replace the lightweight git tag creation
with an annotated or signed tag while preserving the existing push flow.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ```yaml | ||
| on: | ||
| push: | ||
| branches: | ||
| - main # dev deploy path — unchanged behavior | ||
| tags: | ||
| - 'v*.*.*' # prod deploy path — replaces workflow_dispatch | ||
| ``` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Validate that pushed tags are actually CalVer tags.
v*.*.* also matches nonnumeric or non-CalVer tags, and the github.ref_type == 'tag' condition would send them through the production jobs. Add an explicit ^v[0-9]{2}\.[0-9]{2}\.[1-9][0-9]*$ validation step whose failure blocks deployment.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
85 - 92, Update the workflow’s tag-triggered production path to explicitly
validate tags against ^v[0-9]{2}\.[0-9]{2}\.[1-9][0-9]*$ before any production
jobs run, and ensure validation failure blocks deployment. Keep the existing
main-branch development path unchanged.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ```yaml | ||
| - name: Set version from tag | ||
| if: github.ref_type == 'tag' | ||
| run: npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version | ||
| ``` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🏁 Script executed:
#!/bin/bash set -euo pipefail tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT printf '{"name":"calver-check","version":"0.0.0"}\n' > "$tmp/package.json" (cd "$tmp" && npm version v26.07.3 --no-git-tag-version --allow-same-version)
Repository: eten-tech-foundation/fluent-api
Length of output: 326
🌐 Web query:
npm semver valid versions leading zeros patch component 26.07.3 invalid
💡 Result:
According to the Semantic Versioning (SemVer) 2.0.0 specification, a normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers that MUST NOT contain leading zeros [1][2]. Because of this requirement, a version string like 26.07.3 is invalid because the patch component (07) contains a leading zero [1][3]. The specification explicitly states that each element (major, minor, and patch) must increase numerically, and leading zeros are prohibited to prevent ambiguity and ensure consistent sorting [1][2]. If you attempt to use such a version in an npm package.json, tools relying on the semver library will identify it as invalid [3][4]. While the semver library provides a coerce function that may attempt to "fix" non-compliant strings—potentially transforming 26.07.3 into 26.7.3—this should not be used as a substitute for following the formal versioning specification in your package metadata [5][6][7]. To resolve the issue, you must use a standard, non-leading-zero format such as 26.7.3 [3].
Citations:
🌐 Web query:
npm does not support semver versions with leading zeros documentation
💡 Result:
npm follows the Semantic Versioning 2.0.0 (SemVer) specification, which explicitly prohibits leading zeros in certain parts of a version string [1][2][3]. The specific rules regarding leading zeros are as follows: 1. Normal Version Numbers: According to the SemVer specification, major, minor, and patch versions (X.Y.Z) must be non-negative integers and must not contain leading zeros [1][4]. 2. Pre-release Versions: For pre-release identifiers, numeric identifiers must not include leading zeros [1][4]. Because the npm semver parser adheres to this, a version like 1.2.3-00 is considered invalid [5][6]. A single zero (e.g., 1.2.3-0) is permitted [6]. 3. Build Metadata: In contrast, build metadata (the part following a + sign) allows any alphanumeric string, including those with leading zeros [5][2][6]. For example, 1.2.3+00 is considered valid by the npm parser [5][6]. These constraints are enforced by the node-semver library, which is the official parser used by npm to handle versioning logic [2][3]. If you attempt to use a version string that violates these rules in a context where strict validation is applied, the parser will reject it [7][6].
Citations:
Write the semver-safe version to package.json.
npm version v26.07.3 is normalized to 26.7.3, but the workflow then records that normalized value in package.json. If the CalVer month component is 01–09, the published package metadata will contain a leading-zero semver patch (07), so output the normalized value separately or remove it from package.json.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
126 - 130, Update the “Set version from tag” workflow so the CalVer tag is
normalized by npm without persisting the normalized result to package.json.
Capture or otherwise use npm’s normalized version output separately, then remove
or restore the package.json version so it contains a semver-safe value without
leading-zero components.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # This automatically triggers the prod path in post-merge-deploy.yml, | ||
| # which deploys v26.07.3 to the QA/staging slot for verification. | ||
| # (If QA runs against a separate pre-prod environment, add a `migrate-qa`/`deploy-qa` | ||
| # job gated the same way as prod but pointed at the QA app; omitted here for brevity.) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Add the dedicated QA deployment before describing this as a QA gate.
The tag currently triggers the documented “prod path,” while the supplied post-merge-deploy.yml context defines migrate-prod/deploy-prod against the Production environment and has no QA jobs. As written, cutting a tag can deploy to production before QA. Add migrate-qa/deploy-qa plus an explicit promotion step, or update the walkthrough to match the actual deployment target.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
146 - 149, Update the versioning walkthrough so its deployment description
matches the actual post-merge workflow: either document dedicated
migrate-qa/deploy-qa jobs followed by an explicit promotion to production, or
remove the QA-gate claim and describe the tag as deploying through the existing
Production path.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # 3. Cut the next release tag from this branch instead of from main: | ||
| git tag v26.07.4 | ||
| git push origin v26.07.4 | ||
| # This triggers the same prod-path deploy as Scenario A, but for v26.07.4. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Route hotfix releases through the same tag-allocation contract.
Scenarios B and C manually hardcode and push tags, bypassing cut-release.yml’s serial calculation and GitHub Release creation. This can collide with another release cut and produces inconsistent release metadata. Extend the release workflow to accept a hotfix source ref, or document equivalent collision checks and release creation.
Also applies to: 213-216
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
179 - 182, Update the hotfix release instructions in Scenarios B and C to use
the same tag-allocation contract as cut-release.yml instead of manually running
git tag and git push with a hardcoded version. Extend the release workflow to
accept the hotfix source ref, or document equivalent serial collision checks and
GitHub Release creation, while preserving the existing hotfix deployment path.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ## 5. Rollback | ||
|
|
||
| Because prod only ever deploys a tagged, immutable commit, rollback is re-running deploy against the previous tag: | ||
|
|
||
| ```bash | ||
| git checkout v26.07.3 | ||
| # Re-trigger the prod deploy job for this ref, e.g. by re-running the | ||
| # workflow run associated with that tag: | ||
| gh run list --workflow=post-merge-deploy.yml | ||
| gh run rerun <previous-run-id> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Use a deploy-only path for rollback.
Rerunning post-merge-deploy.yml also reruns migrate-prod, because the supplied workflow makes deploy-prod depend on that migration job. Replaying an old application tag against the current database can apply migrations again or otherwise alter schema state. Separate migrations from deployment, or make rollback explicitly skip migrations after verifying the artifact is compatible.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/versioning-calver/versioning-calver-workflows.md` around lines
219 - 228, Update the Rollback section to use a deploy-only workflow or
invocation that skips migrate-prod when reverting to a previous tag; do not
instruct operators to rerun post-merge-deploy.yml unchanged. Document the
required artifact/database compatibility verification before rollback, and
reference the existing deploy-prod and migrate-prod jobs when describing the
separation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Implemented in PR 247 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.