Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/workspace-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ name: Workspace Validation
# FAST_PLOTS=1 for user workspaces, PYAUTO_TEST_MODE=0 (real searches,
# each script's own n_like_max caps) + full-res + real plots for
# *_workspace_test (closes Gap B; see PyAutoHeart/docs/release_validation.md
# for the full table). Also runs `verify_install` A-E against the same
# for the full table). Also runs `verify_install` A-F against the same
# wheels, and emits a `{"stage": "integrate", ...}` report
# `pyauto-heart validate --ingest` understands. Skips notebook execution —
# out of scope for M3, scripts are the release-validation surface.
Expand Down Expand Up @@ -472,7 +472,8 @@ jobs:

# ---------------------------------------------------------------------------
# mode=release only, from here down. verify_install_release closes item 5
# (verify_install A-E against the same wheels); emit_release_report closes
# (verify_install A-F against the same exact wheels, including the Python
# 3.11 Requires-Python rejection); emit_release_report closes
# item 4 (the {"stage": "integrate", ...} report `pyauto-heart validate
# --ingest` understands). Both are pure CI-side steps run with Heart's own
# code, checked out from THIS repo — no dispatch, no other-repo mutation.
Expand All @@ -485,7 +486,21 @@ jobs:
steps:
- name: Checkout PyAutoHeart
uses: actions/checkout@v4
- name: Run verify_install A-E against the TestPyPI wheels
# Check B invokes each explicit pythonX.Y binary in one job. setup-python
# prepends each toolcache interpreter without removing the earlier paths.
- name: Expose Python 3.11 for the below-floor rejection
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Expose supported Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Expose supported Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Run verify_install A-F against the TestPyPI wheels
env:
TESTPYPI_VERSION: ${{ inputs.testpypi_version }}
run: |
Expand Down
12 changes: 9 additions & 3 deletions bin/pyauto-heart
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,11 @@ cmd_fix() {
}

help_verify_install() { cat <<EOF
pyauto-heart verify_install [CHECKS...] [--version V] [--testpypi] [--keep]
pyauto-heart verify_install [CHECKS...] [--version V] [--testpypi]
[--find-links DIR] [--keep]

Deep release-readiness check for PyAutoLens: runs independent pip & conda
install-path checks (A–E) in throwaway venvs/conda envs and reports a
install-path checks (A–F) in throwaway venvs/conda envs and reports a
PASS/FAIL/SKIP table.

This is SLOW (it installs from PyPI across several Python versions) — it is an
Expand All @@ -346,10 +347,15 @@ YELLOW.

Checks:
A pip install autolens (default python3) + start_here.py + welcome.py
B pip install autolens + import on python3.9 / 3.10 / 3.11 / 3.13
B one exact release installs/imports on 3.12/3.13 and rejects on 3.11
C conda install flow (python=3.12) + start_here.py + welcome.py
D pip install "autolens[optional]" resolves and imports
E pip install autolens==<pinned> installs by explicit pin
F Colab bootstrap simulation + one real notebook cell

Check B requires python3.11, python3.12, and python3.13 on PATH. A passing
--find-links run is development-only evidence and leaves readiness STALE;
PyPI/TestPyPI evidence is required for the release gate.

Arguments are forwarded to the underlying check; see \`-h\` on the script.
EOF
Expand Down
35 changes: 25 additions & 10 deletions docs/release_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ untouched, default `mode: smoke` per-PR path):
wheels at the rehearsed version and puts **no** library source on
`PYTHONPATH`, still executing from inside the workspace checkout.
- `verify_install_release` runs `heart/checks/verify_install.sh --testpypi
--version <version>` A–E against the same wheels.
--version <version>` A–F against the same wheels.
- `emit_release_report` reshapes Build's `aggregate_results.py` report.json
(via the new `heart/validate.py::to_stage_report` / `pyauto-heart validate
--emit-stage-report`) into the `{"stage": "integrate", ...}` contract
Expand Down Expand Up @@ -112,11 +112,24 @@ carries `profile` and `commit_shas`, so the gate can enforce them):
`pip install` the wheels **but still execute scripts from within the workspace
checkout** (for `config/` + `dataset/`), with no source on `PYTHONPATH`.

The integration run also performs `verify_install` A–E against the same wheels.
That result feeds the install-verification readiness leg (see "How the gate
enforces these"), tagged `index: testpypi` — it proves the wheels **about to
ship** install, which is the right evidence for a release gate, and is reported
as such rather than as proof that installing from PyPI works today.
The integration run also performs `verify_install` A–F against the same wheels.
Check B reuses that exact TestPyPI version: it must install and import on Python
3.12 and 3.13, while Python 3.11 must reject it specifically because its
`Requires-Python` metadata is `>=3.12`. An unpinned install is not sufficient
evidence because pip may select an older compatible release.

That TestPyPI A–F result feeds the install-verification readiness leg (see
"How the gate enforces these"), tagged `index: testpypi`. It proves the wheels
**about to ship** install, which is the right evidence for a release gate, and
is reported as such rather than as proof that installing from PyPI works today.

For pre-publication development, `verify_install B --version <version>
--find-links <wheel-dir>` exercises the same exact-version logic against local
wheels while retaining PyPI for third-party dependencies. Its sidecar is
labelled `index: find-links`, so it cannot be mistaken for PyPI or TestPyPI
release evidence. Heart retains a fresh passing local result as development
evidence but reports STALE until a PyPI or TestPyPI verification replaces it;
a failing local artifact remains RED.

## How the gate enforces these

Expand All @@ -130,10 +143,12 @@ as such rather than as proof that installing from PyPI works today.

The install-verification leg is separate and reads
`~/.pyauto-heart/verify_install.json`, written either by a local `pyauto-heart
verify_install --report-json` run (`index: pypi`) or by `--ingest` folding the
block out of a Stage 3 artifact (`index: testpypi`). Both satisfy the leg; the
index is named in every reason line so the verdict states which install path it
actually verified.
verify_install --report-json` invocation (`index: pypi`, `testpypi`, or
`find-links`, according to its flags) or by `--ingest` folding the block out of
a Stage 3 artifact (`index: testpypi`). Both release indexes satisfy the leg;
the index is named in every reason line so the verdict states which install path
it actually verified. Development-only `index: find-links` evidence does not
satisfy this release gate.

Before M3 (or if the Release Agent only runs the M1 rehearsal and skips
dispatching `workspace-validation.yml` in `mode: release`), an ingested
Expand Down
7 changes: 4 additions & 3 deletions health_agent/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ Audited at commit `a2543d0` (Rename PyAutoPulse to PyAutoHeart).

**Deep** (slow, on-demand / cloud cron, never in the tick):

- **verify_install** (`checks/verify_install.sh`) — pip & conda install-path
checks A–E in throwaway envs across Python versions. RED if last run
`ready==false`; YELLOW if stale (`>14d`) or never run. Moved here from
- **verify_install** (`checks/verify_install.sh`) — pip, conda, and Colab
install-path checks A–F. Check B proves one exact release succeeds on Python
3.12/3.13 and rejects on 3.11. RED if the last run has `ready==false`; STALE
if it is find-links-only, older than 14 days, or never run. Moved here from
PyAutoHands — install verification is Heart's job.
- **url_check / url_sweep / url_check_live** — offline regex guard, ecosystem
sweep, and live HTTP reachability audit. **Monitoring only — never gates
Expand Down
6 changes: 3 additions & 3 deletions health_agent/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ deep_checks:
- id: verify_install
impl: heart/checks/verify_install.sh
cli: "pyauto-heart verify_install"
measures: "pip & conda install-path checks A-E in throwaway envs across Python versions"
gate_role: "RED if last run ready==false; YELLOW if stale (>14d) or never run"
measures: "pip, conda, and Colab install-path checks A-F; exact release succeeds on Python 3.12/3.13 and rejects on 3.11"
gate_role: "RED if last run ready==false; STALE if find-links-only, older than 14d, or never run"
- id: url_check
impl: heart/checks/url_check.sh
cli: "pyauto-heart url_check [dir]"
Expand Down Expand Up @@ -192,7 +192,7 @@ workflows:
vs current library main, source-shadowed via PYTHONPATH; writes the report.json
the test_run check + readiness consume. mode=release (Brain Release Agent
dispatch only, M3): pip-installs the rehearsed TestPyPI wheels (no source on
PYTHONPATH) under the `release` env profile, runs verify_install A-E against
PYTHONPATH) under the `release` env profile, runs verify_install A-F against
the same wheels, and emits the `release-stage-report` artifact
`pyauto-heart validate --ingest` consumes. Reuses Build's executor primitives
(script_matrix/run_python/aggregate_results) unmodified in both modes.
Expand Down
Loading
Loading