Repository navigation
Description
Overview
The scheduled-nightly release driver (agents/conductors/release/nightly.sh) builds its Heart readiness snapshot without running heart.checks.rehearsal_ancestry. Whenever a library main moves during the ~1h validation window, Heart's release-ci gate cannot prove the rehearsed commits are ancestors of main and returns STALE ("source moved since rehearsal (…; ancestry unproven)"), so no release ships. This defeats M2.4 (PyAutoHands#337), under which a forward-moved main keeps the rehearsal fresh.
Evidence: nightly runs 45155720996 (11-23), 45390127904 (11-24), 45599731441 (11-25) all stopped STALE this way; NIGHTLY_LAST_WINDOW_END has been stuck at 2026-11-22T09:26:59Z. On 11-25, 13 library commits landed on main between 10:55 and 11:32 UTC, inside the validation window.
Plan
- Run Heart's rehearsal-ancestry check in the nightly's step 4c, after the validation ingest and before the snapshot is aggregated.
- A failed check is logged and the run continues (as with
ci_status); readiness then reads the moved repos as unproven, i.e. STALE, so it can never be worse than today. - Add a regression test pinning the call and its order.
- Tier + merge mode: effective level: supervised; merge mode: human /prm.
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./organs/PyAutoBrain | main | clean |
Other active PyAutoBrain claims (digest-review-table, parked-hold-grace, pyautodna-stack-management, readme-preservation) touch no file under agents/conductors/release/ or its tests.
Suggested branch: feature/nightly-rehearsal-ancestry
Implementation Steps
agents/conductors/release/nightly.shstep 4c: after the"$heart" validate --ingest …block and beforestate.aggregate(), add
PYTHONPATH="$HEART_DIR" python3 -m heart.checks.rehearsal_ancestry || echo "nightly: rehearsal_ancestry check failed (moved repos read as unproven)" >&2.
The check readsvalidation_report.json(written by the ingest) and*.ci_status.jsonfrom$HEART_STATE_DIR, writesrehearsal_ancestry.json, whichstate.aggregatefolds in. Its gh compare calls are bounded at 20s total; the token was refreshed just beforeci_status. Update the step-4 header comment.tests/test_release_rehearsed_shas.py: static assertion (same style astest_nightly_uses_the_record_not_main_heads) thatnightly.shinvokesheart.checks.rehearsal_ancestryaftervalidate --ingestand beforestate.aggregate. Fails on currentmain.- Verify:
bash -n, Brain test suite, and a local run of the Heart check against a fixtureHEART_STATE_DIRto confirm it writes the sidecar the aggregate reads. - Ship via /ship_library; human merges with /prm. Real proof is the next scheduled nightly with mid-window merges reporting
ahead_byinstead of unproven.
Key Files
agents/conductors/release/nightly.sh— step 4c snapshot assemblytests/test_release_rehearsed_shas.py— nightly caller-contract tests- (read-only) PyAutoHeart
heart/checks/rehearsal_ancestry.py,heart/readiness.py~L665-701,heart/tick.sh:59
Original Prompt
Click to expand starting prompt
Nightly release driver never runs Heart's rehearsal-ancestry check
Type: bug
Target: PyAutoBrain
Repos:
- PyAutoBrain
Difficulty: small
Autonomy: supervised
Consequence: judge
Priority: high
Status: draft
Filed: 2026-11-25
Lane: any
Bug fix in PyAutoBrain: the scheduled-nightly release driver
(agents/conductors/release/nightly.sh, step 4c "ingest + assemble the CI readiness
snapshot", lines ~403-420) never runs PyAutoHeart's heart.checks.rehearsal_ancestry
check before state.aggregate(). So whenever a library main moves during the ~1h
validation window, Heart's release-ci gate reports STALE "release validation stale:
source moved since rehearsal (...; ancestry unproven)" and the nightly stops, even though
M2.4 (PyAutoHands#337) says a forward-moved main stays fresh when ancestry is proven.
Evidence: nightly runs 45155720996 (11-23), 45390127904 (11-24), 45599731441 (11-25) on
PyAutoLabs/PyAutoBrain all stopped STALE this way; NIGHTLY_LAST_WINDOW_END stuck at
2026-11-22T09:26:59Z. heart/tick.sh:59 already runs
python3 -m heart.checks.rehearsal_ancestry.
Fix: run the ancestry check in step 4c after ci_status/ingest and before aggregate
(non-fatal on failure, like ci_status), plus a test. Human approved routing this through
start_dev on 2026-11-25.
Activity
Jammy2211 commentedon Nov 25, 2026
Library PR created: #722 (a586b11). Verified: bash -n; new ordering test passes on branch and fails on main; full Brain suite 2506 passed / 1 skipped; Heart ancestry module on a fixture state dir with the 2026-11-25 pattern proved PyAutoFit (ahead 3) and PyAutoLens (ahead 8) as ancestors. No workspace impact. Tier judge — awaiting human /prm.
Jammy2211 commentedon Nov 25, 2026
Shipped: #722 merged (8b7a3ce). The nightly driver now runs Heart's rehearsal-ancestry check in step 4c, after the ingest and before aggregate, so a library main that moved forward from the rehearsed commit reads as fresh instead of "ancestry unproven". First live proof: the next scheduled nightly with mid-window merges.