Repository navigation
feat: the release-validation freeze flag (pyauto-heart freeze) - #197
Merged
Merged
Conversation
A release validation is a window in which the library `main` branches must not
move: a merge landing inside it invalidates the evidence and restales the
rehearsal (~75 minutes, measured 2026-08-29). Heart already knew the window
existed — it is the organ that ingests the evidence — but nothing said so to
the surfaces that merge things.
- `heart/freeze.py` + a `freeze` verb: `--set "<reason>" --until <90m|2h|ISO>`,
`--clear`, `--show [--json]`, writing `$HEART_STATE_DIR/freeze.json` with
`{reason, set_at, until, set_by}`. `--until` is mandatory, so a freeze with
no expiry cannot be taken out by accident; past it the flag reads as clear
for every consumer while `--show` reports "expired", so a forgotten set stays
visible. An unreadable or expiry-less file also reads as clear: a freeze
nobody can parse must not be able to block a merge.
- A read exits 3 while active and 0 otherwise, so `freeze --show` is a one-call
shell gate; `--set` always exits 0 so a driver under `set -e` does not abort
on the freeze it just took out.
- `validate --ingest` clears it: the evidence landing IS the end of the window.
Never on `--out`, which is an inspection path, and never on the read-only
path.
- `review_release` reads it while triaging and clears a freeze the ingest did
not (a rehearsal that never ingested, a failed live run).
The readiness verdict is deliberately untouched. A freeze is not a health
problem, and folding it into the colour would make every ship and release gate
in the organism block on it; it is advice, with teeth in exactly one place
(`/prm`'s merge gate, library repos only — PyAutoBrain side, separate PR).
Refs #196.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HsZA1ufn3msgPiDFxEXa6
This was referenced Sep 3, 2026
Merged
Merged
…tex-p5-heart-freeze
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes part of #196 — phase 5 (last) of the
mind-post-cortexepic (assessment gap 6). Heart owns the flag. Companions: PyAutoLabs/PyAutoBrain#347 (the three read surfaces) and PyAutoLabs/PyAutoHands#275 (thepre_buildcall site).Why
A library merge landing mid-validation restales Heart and costs ~75 minutes (memory:
feedback_library_merge_mid_validation_restales_heart, 2026-08-29). Heart already knows that window exists — it is the organ that ingests the evidence — but nothing said so to the surfaces that merge things. This is that sentence:What changed
heart/freeze.py+ afreezeverb (pyauto-heart freeze):writing
$HEART_STATE_DIR/freeze.json—{reason, set_at, until, set_by}— beside the other sidecars, atomically, Heart the only writer.--untilis mandatory. A freeze with no expiry never clears, so there is no way to take one out by accident. Pastuntilthe flag reads as clear for every consumer while--showreportsexpired, so a forgotten set stays visible instead of vanishing. An unreadable or expiry-less file also reads as clear: a freeze nobody can parse must not be able to block a merge.3while active,0when clear or expired,2on usage error — one call, no JSON parse.--setalways exits0, so a driver underset -edoes not abort on the freeze it just took out itself.The call sites, added not just described:
validate --ingest--out(an inspection path), never on the read-only path.skills/review_releasePyAutoHands/skills/pre_buildREFERENCE.mdrather than edited blind.REFERENCE.mdgains the CLI row, the state-file entry and one "The release freeze window" section carrying the schema, the expiry rule, the call-site table and the readers.The judgement call: readiness is untouched
The prompt says the flag is "advice-with-teeth for
/prmonly — no other skill blocks on it". Folding it intoreadiness's colour or reason lists would contradict that directly: every ship gate, every release gate and every conductor consults that verdict, so a freeze would block all of them. Soheart/readiness.pyis not touched andcompute()stays a pure function of the snapshot. The flag is a separate, live read. Readiness answers is the organism healthy; the freeze answers is a validation window open right now.Tests
python3 -m pytest -q→ 679 passed (was 657). 19 new intests/test_freeze.py(the four fields on disk, the three readings, expiry, a past--untilrefused, a reason required, the duration and ISO forms of--until, zoneless-is-UTC, all four exit codes, the--jsonBrain reads,--set+--clearrefused,--setwithout--untilrefused and writing nothing) and 3 intests/test_validate.py(ingest clears;--outdoes not; the read-only path does not).Heart
pyauto-heart readinessis RED at PR-open:PyAutoLens: CI failure,release validation FAILED (stage integrate),PyAutoArray: open PR 11d old. None touches this diff — a new module, a CLI verb, one ingest-side clear and docs; no library source, no release surface. The RED is not acknowledged for this task (the acknowledgement given earlier today was scoped to other tasks), so merge needs the human's own call.🤖 Generated with Claude Code
https://claude.ai/code/session_013HsZA1ufn3msgPiDFxEXa6