Repository navigation
feat(smoke): affected-by, parallel --jobs and a targeted mode for shift workers - #353
Merged
Merged
Conversation
…ke split (#352) Plan C, approved by the human 2026-11-19 ("approve C"): - --affected-by REPO[,REPO...]: only workspaces whose smoke `chain:` contains (or which are) one of the repos; names that select nothing are reported, not an error, so a close-out can pass any PR repo. - --jobs N (default 1 = unchanged serial): N workspaces at once, each as its own heart.smoke process with its own cached env and log under $HEART_STATE_DIR/smoke-runtime/<ws>/smoke.log; OMP/MKL/OPENBLAS/NUMBA thread counts and XLA's CPU pool capped so N x threads <= cores (caps re-applied in the child's runtime env); fails if any workspace fails; per-workspace summary. - --targeted --changed-files PATH... [--names] [--base]: run only the curated smoke_tests.txt entries that are a changed file or mention a changed module's import path or a public def/class/NAME the diff touches; none match -> the cheapest curated script of the changed repo's own workspace as an import check. Runs through PyAutoHands run_python.py --list, reporting to test-results/targeted/; output/ is not wiped. - config: euclid workspace declares scripts_dir "." (its list is root-relative). A human `pyauto-heart smoke` with no flags still runs every workspace serially. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shift workers' smoke leg ran every workspace one after another (~35–40 min of a 75-min shift), far more than a task done in a chat. Plan C (approved 2026-11-19, "approve C"; #352): workers run a targeted smoke, and the full affected smoke runs in parallel in the close-out, only before an unattended merge. This PR adds the Heart side; PyAutoBrain's templates and AUTONOMY.md leg 2 follow in a sibling PR (merge this one first — the close-out calls the new flags).
New
pyauto-heart smokeforms (a human/smoke_testwith no flags is unchanged: every workspace, serially):--affected-by REPO[,REPO…]— workspaces whosechain:contains the repo (or whose directory is it); nothing selected → "nothing to run", exit 0.--jobs N(default 1 = old serial path) — each workspace in its own process and cached env, own log under$HEART_STATE_DIR/smoke-runtime/<ws>/; thread caps cores//N (OMP/MKL/OPENBLAS/NUMBA, XLA intra-op) applied last in the child viaHEART_SMOKE_THREAD_CAPS; PASS/FAIL table, exit 1 if any fails.--targeted --changed-files PATH… [--names …] [--base REF]— curatedsmoke_tests.txtentries that are themselves changed or name the changed module's dotted path or a touched public name (top-level def/class/NAME =, fromgit diff -U0vs the merge-base); none → the fastest recorded script of the changed repo's own workspace as an import check. Reports totest-results/targeted/.config/repos.yaml: euclid declaresscripts_dir: ".".Closes #352 (with the PyAutoBrain sibling PR)
API Changes
None to a library API — new CLI flags on
pyauto-heart smoke; defaults unchanged.See full details below.
Test Plan
tests/test_smoke_selection.py— 14 new tests (13 fail on main; the 14th exits on main as an unknown flag): selection per changed repo (a PyAutoGalaxy change skips autofit/autocti/autocti_test; PyAutoFit selects all),--jobs 3same pass/fail + result files as serial on fake workspaces, one failing workspace fails the run, targeted selection from a fakesmoke_tests.txt, thread caps in the child envsersic.pychange → scripts by import path, fallbackguides/using_jax.py); no real smoke sweep run (a shift was using the laptop)Full API Changes
Added
pyauto-heart smoke --affected-by,--jobs,--targeted --changed-files [--names] [--base]; envHEART_SMOKE_THREAD_CAPSChanged
config/repos.yamleuclidscripts_dir: "."Known limits
output/is not wiped.smoke_tests.txt, so targeted mode never selects it.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code