docs(agents): derive the dev-version N from main's declared version, not a commit count - #32
Open
defl wants to merge 1 commit into
Open
docs(agents): derive the dev-version N from main's declared version, not a commit count#32defl wants to merge 1 commit into
defl wants to merge 1 commit into
Conversation
…not a commit count The `N = git rev-list LAST_TAG..HEAD --count` rule regresses as soon as PRs are squash-merged. A branch counts its own commits since the tag, but the squash lands on main as a single commit, so main's own count sits well below the number the last merged branch declared. The next branch then computes a LOWER N than main already has, and apt stops treating the build as an upgrade -- which is the one thing the dev-version scheme exists to guarantee. Observed 2026-07-28 on #31: main declared 4.0.1.dev11 while its own rev-list count was 7, so a two-commit branch computed dev.9. That had to be overridden by hand to dev.12 to avoid shipping a version that went backwards. N is now CUR + 1, where CUR is the dev number declared in python/pyproject.toml on origin/main. Monotonic by construction, and it needs no history archaeology. Also spells out that the prerelease suffix must be dropped when parsing PATCH out of the tag (v4.0.0-beta1 gives 0, not "0-beta1" -- the current tag hits this), and what to do when two branches are open at once. Applied to itself: main declares dev.12, so this is dev.13. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
N = git rev-list LAST_TAG..HEAD --countrule in AGENTS.md regresses as soon as PRs are squash-merged.A branch counts its own commits since the tag, but the squash lands on
mainas a single commit — somain's own count sits well below the number the last merged branch declared. The next branch then computes a lower N than main already has, and apt stops treating the build as an upgrade, which is the one thing the scheme exists to guarantee.Hit this on #31 earlier today:
maindeclared4.0.1.dev11while its own rev-list count was 7, so a two-commit branch computeddev.9. I had to override it by hand todev.12to avoid shipping a version that went backwards.Change
N is now
CUR + 1, whereCURis the dev number declared inpython/pyproject.tomlonorigin/main. Monotonic by construction, and it needs no history archaeology.Two smaller fixes to the same block:
PATCH = "0-beta1"for the current tagv4.0.0-beta1. Now says to drop the prerelease suffix.Applied to itself: main declares
dev.12, so this isdev.13.🤖 Generated with Claude Code