From 43b8869a99afde0594093bb78ea9705fb4d12607 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 00:35:57 +0000 Subject: [PATCH 1/3] =?UTF-8?q?prompt:=20route=20smoke-runner-delegation?= =?UTF-8?q?=20(#260)=20=E2=86=92=20start=5Flibrary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-measured all 10 run_smoke.py copies from every repo's main before planning, and recorded the decision the prompt gates on. The 2026-08-05 correction is itself stale. Measured today: 10 copies, 3 variants, ZERO functional drift inside any variant — workspace (356L) byte-identical across its 3 repos, workspace_test (198L) diverging only in 2 docstring lines, HowTo (75L) only in PROJECT. The blocking question ("does autolens_workspace_test's timeout/kill get promoted, or keep a documented divergence?") was already answered by PROMOTION: timeout_for and kill_group live in PyAutoHands build_util (#226/#227 -> 52408a84) and all 10 copies now import them with guarded fallbacks. Prompt steps 1 (skip-guard) and 4 (_BUILD_DIR) verified done, not redone. Decision: full delegation to a PyAutoHands-owned runner, staged. The zero-drift measured is the receipt for three manual N-repo sweeps, not evidence the copy-per-repo design is safe; the HowTo tier needed none of them because it holds no logic. The real blocker is discovery model, not behaviour — run_python.py is opt-out with no notebook leg, the other two variants are opt-in allowlists — so each phase is a Hands feature first and per-repo edits second. - prompt draft/maintenance/ci/ -> active/, Status: issued, Issued: 2026-08-24 - active.md: smoke-runner-delegation, status library-dev, worktree_check_conflict clean (exit 0) across all 8 repos - dashboard regenerated Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01UpSFum81Jeq9KZ9wdKtaeZ --- active.md | 18 ++++ .../ci => active}/run_smoke_copy_drift.md | 91 ++++++++++++++++++- dashboard.html | 24 ++--- dashboard.md | 36 ++++---- 4 files changed, 138 insertions(+), 31 deletions(-) rename {draft/maintenance/ci => active}/run_smoke_copy_drift.md (52%) diff --git a/active.md b/active.md index fb25a165..3092dfdd 100644 --- a/active.md +++ b/active.md @@ -13,3 +13,21 @@ - registered: 2026-08-19 by the wake_up session — the issuing session (claude/autofit-priors-messages-audit-ylvenv) filed the prompt + issue but not this entry, tripping Lifecycle Drift on main. - repos-none-claimed: this entry claims NO repos — one line deliberately, not 2-space bullets. + +## smoke-runner-delegation +- issue: https://github.com/PyAutoLabs/PyAutoHands/issues/260 (issued 2026-08-24) +- issued: 2026-08-24 +- prompt: active/run_smoke_copy_drift.md +- status: library-dev +- worktree: ~/Code/PyAutoLabs-wt/smoke-runner-delegation +- decision: the prompt's blocking question is ANSWERED before any repo is touched — + the timeout/kill behaviour was PROMOTED to everyone (PyAutoHands#226/#227 → 52408a84; + all 10 copies import timeout_for + kill_group). Shape chosen: full delegation to a + PyAutoHands-owned runner, staged. Phase 1 = --list allowlist mode + the 4 *_workspace_test + copies; phase 2 = notebook leg + the 3 workspace copies; phase 3 = HowTo, no work. +- measured: 2026-08-24, from every repo's main — 10 copies, 3 variants, ZERO functional + drift inside any variant (workspace 356L byte-identical; workspace_test 198L comment-only; + HowTo 75L differ by PROJECT alone). Prompt steps 1 and 4 verified already done. +- registered: 2026-08-24 by the start_dev session (claude/smoke-copy-drift-ci-docs-ozntvv); + worktree_check_conflict clean (exit 0) for all 8 repos. +- repos: diff --git a/draft/maintenance/ci/run_smoke_copy_drift.md b/active/run_smoke_copy_drift.md similarity index 52% rename from draft/maintenance/ci/run_smoke_copy_drift.md rename to active/run_smoke_copy_drift.md index 480f32ae..9d77d38b 100644 --- a/draft/maintenance/ci/run_smoke_copy_drift.md +++ b/active/run_smoke_copy_drift.md @@ -7,8 +7,9 @@ Repos: Difficulty: medium Autonomy: supervised Priority: normal -Status: draft +Status: issued Filed: 2026-07-25 (backfilled from git) +Issued: 2026-08-24 > **Re-scoped 2026-08-05.** The original finding below is preserved for history > but its two headline claims are now measured to be wrong: step 1 is already @@ -96,3 +97,91 @@ Consequences for the original task, in order of how much they change it: carries a documented reason why it diverges. - No repo loses behaviour it has today; `autolens_workspace_test` still enforces its per-script timeout. + +--- + +## Re-measurement + decision (2026-08-24) + +Re-measured from every repo's `main` before planning. **The 2026-08-05 +correction is itself now stale**: its blocking question has been answered +in-tree, and the drift it measured is gone. + +| Variant | Repos | Lines | Intra-variant drift, measured | +|---|---|---|---| +| **workspace** | autofit_workspace, autogalaxy_workspace, autolens_workspace | 356 | **none** — byte-identical | +| **workspace_test** | autofit/autogalaxy/autolens/autocti `_test` | 198 | **comment-only** (2 docstring lines); autogalaxy ≡ autolens byte-identical | +| **HowTo** | HowToLens, HowToGalaxy, HowToFit | 75 | **one constant** (`PROJECT =`) | + +Ten copies, three variants, zero functional divergence inside any variant. +Every blocker the earlier correction named is closed: + +- **The timeout/kill divergence was resolved by promotion, not documentation.** + `timeout_for` and `kill_group` now live in PyAutoHands + `autohands/build_util.py` (#226/#227 → `52408a84`); all **ten** copies read + `BUILD_SCRIPT_TIMEOUT` and import both with guarded local fallbacks. The + sweep branch `claude/backport-per-script-timeout-r3w1sv` is still present on + every affected repo. `_kill_group` exists in zero copies. Task step 2's + "answer this before writing any code" is therefore **already answered**: + promoted to everyone. +- **Step 1 (skip-guard)** verified: `is_clean_skip_exit` appears in exactly the + three notebook-capable copies and nowhere else — correct, since the other + seven never shell out to `jupyter`. +- **Step 4 (`_BUILD_DIR`)** is done — autogalaxy_workspace is byte-identical to + its two siblings. + +### The decision (task step 2, per variant) + +**Full delegation to a PyAutoHands-owned runner, staged.** The HowTo tier is the +target shape and already exists in-tree. + +The zero-drift measured above is not evidence the copy-per-repo design is safe — +it is the *receipt* for three manual N-repo sweeps that were needed to restore +it (env-resolver fork PyAutoHands#185, per-script timeout #226/#227, the +jupyter-guard fix). The HowTo tier needed **none** of those three sweeps, +precisely because it holds no logic: `PROJECT` plus a `subprocess.run` into +`autohands/run_python.py`. That is the argument for consolidating, and it is a +maintenance-cost argument, not a drift argument. + +The real blocker is **discovery model, not behaviour**: `run_python.py` is +opt-out (recursive discovery minus `config/build/no_run.yaml`) and has no +notebook leg, while both other variants are opt-in allowlists +(`smoke_tests.txt`, `smoke_notebooks.txt`). Consolidation is therefore a +PyAutoHands feature first and per-repo edits second. + +**Phase 1 — `workspace_test` (4 repos, 198 → ~75 lines).** +Add an allowlist mode to `autohands/run_python.py` (`--list `, taking +precedence over recursive discovery; `no_run.yaml` still applies). Then replace +each `_test` copy with a HowToLens-shaped delegator. Nothing is promoted that +isn't already in `build_util` — `run_one` is `execute_script` plus +`timeout_for`/`kill_group`, all three already there. + +**Phase 2 — `workspace` (3 repos, 356 → ~75 lines).** +Promote the notebook leg into PyAutoHands: the regenerate-from-source-and-retry +recovery, the `JUPYTER_MISSING_RC = 127` non-abort path, and the ordering +invariant that a missing `jupyter` and a `TIMEOUT_RC` are both checked *before* +`is_clean_skip_exit`. `build_util.execute_notebook` already carries the +skip-guard and `execute_notebooks_in_folder` already exists, so this is a +notebook-allowlist CLI leg plus the recovery, not a rewrite. Then collapse the +three workspace copies. + +**Phase 3 — HowTo (3 repos).** No work. Already the end state; the audit +confirms it. + +### Also surfaced + +`PyAutoHands/docs/internals.md:183` is stale on its own inventory: it says +"nine copies, five distinct revisions — they have drifted", omits HowToFit +(which gained a copy with the opt-out HowTo smoke rollout), and the drift claim +is now false. Correct it as part of Phase 1. + +### Acceptance (restated against the decision) + +- The timeout/kill decision is written down above: **promoted**, with the + in-tree evidence. No repo keeps a documented divergence on that axis. +- After Phase 2, every one of the ten copies is a thin wrapper over a + PyAutoHands-owned module; the only per-repo content is `PROJECT` and the + allowlist paths. +- No repo loses behaviour: the per-script timeout, the process-group kill, the + `124` timeout exit code, the notebook regenerate-and-retry recovery, and the + jupyter-missing non-abort path all survive as `build_util`/CLI behaviour and + are asserted by PyAutoHands' own test suite before any workspace is collapsed. diff --git a/dashboard.html b/dashboard.html index 82316565..069bf8dc 100644 --- a/dashboard.html +++ b/dashboard.html @@ -4,7 +4,7 @@ PyAutoMind Dashboard - +