Skip to content

run_smoke: delegate env resolution to autobuild/env_config (step 2) - #174

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/env-single-resolver
Jul 17, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/env-single-resolver

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Migration step 2 of PyAutoBuild/docs/env_profile_redesign.md (PyAutoBuild#161; campaign #155 Phase 3): one resolver. run_smoke.py no longer carries its own copy of the env-resolution logic — it imports PyAutoBuild's autobuild/env_config.py, the same resolver the release runner uses.

Why it matters: the fork had already drifted. Its load_env_config() took no arguments and hardcoded config/build/env_vars.yaml, which is failure mode 4 made structural — the PR gate was incapable of ever reading the release profile, so a release-profile error could only surface in the next nightly. The build_env cores were still line-identical, i.e. this is a fork caught mid-divergence, which is exactly when it is cheap to kill.

No infrastructure was needed: PyAutoHeart's reusable smoke-tests.yml already clones PyAutoBuild and puts PyAutoBuild/autobuild on PYTHONPATH (lines 54/90). A sibling-checkout fallback keeps the documented local invocation (python .github/scripts/run_smoke.py, AGENTS.md) working with no PYTHONPATH — verified.

Note on the hardcode: ENV_VARS_FILE remains as an explicit argument to the canonical loader — the smoke runner legitimately runs the smoke profile. What died is the resolver's inability to be pointed at any other profile; reading BOTH profiles at PR time is validate_env_profiles' job (step 1, merged in PyAutoBuild#163).

API Changes

None — CI/runner internals. load_env_config() → load_cfg() locally; resolution now delegated.

Test Plan

  • Resolve-diff gate (the doc's §8 requirement), measured: every smoke script in all three repos resolved both ways — old fork (loaded verbatim from git show HEAD:) vs new delegation — against the real workspaces, not a synthetic model. 61/61 scripts → byte-identical environments, 0 mismatches (autofit 11, autogalaxy 34, autolens 16).
  • Local invocation without PYTHONPATH imports via the fallback and parses the profile.
  • No importers of the deleted functions anywhere (only python run_smoke.py invocations).
  • This PR's own CI is the smoke gate — unlike release.yml, this path is exercised pre-merge.

Generated by the PyAutoLabs agent workflow.

The local copy of the resolver had already drifted: its load_env_config()
hardcoded config/build/env_vars.yaml, so the PR gate was structurally unable to
read the release profile (failure mode 4/7 of the seed incident). Delegate to
PyAutoBuild's env_config — the same resolver the release runner uses — so the
two gates cannot disagree about a script's environment. CI already clones
PyAutoBuild and puts autobuild/ on PYTHONPATH; a sibling-checkout fallback
keeps local runs working. Verified: all smoke scripts resolve byte-identical
environments before and after.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 17, 2026
@Jammy2211
Jammy2211 merged commit 895400c into main Jul 17, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/env-single-resolver branch July 17, 2026 08:11
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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.

1 participant