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
37 changes: 37 additions & 0 deletions active.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,40 @@
- 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.
- progress: BOTH Hands legs DONE and pushed to PyAutoHands
claude/smoke-copy-drift-ci-docs-ozntvv. Phase 1 (8884ecd): `--list` opt-in script
lists on run_python.py. Phase 2 (c979b37): matching notebook leg on run.py —
`--list`, `--no-write-back`, `--retry-from`. 16 new tests; suite 388 passed /
5 skipped / 0 failed. No PR opened yet.
- phase-2 findings (these changed the plan, recorded so the workspace PRs inherit them):
- run_notebook.py writes executed outputs back IN PLACE. Correct for generation
(the outputs are the product), wrong for a PR gate, which must not dirty the
tree it tests. Hence `--no-write-back`; it supersedes the workspace copy's
staged-copy-at-root trick rather than porting it, since the kernel cwd is
already pinned to the repo root.
- JUPYTER_MISSING_RC did NOT need promoting. It exists because the workspace copy
shelled out to a bare `jupyter`; execute_notebook invokes
`sys.executable run_notebook.py`, so the abort-with-no-summary failure mode is
structurally absent. One promotion item dissolved on inspection.
- remaining: the 7 workspace collapses (4 *_workspace_test, then 3 workspace), each a
one-file PR, all blocked on the Hands branch merging first (library-first gate).
Those repos are not attached to this session — each needs add_repo with push.
- repos:
- PyAutoHands (branch claude/smoke-copy-drift-ci-docs-ozntvv)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <file>`, 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.
Loading
Loading