Skip to content

feat: read the Heart freeze flag — vitals, /prm merge gate, batch packet - #347

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/mind-post-cortex-p5-heart-freeze
Sep 3, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/mind-post-cortex-p5-heart-freeze

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes part of PyAutoLabs/PyAutoHeart#196 — phase 5 (last) of the mind-post-cortex epic (assessment gap 6). The read surfaces. Companions: PyAutoLabs/PyAutoHeart#197 (the flag itself — merge that first, this PR reads its verb) and PyAutoLabs/PyAutoHands#275 (the pre_build call site).

Decision taken by the architect — reverse before merge if you disagree

The prompt named one human-required decision: may /prm override an active freeze with an explicit --thaw? Adopted per the prompt's own recommendation — yes, logged. /prm --thaw "<why>" merges a library PR through an active freeze and appends one row to PyAutoMind/autonomy_log.md under a ## Freeze overrides heading (created on first use, no new log file):

| date | task / PR | freeze reason | until | thawed by | why |

The reasoning, also in prm.md: a freeze is advice about evidence, not a protected branch, and an unloggable override is one people route around instead of recording. This was decided by the architect on the prompt's recommendation, not by a human. If you disagree, the change is confined to the --thaw bullets in skills/prm/prm.md (§4 item 1, the Usage line, the §6 guard) and the mirror in skills/prm/reference.md — drop them and the gate becomes absolute.

The section itself is deliberately not pre-created in autonomy_log.md: it would land on Mind's main immediately via the ledger auto-merge, ahead of this review. The first override writes it.

What changed — three read-only surfaces, no writes

1. vitals faculty. Reads pyauto-heart freeze --show --json and reports FROZEN: <reason> until <ts> as a warning line (vitals.sh prints it under the board; AGENTS.md step 1b + the Output schema). Explicitly not a yellow_reasons entry and not a verdict input: readiness answers "is the organism healthy", the freeze answers "is a validation window open right now". An older Heart with no freeze verb prints nothing, and that is not an error.

2. /prm — the one surface with teeth. A new merge-gate leg (§4, before the library-first gate): an active freeze stops a PR in a library repo (the category: library entries of the body map — organ and workspace repos are untouched, and a workspace PR whose library half is held waits on the library-first gate anyway). Where Heart is not installed (mobile, web, CI) there is nothing to read and an absent flag is not a freeze. Plus the --thaw override above, the §6 guard bullet, the Usage line, and the mechanics mirror in reference.md.

3. batch. heart_freeze() reads the sidecar and re-derives expiry rather than trusting it, so a forgotten --set cannot block a collect for ever; anything unreadable reads as clear. One line in the collect summary and at the top of the packet, saying what the freeze means for merging.

_status.py carries the same line as a caller-supplied fact, defaulting to nothing on purpose: the Mind dashboard is a committed artifact regenerated in CI, where this dev-box state does not exist, so folding a live freeze into it would read as dashboard drift on the next --check. collect — which runs on the box that holds the state, printing to a terminal — supplies it. That invariant has its own test.

The wording lives once (_status.freeze_line) and is byte-identical to Heart's render_line, so all three surfaces say the same sentence.

Tests

python3 -m pytest -q → 872 passed, 1 failed; the failure is the pre-existing worktree-only test_cortex_conductor::test_a_fixture_tree_finds_the_schema_its_checkout_ships (a task worktree has no Cortex checkout), unrelated to this diff.

12 new in tests/test_batch_freeze.py: the wording verbatim, empty-when-thawed (clear / expired / absent), expiry re-derived, unreadable and expiry-less state reading clear, a zoneless until read as UTC, the box byte-identical with no freeze supplied, both renderers carrying exactly one line above the members, the science box, and the packet + summary lines.

Merge order and siblings

Base main. git merge-tree against origin/feature/mind-post-cortex-p3-pr-ledger and origin/feature/mind-post-cortex-p4-batch-fidelity: 0 conflicts against both (p3 edits prm.md §5 only; p4 edits _batch.py's outcome and merge-order blocks, not _status.py or collect_report's head). Merge PyAutoHeart#197 first — this PR documents a verb that has to exist.

Heart

pyauto-heart readiness is RED at PR-open: PyAutoLens: CI failure, release validation FAILED (stage integrate), PyAutoArray: open PR 11d old. None touches this diff — one faculty, one skill, one conductor and its tests; no library source, no release surface. The RED is not acknowledged for this task, so merge needs the human's own call.

🤖 Generated with Claude Code

https://claude.ai/code/session_013HsZA1ufn3msgPiDFxEXa6

…tch packet

Three read-only surfaces for the flag PyAutoHeart now owns (`pyauto-heart
freeze`, PyAutoHeart#196). Brain never writes it.

- **vitals faculty** — reads `pyauto-heart freeze --show --json` and reports
  `FROZEN: <reason> until <ts>` as a warning line. Explicitly NOT a
  `yellow_reasons` entry and not a verdict input: readiness answers "is the
  organism healthy", the freeze answers "is a validation window open right
  now". An older Heart with no verb prints nothing, which is not an error.
- **`/prm`** — the one surface with teeth. A merge-gate leg before the
  library-first gate: an active freeze stops a **library** repo's PR (the
  `category: library` entries of the body map); organ and workspace repos are
  untouched. `--thaw "<why>"` overrides and appends one row to
  `PyAutoMind/autonomy_log.md` under `## Freeze overrides` — the override
  exists because a freeze is advice about evidence, not a protected branch, and
  an unloggable override is one people route around instead of recording.
- **batch** — `heart_freeze()` re-derives expiry from the sidecar rather than
  trusting it, so a forgotten `--set` cannot block a collect for ever, and one
  line lands in the `collect` summary and packet. `_status.py` carries the same
  line as a CALLER-SUPPLIED fact, defaulting to nothing: the Mind dashboard is
  a committed artifact regenerated in CI, where this dev-box state does not
  exist, so folding a live freeze into it would read as dashboard drift on the
  next `--check`.

The wording lives once (`_status.freeze_line`) and is byte-identical to
Heart's, so the three surfaces say the same sentence.

Tests: 12 new (wording, expiry re-derivation, unreadable state, the
byte-identical box without a freeze, both renderers, the packet and summary
lines). Suite 872 passed; the one failure is the pre-existing worktree-only
`test_cortex_conductor::test_a_fixture_tree_finds_the_schema_its_checkout_ships`.

Refs PyAutoLabs/PyAutoHeart#196.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HsZA1ufn3msgPiDFxEXa6
@Jammy2211
Jammy2211 merged commit 67971f2 into main Sep 3, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/mind-post-cortex-p5-heart-freeze branch September 3, 2026 22:24
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