Skip to content

refactor: collapse run_smoke.py onto the PyAutoHands runner (198 → 77 lines) - #273

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/smoke-copy-drift-ci-docs-ozntvv
Aug 24, 2026
Merged

refactor: collapse run_smoke.py onto the PyAutoHands runner (198 → 77 lines)#273
Jammy2211 merged 1 commit into
mainfrom
claude/smoke-copy-drift-ci-docs-ozntvv

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of PyAutoHands#260. .github/scripts/run_smoke.py was one of ten
vendored copies of the same machinery across the workspace repos. It becomes a
thin delegator over autohands/run_python.py — the shape the HowTo repos have
used all along.

The copies were not merely duplicated, they were expensive. Each of the last
three fixes had to be swept across every copy by hand: the env-resolver fork
(PyAutoHands#185), the per-script timeout and process-group kill (#226/#227),
and the jupyter guard. The HowTo tier needed none of those sweeps, precisely
because it holds no logic.

The blocker was never behaviour, it was discovery model — the shared runner
was opt-out (no_run.yaml) while this gate is opt-in (smoke_tests.txt).
PyAutoHands#261 closed that with --list; #262 corrected how it interacts with
no_run.yaml (below).

Behaviour preserved — verified, not assumed

  • Env resolution is identical. The old runner passed a relative script
    path to build_env_for_script; the shared runner passes an absolute one.
    Every listed script was resolved both ways and diffed: 0 differences
    across all four *_workspace_test repos. Pattern matching is substring/stem
    based so the path form is irrelevant, and no profile pattern here can collide
    with the absolute prefix.
  • Timeout and kill are the same code this file already imported from
    build_util (timeout_for, kill_group).
  • No profile args. No profile in this repo sets per-script args, so the
    shared runner's extra-args support changes nothing.
  • Every entry in smoke_tests.txt resolves to a file that exists (22/22).

no_run.yaml is deliberately not applied

It is policy for the release mega-run and notebook generation;
smoke_tests.txt is policy for this gate, and a script legitimately appears
in both. Honouring no_run over the allowlist would have silently dropped 13
scripts across four repos
from smoke coverage — 2 of them in this repo
(interferometer/jax_likelihood/mge.py,
interferometer/datacube/shared_preloads.py). Measured and fixed in
PyAutoHands#262 before this PR was written.

--report-dir is load-bearing: run_python.py only propagates failure when a
report was built, so without it the gate would be vacuously green.

Test Plan

  • Delegator exercised end-to-end on a fixture workspace: allowlist honoured
    in file order, unlisted scripts never run, a no_run-listed-and-allowlisted
    script still runs, a failing script exits 1, a stale entry FAILs without
    stopping the run, and both profile defaults and per-script overrides reach
    the child process
  • PyAutoHands suite green (389 passed) on the runner this delegates to
  • This repo's own smoke gate on this PR — the real verification

Requires PyAutoHands#261 and #262, both merged.

Generated by the PyAutoLabs agent workflow.


Generated by Claude Code

…7 lines)

Phase 1 of PyAutoHands#260. This file was one of ten vendored copies of the
same machinery across the workspace repos; it becomes a thin delegator over
`autohands/run_python.py`, the shape the HowTo repos have used all along.

The copies were not merely duplicated, they were EXPENSIVE. Each of the last
three fixes had to be swept across every copy by hand: the env-resolver fork
(PyAutoHands#185), the per-script timeout and process-group kill (#226/#227),
and the jupyter guard. The HowTo tier needed none of those sweeps, precisely
because it holds no logic. The blocker to collapsing was never behaviour but
discovery model — the shared runner was opt-out (no_run.yaml) while this gate
is opt-in (smoke_tests.txt) — and PyAutoHands#261 closed that with `--list`.

Behaviour is preserved, verified rather than assumed:

- Env resolution is IDENTICAL. The old runner passed a relative script path to
  build_env_for_script; the shared runner passes an absolute one. Every listed
  script was resolved both ways and diffed: 0 differences across all four
  repos (and 0 across the three user workspaces). Pattern matching is
  substring/stem based, so the path form does not matter, and no profile
  pattern can collide with the absolute prefix.
- The per-script BUILD_SCRIPT_TIMEOUT cap and the process-group kill are the
  same implementation this file already imported from build_util.
- No profile in this repo sets per-script `args`, so the shared runner's
  extra-args support changes nothing here.
- Every entry in smoke_tests.txt resolves to a file that exists.

`config/build/no_run.yaml` is deliberately NOT applied to the allowlist. It is
policy for the release mega-run and notebook generation; smoke_tests.txt is
policy for this gate, and a script legitimately appears in both. Honouring
no_run here would have silently dropped 13 scripts across four repos from smoke
coverage — measured, and fixed in PyAutoHands#262 before this landed.

`--report-dir` is load-bearing: run_python.py only propagates failure when a
report was built, so without it the gate would be vacuously green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpSFum81Jeq9KZ9wdKtaeZ
@Jammy2211
Jammy2211 merged commit 257a1ff into main Aug 24, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the claude/smoke-copy-drift-ci-docs-ozntvv branch August 25, 2026 19:00
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.

2 participants