Repository navigation
Description
Overview
The legacy digest (timings/legacy_round_2026-09.md §1) measures the two _test flagships spending ~2–3 minutes per leg on checkout + install before the first script runs. That cost is identical on every PR and becomes the floor as phases 5–8 shrink the scripts. A first per-step read from the Actions jobs API, autolens_workspace_test run 34012149870 (main, both caches cold):
| step | py3.12 | py3.13 |
|---|---|---|
| Clone dependency chain + PyAutoHands | 21 s | 18 s |
| Set up Python | 0 s | 0 s |
| Install (base + the workspace's own epilogue) | 86 s | 78 s |
| Resolve keys / restores / measure / validate | 1 s | 1 s |
| Run the workspace runner | 410 s | 288 s |
| Record / upload / saves | 3 s | 2 s |
| job total | 8 m 49 s | 6 m 32 s |
So the fixed cost is ~100–107 s per leg, four fifths of it pip install of the chain from source with no pip cache (lib-tests.yml has cache: pip; smoke-tests.yml does not), and the rest full clones of five libraries plus PyAutoHands.
Plan
- Measure first, across the ten caller repos and the last N runs, and write the per-step table into this issue; the change is judged against it.
- Depth-1 clones for the chain with the matching-branch fallback preserved exactly (a library PR must still be tested against its workspace).
- A pip cache on
setup-python(or an explicitactions/cacheon~/.cache/pip) so third-party wheels (jax, numpy, scipy, matplotlib, astropy) stop being re-downloaded; the PyAuto libraries themselves stay installed from source. - Record the fixed overhead as data (
setup_s: job start → first script) beside the cache state so the board can show scripts vs overhead per leg. - Report on, do not do:
--no-depsfor the chain once deps are installed, prebuilt wheels, dropping--upgrade pip setuptools wheel.
Detailed implementation plan
Affected Repositories
- PyAutoHeart (primary, only)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./pyautoheart | main (feature/lib-tests-compile-caches in progress for #215) | clean |
Suggested branch: feature/smoke-fixed-overhead — stacked on feature/lib-tests-compile-caches (#215) because both edit smoke-tests.yml; opened against main once #215 has merged, or rebased then.
Implementation Steps
- Measure: a small
heart/helper or one-off script that lists the last NSmoke Testsruns per caller repo via the Actions jobs API (HEART_TIMINGS_TOKENpath, as the ingester) and tabulates per-step seconds: checkout, chain clone, setup-python, arcticpy, install, restores, runner, record/upload/saves. Post the table here. If install is not the dominant fixed cost, stop and report. smoke-tests.ymlclone step:git clone --depth 1 "https://github.com/$OWNER/$dep" "$dep"; the matching-branch fallback becomesgit -C "$dep" fetch --depth 1 origin "$BRANCH" && git -C "$dep" checkout "$BRANCH"; the dataset-cache key'srev-parse HEADstill answers on a shallow clone.- pip cache:
actions/setup-python@v5withcache: pipandcache-dependency-pathcovering the chain'srequirements*.txt/pyproject.toml/setup.pyfiles (they are cloned before setup-python runs, so the paths exist) — or an explicitactions/cacheon~/.cache/pipkeyed on the hash of those files + python leg ifsetup-python's hashing cannot see them. Source installs of the PyAuto libraries stay from source. setup_sas data: record the seconds from job start to the runner step's start in thecache_state.jsonsidecar (or beside it) sosmoke_timingscan carrysetup_sper leg and the record/board can show it; the drift rule is untouched.- Wiring tests in
tests/test_smoke_tests_wiring.py: the clone flags, the fallback fetch, the cache step, the runner command byte-identical, every new step non-fatal. - Validate with a before/after per-step table on one
_testrepo from the Actions API (same runner class; never local numbers) after merge.
Key Files
.github/workflows/smoke-tests.yml— clone, setup-python, sidecarheart/checks/smoke_timings.py,heart/timings.py,heart/dashboard.py—setup_stests/test_smoke_tests_wiring.py
Original Prompt
Click to expand starting prompt
PyAutoMind draft/feature/pyautoheart/smoke_workflow_fixed_overhead.md (moves to active/ with this issue). Measure the per-step fixed overhead of the reusable smoke workflow, then depth-1 clones with the matching-branch fallback preserved, a pip cache for the third-party wheels, and setup_s recorded as data; consider-and-report on --no-deps, prebuilt wheels and the --upgrade pip setuptools wheel line. Guard: runner command byte-identical, every new step continue-on-error, arcticpy path untouched unless measured.
Activity
Jammy2211 commentedon Sep 7, 2026
Per-step measurement (step 1 of the plan)
Source: autolens_workspace_test
Smoke Tests, the six most recent completed runs as of 2026-09-07,completed_at − started_atper job step in whole seconds.setup_s= job start → the runner step's start.main)main)main, pre-cache)main, pre-cache)Aggregates over the 12 legs: chain clone 16.5 s mean (13–24), install 83.6 s (66–91), everything else before the runner ~4 s, setup_s 104.3 s = 22.6 % of the mean job total (462 s). Install is the dominant fixed cost (80 % of the overhead) and remarkably stable, which is what a step that is almost entirely third-party wheel download + install looks like; the clone is 16 %. The "~2–3 minutes per leg" in the legacy digest is an over-estimate against this window — it holds only if the runner-provisioning slack and queueing are counted.
Both levers named in the plan target the right places: the pip wheel cache attacks the 84 s, depth-1 clones the 16.5 s. Ceiling if both land fully: setup_s → ~15–25 s.
Reported, not done
pip install --no-depsfor the chain once deps are installed. The epilogue runs three pip invocations, each re-resolving the whole third-party graph; resolving once and installing the five local trees--no-depswould plausibly save another 15–30 s per leg. Not done because--no-depsmoves the guarantee that the intra-family>=floors are satisfied (e.g. autoarray needsautonerves>=2026.8.23.1for the SMALLDAT regime stamp, whose violation is silent) from pip to whoever edits the epilogue — and the epilogue lives in each of eleven workspaces. Wants its own task, with the epilogue's resolved-version assertion extended to the family floors.--no-depslever.pip install --upgrade pip setuptools wheel. 3–6 s, less once the wheel cache lands. It is the one line that absorbs runner-image drift (pyproject.tomlrequiressetuptools>=79.0); if ever removed, replace it with an explicit floor rather than nothing. Not worth touching on this measurement.Generated by Claude Code
Jammy2211 commentedon Sep 7, 2026
Shipped
Merged in #218 (
551f165), stacked on #217. The chain and PyAutoHands are--depth 1clones with the matching-branch fallback preserved (fetch --depth 1+checkout -B "$BRANCH" FETCH_HEAD); a pip wheel cache on~/.cache/pipkeyed on the dependency declarations + python leg + epoch salt;setup_s(job start → first script) is now a field in the sidecar, intimings/scripts/<repo>.jsonland on the board's per-repo line. Tests 924 → 939.Baseline to judge against (the table above):
setup_s104 s mean per leg, install 84 s of it, clone 16.5 s. Read the post-merge value back from the record'ssetup_safter the callers' nextmainruns; the ceiling if both levers land fully is ~15–25 s. The three report-only levers (--no-deps, prebuilt wheels, the pip upgrade line) stay above as options, each wanting its own task. Mind record:PyAutoMind/complete/2026/09/smoke-fixed-overhead.md.Generated by Claude Code