Skip to content

fix(readiness): ingest Stage 3's verify_install result into the install-verification leg#77

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/wire-verify-install-leg
Jul 15, 2026
Merged

fix(readiness): ingest Stage 3's verify_install result into the install-verification leg#77
Jammy2211 merged 1 commit into
mainfrom
feature/wire-verify-install-leg

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Closes #76.

What was wrong

Stage 3 (workspace-validation.yml, mode=release) has always run verify_install A–E against the TestPyPI wheels. The result was then thrown away: heart/validate.py consulted the sidecar only in the failure directionready is False force-failed the stage, while a PASS contributed nothing. Nothing ever wrote the verify_install.json that heart/state.py:84 reads into the snapshot, so the readiness leg reported install verification not run no matter how often the check passed.

This is one of the three legs holding Heart at YELLOW 70. The armed nightly release driver's gate requires GREEN and deliberately has no force input, so a leg that can never be satisfied means the nightly can never ship unattended — 2026.7.15.1 shipped only because a human forced it with release --force.

Measured on main before the change (not inherited from the prompt):

  • pyauto-heart readinessYELLOW score 70, ? install verification not run
  • ~/.pyauto-heart/verify_install.jsonabsent
  • ~/.pyauto-heart/validation_report.json from the real 2026-07-15 release run → ingested fine (integrate pass, 543p/0f), zero verify_install trace

What this does

  • heart/checks/verify_install.sh — records index (testpypi | pypi) in the sidecar.
  • to_stage_report() — embeds the sidecar in the stage report as evidence. The existing force-fail path is untouched.
  • validate --ingest — persists the block to HEART_STATE_DIR/verify_install.json, newest ts winning so re-ingesting an older artifact can't walk the leg backwards. It stays out of validation_report.json (schema v1 doesn't describe it), so ingest() is split into _fold/_distill and run() reaches the fold state without changing ingest's signature or purity.
  • heart/readiness.py — no gate-logic change; reason lines now name the index.

workspace-validation.yml needs no change — it already passes --verify-install (line 537). The CI side was always wired; only the Python side discarded the pass.

The one judgment call

A --testpypi run proves the wheels about to ship install; it says nothing about the current PyPI release. Wiring it up silently would let TestPyPI evidence satisfy a leg whose plain reading is "a new user can pip install autolens".

Human decision (2026-07-15): accept it — the about-to-ship wheels are the right evidence for a release gate — but record provenance. So index travels with the result and appears in every reason line (install verification stale (testpypi, 16d old)). Precedent: the rehearse stage already records index: testpypi. A sidecar predating the field reports index unknown rather than being guessed at.

Verification

Beyond the unit tests, I drove the real CI sequence end-to-end — verify_install.sh--emit-stage-report--ingest — deleting the intermediate sidecar before ingest to prove the result travels inside the stage report rather than being re-read:

install leg WITH ingested sidecar:  NONE — leg satisfied
install leg WITHOUT sidecar:        ['install verification not run']   # today's main
  • 276 tests pass (263 pre-existing + 13 new).
  • The 6 new test_validate.py and 3 new test_readiness.py tests were confirmed to fail against unfixed source — they aren't vacuous. (The 7th, ..._leaves_sidecar_untouched, passes both ways by design: it guards a no-op.)

Scope

Per the prompt, the other two YELLOW legs are follow-ups, not this PR: an ops re-run of the weekly mode=smoke workspace-validation to refresh the stale test_run leg (its 3 failures from 2026-07-09 are already disproven by the fresh release run), and hygiene triage of 58 stale parked no_run scripts.

This makes Heart GREEN-eligible on this leg; it does not by itself make Heart GREEN.

Autonomy note

Launched with --auto, but work-type release caps at human-required (AUTONOMY.md:56), so effective level = min(safe, human-required) = human-required and --auto changed nothing. That's the cap working as designed: this edits what makes Heart GREEN, which is the exact gate guarding the unattended nightly. Plan was human-approved; this run ends at PR-open. Merge stays human.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VrVWvBMKQzxavj3VUokwAb

…ll leg

Stage 3 (workspace-validation, mode=release) has always run verify_install
A-E against the TestPyPI wheels, but the sidecar was consulted only in the
failure direction: ready==false forced the stage to fail, while a PASS
contributed nothing and was discarded. Nothing ever wrote the
verify_install.json that heart/state.py reads into the snapshot, so the
readiness leg reported "install verification not run" no matter how many
times the check passed.

That is one of three legs holding Heart at YELLOW 70. The armed nightly
release driver's gate requires GREEN and has deliberately no force input, so
a leg that can never be satisfied means the nightly can never ship
unattended -- 2026.7.15.1 shipped only because a human forced it.

Carry the sidecar through as evidence and persist it on ingest:

- verify_install.sh records `index` (testpypi|pypi) in the sidecar.
- to_stage_report() embeds the sidecar in the stage report; the existing
  force-fail path is unchanged.
- validate --ingest persists the block to HEART_STATE_DIR/verify_install.json
  (newest ts wins, so re-ingesting an older artifact cannot walk the leg
  backwards). It stays out of validation_report.json, which is schema v1 and
  does not describe it; ingest() is split into _fold/_distill so run() can
  reach the fold state without changing ingest's signature or purity.
- readiness names the index in every reason line. A --testpypi run proves the
  wheels about to ship install -- the right evidence for a release gate
  (human decision, 2026-07-15) -- but must never silently read as proof that
  installing from PyPI works.

readiness gate logic is otherwise untouched: the leg simply starts receiving
evidence through the path it already read. workspace-validation.yml needs no
change; it already passes --verify-install.

Verified end to end by driving the real CI sequence (verify_install.sh ->
--emit-stage-report -> --ingest, with the intermediate sidecar deleted before
ingest to prove the result travels inside the stage report): the leg goes from
"install verification not run" to satisfied, and reverts when the sidecar is
removed. The 6 new validate tests and 3 new readiness tests were confirmed to
fail against unfixed source.

Refs #76
@Jammy2211 Jammy2211 merged commit e43a3a9 into main Jul 15, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/wire-verify-install-leg branch July 15, 2026 13:08
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.

fix(readiness): ingest Stage 3's verify_install result into the install-verification leg

1 participant