Repository navigation
ci: versions are MAJOR.MINOR.PATCH, a new one with every code change (#44) - #45
Conversation
…44) .github/check-version.sh, run by a new pull-request job (base: HEAD^1 of the merge commit): if the sources (include, netcore, cli, vtun, port, server, third_party, tools), android/ (except its unit tests), the Makefile, ci/ or scripts/ changed, VTESSE_VERSION must change too. A new version must be MAJOR.MINOR.PATCH without leading zeros, greater than the base one (a MAJOR.MM base counts as MAJOR.MM.0, so 1.12.0 is 1.12), with a CHANGELOG.md section of its own. The format is checked only when the version changes, so 1.12 stays valid until the next code change (1.12.1 or 1.13.0). Only a #define line counts, exactly one. build.yml: on main a newer push waits instead of cancelling (the release job deletes and recreates "latest"), a manual run shares the push group. docs/testing.md and CHANGELOG.md: the rule and where the scheme changes. The Android versionCode formula for three parts comes with the next version (#43), which is the first one written MAJOR.MINOR.PATCH. Tested in compot/cross on a scratch clone, 14 cases (docs, tests/, bench/ and android unit tests pass; code, ci/ and a version.h comment without a bump fail; 1.13, 1.12.0, a missing section and 1.11.9 fail; 1.12.1 and 1.13.0 with a section pass; a merge commit with HEAD^1 passes). shellcheck v0.10.0 clean. Refs #44
PR Summary by QodoEnforce version bumps for code changes and serialize main releases
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. CI-only changes force a version bump
|
…s no bump Qodo on #45: - a manual run shares the push group on main and can take the place of a waiting push, but the release job ran for pushes only, so latest could stay at an older commit. It runs for manual runs of main too. - server/README.md and android/README.md sit in code directories: the version check leaves out Markdown files there. Tested: a change to the two READMEs only passes without a bump; the 14 earlier cases unchanged. shellcheck clean. Refs #44
|
Qodo findings, both fixed in e41438f:
|
|
/review |
|
|
||
| base=${1:-origin/main} | ||
| header=include/vtesse/version.h | ||
| code="include netcore cli vtun port server scripts third_party tools android Makefile ci" |
There was a problem hiding this comment.
1. Ci-only changes force a version bump 📎 Requirement gap ≡ Correctness
The code path list includes ci, so changes under ci/ populate changed and require a new VTESSE_VERSION. A pull request that changes only CI files therefore reaches the unchanged-version error even though CI-only changes are exempt from version bumps.
Agent Prompt
## Issue description
The version check treats changes under `ci/` as code changes, requiring a version bump for CI-only pull requests even though the compliance policy exempts CI-only changes.
## Fix Focus Areas
- .github/check-version.sh[24-24]
## Recommended Fix
Remove CI-only paths from the set of paths that require a version bump, while continuing to check the source and build paths that the policy identifies as versioned code.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| exit 0 | ||
| fi | ||
|
|
||
| if ! echo "$new" | grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'; then |
There was a problem hiding this comment.
3. Patch releases cannot upgrade android apps 🐞 Bug ≡ Correctness
check-version.sh accepts a greater three-part version such as 1.12.1, but Android's versionCode calculation reads only the major and minor components. If a patch bump is merged before the planned Android formula change, the published APK has the same version code as 1.12 and cannot upgrade an existing installation.
Agent Prompt
## Issue description
The checker approves patch releases while Android still calculates the same version code for every patch of a minor version.
## Fix Focus Areas
- .github/check-version.sh[55-69]
- android/app/build.gradle.kts[29-31]
## Recommended Fix
Ensure the first three-part version bump also updates Android's versionCode formula, or make the checker reject patch bumps until that migration is present. Verify that an APK for 1.12.1 has a higher versionCode than the APK for 1.12.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit e41438f |
|
Qodo findings on e41438f:
|
Your clarification changes the assessment of both findings:
I can’t verify or change finding state from this comment alone; no dismissal was requested. |
Part of #44; the Android
versionCodeformula for three-part versions comes with #43, the first version writtenMAJOR.MINOR.PATCH(changingbuild.gradle.ktshere would itself need a version bump).What changes
.github/check-version.sh, run by a newversionjob on pull requests (base:HEAD^1of the checked-out merge commit):include,netcore,cli,vtun,port,server,third_party,tools),android/(except its unit tests), theMakefile,ci/orscripts/changed,VTESSE_VERSIONmust change too;MAJOR.MINOR.PATCHwithout leading zeros, greater than the base one (aMAJOR.MMbase counts asMAJOR.MM.0, so1.12.0is1.12), with a## <version> — YYYY-MM-DDsection the base branch does not have;1.12stays valid until the next code change takes 1.12.1 or 1.13.0; only one#define VTESSE_VERSIONline counts.build.yml: onmaina newer push now waits instead of cancelling a running workflow, so the release job is never stopped between deleting the oldlatestand creating the new one; a manual run shares the push group (it had a group of its own and could publish at the same time).docs/testing.md("Versions and releases") and theCHANGELOG.mdheader: the rule (PATCH, MINOR; MAJOR only when the maintainer decides; docs,tests/,bench/,.github/need no bump) and where the scheme changes.Tests
compot/crosson a scratch clone, 14 cases:tests/+bench// android unit testsnetcore,ci/or aversion.hcomment without a bumpHEAD^1shellcheckv0.10.0-S style: clean..github/, docs andCHANGELOG.mdonly: no bump needed for this PR.