Skip to content

ci(release): choose patch, minor, or major when dispatching a release - #27

Merged
senamakel merged 5 commits into
mainfrom
release-bump
Oct 28, 2026
Merged

senamakel merged 5 commits into
mainfrom
release-bump

Conversation

@senamakel

@senamakel senamakel commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

The Release workflow could only tag whatever version Cargo.toml already held, so once v0.14.1 was out every dispatch failed with Release tag v0.14.1 already exists (run 40736339443). The bump step was lost in the docs/source split.

This restores a proper one-click release, modelled on OpenHuman's release_type dispatch:

  • workflow_dispatch input release_type: patch (default) / minor / major.
  • scripts/release/bump-version.sh bumps [workspace.package].version and the medulla, medulla-link, medulla-tui entries in Cargo.lock, re-reads both to verify, and emits version/tag outputs. It doesn't commit or push.
  • scripts/release/test-bump-version.sh tests it offline (patch/minor/major, rejects bad input, rejects a lockfile missing a workspace package without half-editing Cargo.toml). The prepare job runs it before bumping.
  • The prepare job always checks out main, refuses an existing tag, commits chore(release): vX.Y.Z, and pushes the commit and annotated tag with git push --atomic, so a rejected push leaves neither behind. Build and publish are unchanged and build from the tag.
  • A single release concurrency group, so two dispatches can't race for one tag.
  • DEVELOPING.md documents how to release.

main has no branch protection or rulesets, so GITHUB_TOKEN (with contents: write) can push the bump commit. No App token is needed.

Validation:

  • bash scripts/release/test-bump-version.sh: all 5 cases pass
  • bash scripts/release/bump-version.sh minor on the real tree gives 0.14.1 → 0.15.0, and cargo metadata --locked still passes (reverted afterwards)
  • workflow YAML parses

Summary by CodeRabbit

  • Chores
    • Releases can now be created as patch, minor, or major versions. The process updates the shared version, commits it to main, and publishes an annotated tag with packaged artifacts.
    • Release runs are serialized, and existing tags are rejected to prevent duplicate releases.
  • Documentation
    • Updated release instructions to explain the available version choices and how to run or test the version-bump process.

senamakel and others added 5 commits October 28, 2026 17:40
Add a script that bumps the project version for releases, automating the manual edit so version updates stay consistent.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a shell test script that exercises the bump-version release helper, covering version increment behaviour so regressions in the release tooling are caught before publishing.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Mark the version bump script and its test as executable so they can be run directly without invoking a shell interpreter.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The release workflow now takes a patch, minor, or major input, bumps the
workspace version, commits and tags it on main, and pushes both atomically so a
rejected push leaves nothing behind. Releases always run from main and are
serialized to avoid two runs racing for the same tag.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…gging

The releasing section now describes how the manual Release workflow takes a patch, minor, or major release type, bumps the workspace version and lockfile, commits and tags on main, and publishes artifacts. It also adds the gh command to dispatch a release and notes the offline bump script and its test.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@tinysweeper

tinysweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: 3a9414b4783efe069fdbb0d744e3e5f8dc7ded71

Findings

No active actionable findings.

Unverified notes — repository context was unavailable; these are not actionable findings

Unverified note — critique

  • high: Pass GITHUB_OUTPUT to the bump step so its outputs exist (.github/workflows/release.yml:53)
    Problem: `scripts/release/bump-version.sh` writes its `version=`/`tag=` outputs to `$GITHUB_OUTPUT` only when that variable is set (lines 91-97 of the script), and `bump-version.sh` does no
    Suggested fix:
          - name: Bump version
            id: bump
            env:
              GITHUB_OUTPUT: ${{ github.output }}
            run: bash scripts/release/bump-version.sh "${{ inputs.release_type }}"
    

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 4 of 4 files.

Diagnostics and supporting details

Full summary

Pull request purpose (title): ci(release): choose patch, minor, or major when dispatching a release. Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

Change surface Files Review signal Count
Production 1 Active findings 0
Tests 1 Noted findings 1
Documentation 1 Resolved findings 0
Configuration 1 Pending checks/questions 0

Completeness: Complete
Test assessment: Test coverage is assessed from changed tests and lane evidence; execution is not claimed without trusted check data.

What changed

`Release` gains a required `release_type` dispatch input (patch/minor/major, default patch) and a single `release` concurrency group. The prepare job now checks out `main`, configures a bot git identity, runs the new offline bump-script test, bumps the `[workspace.package]` version and the `medulla`/`medulla-link`/`medulla-tui` lockfile entries, refuses an existing tag, then commits `chore(release): vX.Y.Z` and pushes the commit and annotated tag atomically. Build and publish jobs are unchanged in behavior and build from the tag. `DEVELOPING.md` describes the new dispatch and the two scripts.

Features

  • Added — `release_type` dispatch input with patch/minor/major choice: Releases can now be dispatched with an explicit semver increment instead of only tagging whatever version the manifest already held, addressing the repeated `Release tag v0.14.1 already exists` failure. (.github/workflows/release.yml)
  • Added — Workspace version bump script (`bump-version.sh`): Applies patch/minor/major arithmetic to `[workspace.package].version`, rewrites the lockfile entries for exactly `medulla`, `medulla-link`, and `medulla-tui`, re-reads both files to verify the edit, and emits `version`/`tag` outputs without committing or pushing. (scripts/release/bump-version.sh)
  • Modified — Atomic commit-and-tag push from `main` with existing-tag guard: The prepare job always releases from `main`, refuses to proceed if the tag already exists locally or on the remote, and pushes the bump commit and annotated tag in one atomic push, so a rejected push leaves neither behind. (.github/workflows/release.yml)
  • Modified — Single `release` concurrency group: Prevents two concurrent release dispatches from racing for the same tag. (.github/workflows/release.yml)
  • Modified — Release documentation in `DEVELOPING.md`: Documents the `release_type` dispatch, the example `gh workflow run` command, and how to exercise the bump script offline or on your own tree. (DEVELOPING.md)

Tests

  • CI pre-bump gate — The prepare job runs `bash scripts/release/test-bump-version.sh` as a step before the bump so failures stop the release.: Wired into the workflow; the tests lane answered with no findings. Actual execution in CI is not confirmed by trusted check evidence. (.github/workflows/release.yml, scripts/release/test-bump-version.sh)

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The critique lane answered covering 4 of 4 files.
  • Lane summary: Reviewed 4 files; 3 findings. _The code index is behind this pull request (indexed at `fdf4a091652d`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The security lane answered covering 3 of 3 files and reported no findings, noting the workflow adds no new permissions and no unpinned actions.
  • Positive: DEVELOPING.md was excluded from security review as prose and tabular data.
  • Lane summary: Reviewed 3 files; 0 findings. 1 file was not security-reviewed: DEVELOPING.md (prose or tabular data). _The code index is behind this pull request (indexed at `fdf4a091652d`), so retrieved context may be out of date._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The tests lane answered and found no test gap worth reporting, citing the offline harness pinning arithmetic, lockfile scope, invalid-type rejection, and the half-edit-safe failure path.
  • Lane summary: The new bump script ships with an offline harness (`test-bump-version.sh`, run in the workflow before the bump) that pins patch/minor/major arithmetic, lockfile rewriting for exactly the workspace packages, the invalid-bump-type rejection, and the missing-package failure path — including that Cargo.toml is left unedited when the lockfile step fails. I found no test gap worth reporting; I am unable to verify the real Cargo.lock layout beyond what the index shows (a `medulla-link` entry exists), which the script's failure path would catch loudly rather than silently. _The code index is behind this pull request (indexed at `fdf4a091652d`), so retrieved context may be out of date._

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The commits lane answered and found no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files. _The code index is behind this pull request (indexed at `fdf4a091652d`), so retrieved context may be out of date._

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The description matches the diff: the release_type input, the new bump/test scripts, the atomic commit-and-tag push, the release concurrency group, and the DEVELOPING.md section are all present and described accurately. The workflow change adds no new permissions and no unpinned actions, so I have no findings. _The code index is behind this pull request (indexed at `fdf4a091652d`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.009512
  • Tokens: 456834 input · 8241 output · 155392 cached · 355 embedding
  • Updated: 2026-10-28T17:43:02Z
Head State Pass summary
3a9414b4783e ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-28T17:43:02Z)

tinysweeper 0.1.2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T17:44:18.662699Z 3a9414b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The release workflow now accepts a patch, minor, or major bump. A script updates the workspace version and lockfile, and the workflow commits and pushes the changes with an annotated tag.

Changes: Release version bump and publishing

Layer / File(s) Summary
Version bump and validation
scripts/release/bump-version.sh, scripts/release/test-bump-version.sh
The script calculates and writes the selected version bump to Cargo.toml and the three workspace package entries in Cargo.lock. The test harness checks patch, minor, and major bumps, invalid input, and a missing package entry.
Release workflow and instructions
.github/workflows/release.yml, DEVELOPING.md
The workflow accepts a release type, checks out main, runs the bump script and tests, checks local and remote tags, then commits the manifest and lockfile and atomically pushes the commit and annotated tag. The documentation describes the workflow and local commands.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant MainRepository
  participant BumpVersionScript
  participant CargoFiles
  GitHubActions->>MainRepository: Check out main
  GitHubActions->>BumpVersionScript: Run tests and selected bump
  BumpVersionScript->>CargoFiles: Update Cargo.toml and Cargo.lock
  BumpVersionScript-->>GitHubActions: Return version and tag outputs
  GitHubActions->>MainRepository: Check tag, commit changes, and atomically push commit and tag
Loading

Suggested reviewers: tinysweeper

Merge Risk: Moderate · up to 3a941

Retrying a failed release can unexpectedly bump the version again. Make retries preserve the original release before merging.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the version file,
Then hops through patches with a smile.
The lockfile follows, neat and bright,
A tagged release takes flight tonight.
The carrots wait beside the trail.

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

Diagnostics

Total spend: $0.0095

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a9414b478

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread DEVELOPING.md Resolved
@senamakel
senamakel merged commit d62598d into main Oct 28, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant