Skip to content

ci: every pull request moves the engine version - #861

Merged
lobinuxsoft merged 2 commits into
developmentfrom
ci/version-per-pr
Aug 17, 2026
Merged

ci: every pull request moves the engine version#861
lobinuxsoft merged 2 commits into
developmentfrom
ci/version-per-pr

Conversation

@lobinuxsoft

Copy link
Copy Markdown
Owner

The engine version is not decoration: it names ~/.local/share/kooch/<version>/engine, it is half of the BuildStamp a project compares itself against, and it keys the pipeline cache. A version that does not move makes all three blind at once — that is #761, and until now the number moved by hand.

How it works

  • pull_request on development → bump [workspace.package] in the PR's own branch.
  • feat!: / BREAKING CHANGE: → major · feat: → minor · everything else → patch, because the rule is that the version moves with every change.
  • .github/scripts/bump_version.py does the edit and runs cargo metadata --no-deps to prove the manifest still parses. Usable by hand: --bump patch, --set X.Y.Z, --print.

Three decisions worth reviewing

  • 🔴 It bumps the branch, not development. The ruleset there requires a PR and has no bypass actors, so a workflow token cannot push to it at all. It also puts the version in the diff, where it is reviewable.
  • 🔴 It bumps from the BASE version, never the branch's own — otherwise every push adds another patch and a twelve-commit PR lands twelve versions ahead of a one-commit PR. As written the step is idempotent.
  • Forks are skipped (the token cannot write to them) and no-version-bump is the opt-out label.

Known limit, stated rather than hidden: two PRs open at once both bump from the same base and collide on Cargo.toml — a one-line conflict, resolved by merging one and pushing the other.

⚠️ Separately: Cargo.lock is gitignored in this repo. The script retags it for local runs, but CI has nothing to commit there. For a workspace that ships a binary editor that is worth revisiting — not in this PR.

lobinuxsoft and others added 2 commits August 17, 2026 04:22
The version names the vendored engine directory, is half of the
BuildStamp a project compares itself against, and keys the pipeline
cache. A number that sits still makes all three blind - #761 is what
that looks like from the outside.

It bumps the PR's own branch: the ruleset on development requires a pull
request and has no bypass actors, so a workflow token cannot push there.
Bumping from the BASE version rather than the branch's own keeps the
step idempotent - pushing again recomputes the same number.
@lobinuxsoft
lobinuxsoft merged commit d34ef73 into development Aug 17, 2026
@lobinuxsoft
lobinuxsoft deleted the ci/version-per-pr branch August 17, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant