Skip to content

fix(ci): PR-based release flow compatible with main branch ruleset - #396

Merged
ericmjl merged 2 commits into
mainfrom
fix/release-push-hardening
Aug 16, 2026
Merged

fix(ci): PR-based release flow compatible with main branch ruleset#396
ericmjl merged 2 commits into
mainfrom
fix/release-push-hardening

Conversation

@ericmjl

@ericmjl ericmjl commented Aug 16, 2026

Copy link
Copy Markdown
Owner

What happened

The 0.19.13 release this morning half-landed: the release workflow's direct push to main was rejected by the new Require CI checks on main ruleset (created 06:28 today), but the job's bash -l {0} shell does not fail fast, so the rejected push was swallowed and the GitHub release + PyPI publish proceeded anyway. Result: PyPI has 0.19.13 but main still says 0.19.12, and every subsequent merge to main failed with Version 0.19.13 already exists on PyPI.

What this PR does

1. Reconciles main with the released 0.19.13 (Bump version to 0.19.13 commit)

  • pyproject 0.19.12 → 0.19.13 + the stranded release notes file, so the next auto-release computes 0.19.14.

2. Reworks the release workflow to land commits via a PR instead of a direct main push

  • pushes release/vX, dispatches pr-tests.yaml on it (GITHUB_TOKEN pushes don't trigger workflows — same pattern as update-ollama-models), enables auto-merge (rebase), and waits for the merge
  • tags the post-merge notes commit on main (tags are not covered by the ruleset), then verifies main carries the new version before creating the GitHub release and publishing to PyPI
  • rollback updated for the new flow (close PR / force-push main back / delete tag)

3. Fail-fast + skip hygiene

  • every mutation step now sets set -euo pipefail so a rejected push/merge can never be swallowed again
  • a verification gate before GitHub release + PyPI: main's pyproject version must equal the release version and the tag must exist remotely
  • auto-release now skips bot-maintained commits (chore(deps):, Ollama model list updates)

Notes

  • Ruleset bypass for github-actions[bot] is not possible (GitHub rejects the built-in Actions app as a bypass actor), hence the PR-based route.
  • The existing v0.19.13 tag points at f9caad8 rather than a commit carrying the bump; optional cosmetic retag after this merges.

- fail fast with set -euo pipefail when the atomic push is rejected;
  previously the rejection was swallowed because the custom
  'bash -l {0}' shell does not enable error propagation, so the
  GitHub release and PyPI publish proceeded without the version
  bump ever landing on main
- verify origin/main actually carries the new version and tag
  before creating the GitHub release or publishing to PyPI
- skip auto-release for bot-maintained commits (chore(deps):,
  Ollama model list updates)
@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://ericmjl.github.io/llamabot/pr-preview/pr-396/

Built to branch gh-pages at 2026-08-16 22:46 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor
Import Time
import llamabot 0.067s
from llamabot import SimpleBot 0.217s
from llamabot import AgentBot 0.068s
from llamabot import ToolBot 0.400s
from llamabot import tool 0.378s
from llamabot import prompt 0.385s
from llamabot import user, system 0.213s
from llamabot import span 0.366s
from llamabot import ChatMemory 0.217s
from llamabot import Experiment 0.386s
from llamabot import QueryBot 0.377s
from llamabot import ImageBot 0.226s
from llamabot import StructuredBot 0.382s
from llamabot.recorder import span 0.362s
full (import everything) 0.420s

Reconcile main with the 0.19.13 release published to PyPI by run
31941758228, whose version-bump and release-notes commits were
rejected by the 'Require CI checks on main' ruleset and never
landed. Restores the invariant that main's pyproject version
matches the latest released version, so the next auto-release
computes 0.19.14.
@ericmjl
ericmjl force-pushed the fix/release-push-hardening branch from f1e2451 to 2a0dc71 Compare August 16, 2026 22:45
@ericmjl
ericmjl merged commit a958f4a into main Aug 16, 2026
12 checks passed
@ericmjl
ericmjl deleted the fix/release-push-hardening branch August 16, 2026 22:50
ericmjl added a commit that referenced this pull request Aug 16, 2026
- docs/designs/git-cli/: LLD + EARS for resolving .git paths via
  GitPython (git_dir / common_dir) so 'llamabot git hooks' and
  'llamabot git compose' work in linked worktrees and from
  subdirectories; currently all three hardcoded .git/ paths raise
  NotADirectoryError in worktrees
- docs/designs/release-pipeline/: retroactive LLD for the PR-based
  release flow shipped in #396 (ruleset context, invariants, rollback
  semantics, residual state)
- link both from high-level-design.md
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