Skip to content

feat: a release builds the rehearsed commits (M2.4, #337) - #339

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/release-rehearsed-shas
Nov 13, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/release-rehearsed-shas

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Programme M2.4. Closes #337. A release publishes exactly the commits that passed rehearsal, even if main moved since.

release.yml:

  • takes rehearsal_run_id and commit_shas;
  • resolve_commits reads the rehearsal record (rehearsal.json in testpypi-rehearsal-version);
  • refuses if the record is missing or mismatched, or if a commit is not on origin/main;
  • checks out and tags exactly those SHAs, verifying the tag on origin.

The Colab bump commits on top of the release and goes to release/<version> with a PR into main, never straight to main. The caller contract is in docs/internals.md. Its partners are Brain#614 (nightly and manual door) and Heart#340 (rehearsal ancestry), merging in the same sitting.

Test plan

  • Hands suite: 631 passed. 4 test_tombstone failures are pre-existing and environmental.
  • yamllint clean. actionlint: no new findings.
  • Offline dry run: a release tags the rehearsed SHAs while main is 2 ahead, and refuses a PR-head SHA.
  • The independent review took 3 rounds: FINDINGS, then fixed, then CLEAN.

Heart RED override (development only)

Authorization from the live human at the programme M2 gate, 2026-11-13: "Override + merge all". This authorizes the development-only RED override for PyAutoLabs/PyAutoBrain#614, PyAutoLabs/PyAutoHeart#340 and #337 and gives the merge command (order Mind, Hands, Brain, Heart), conditional on every required check being green within the turn.

Heart verdict RED (pyauto-heart readiness, verdict ts 2026-11-12T22:43:14Z). The current RED reasons, verbatim: "PyAutoNerves: 4 commit(s) behind origin"; "PyAutoFit: 2 commit(s) behind origin"; "PyAutoArray: 4 commit(s) behind origin"; "PyAutoGalaxy: on branch feature/galaxy-guide-rebalance (not main)"; "PyAutoGalaxy: 1 uncommitted source change(s)"; "PyAutoLens: 1 uncommitted source change(s)"; "PyAutoLens: 45 commit(s) behind origin"; "PyAutoCTI: 4 commit(s) behind origin"; "install verification FAILED (testpypi; checks F)"; "release validation FAILED (stage integrate)"

None of these is in PyAutoMind, PyAutoBrain, PyAutoHeart or PyAutoHands. Branch gates passed: tests, independent review CLEAN after fix rounds, smoke not applicable. This PR does not fix Heart, and Heart stays RED for release.

Tier: glance. Merge mode: auto-merge on green if the Witness passes, with a post-merge summary. A RED override additionally needs the human's merge command, which was given in the same turn.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits November 12, 2026 21:26
release.yml no longer reads `main` for what to publish. A new
resolve_commits job settles the library commits once, before any leg runs,
and every library checkout uses its output:

- rehearsal: pin each library's main HEAD at run start (or build the
  commit_shas input verbatim); rehearsal.json in the
  testpypi-rehearsal-version artifact now records them as commit_shas.
- live: resolve from that rehearsal record (rehearsal_run_id input, or a
  recent rehearsal matching the commit_shas input). Refuses before
  building when no rehearsal is named, the run has no record, or the
  record and manifest disagree. main having moved is reported, not
  refused: the rehearsed commits ship.

The release job verifies HEAD == rehearsed before tagging and confirms
the tag on origin peels to it ("identical"). The library Colab URL bump
is committed on the released commit and pushed as release/<version>,
never main. pre_build.sh takes and passes the rehearsal run id, refusing
before side effects without one.

Logic in autohands/rehearsed_commits.py (library set from
config/workspaces.yaml), tests in tests/test_rehearsed_commits.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 review)

Review findings on 0b74050:

1. A commit_shas input could pin any fetchable commit (a PR head, a side
   branch) and a live release would then publish it. verify_checkout now
   requires `git merge-base --is-ancestor HEAD origin/main` and refuses a
   clone without origin/main. Every rehearsal leg (release_test_pypi, now
   full history) runs it too, so an off-main commit never becomes a
   rehearsal record. The lag message counts HEAD..main, which is exact
   once ancestry holds.
2. Nothing merged release/<version> back to main. bump_library_colab_urls
   now opens, or updates, one PR per library ("release <version>: Colab
   URL bump") with the bot App token (pull-requests: write). A gh failure
   is a warning; the release does not fail.

docs/internals.md gains the caller contract the Brain side follows: input
names, rehearsal.json at the testpypi-rehearsal-version artifact root, its
schema, and feeding its commit_shas to `pyauto-heart validate`.
Workspace checkouts are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, Brain files (#337 re-review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

feat: a release builds the rehearsed commits (M2.4)

1 participant