Skip to content

feat: detect missing sampler dependencies in smoke mode #313

Closed

Description

@Jammy2211

Overview

Approved member of the four-task smoke-reliability batch (human “Go”, 2026-10-16).

Plan

Inspect the current search metadata/registry before selecting one backend dependency mapping; avoid duplicating a now-canonical registry. In the smoke harness, collect constructed search classes through supported autofit import aliases and check backend imports using the smoke interpreter before executing each selected script. Report the script, search and missing package through existing failure reports. Cover installed/missing modules, aliases, unrelated attributes, syntax errors and script exits. Verify HowToFit tutorial_6_gradients.py fails with BlackJAXNUTS/blackjax named when blackjax is absent and passes when present. Detailed files: autohands/build_util.py and run_python.py integration, adjacent unit tests; Heart consumer audit only unless a required shared-runner change is identified. Tier: notify — merge mode: auto-merge on green only when full test, smoke, independent review and Heart gates pass.

Branch survey and routing

Suggested branch: feature/smoke-sampler-imports. NOT STARTED: repository claim conflict with PyAutoHands #312 and PyAutoHeart #298. Register in Mind planned.md; preserve current claims and approvals. No worktree or branch created. Resume through start-dev after claims clear; do not infer merge or release permission.

Original Prompt

Starting prompt

Smoke profile cannot see a missing sampler dependency — add an import check over the af. classes each script constructs

Type: feature
Target: PyAutoHands
Repos:

  • PyAutoHands
  • PyAutoHeart
    Difficulty: small
    Autonomy: safe
    Priority: medium
    Status: formalised
    Consequence: notify
    Witness: with blackjax uninstalled in the smoke environment, the smoke run for HowToFit scripts/chapter_1_introduction/tutorial_6_gradients.py FAILS at PYAUTO_TEST_MODE=2 with a message naming BlackJAXNUTS and blackjax, instead of passing; with blackjax installed it passes as before.
    Review-minutes: 0
    Unattended: ready

Repos:

  • PyAutoHands
  • PyAutoHeart
    Difficulty: small
    Priority: medium

CI runs workspace and HowTo smoke tests at PYAUTO_TEST_MODE=2 (config/build/profile_smoke.yaml), which bypasses the sampler entirely: af.BlackJAXNUTS / af.Nautilus / af.Emcee are never constructed, so a search backend that is not installed (blackjax, nautilus-sampler, emcee, dynesty, zeus, corner for the results update) is never imported and the gate stays green while the script is unrunnable by a reader. Seen three times in 2026-09: the HowTo tutorial 5 corner failure, the HowTo tutorials 6 and 7 blackjax failure (issue 65 on the HowTo fit repo), and the Colab bootstrap gaps the autonerves setup_colab audit (its PRs 166 and 168) closed. config/build/no_run.yaml already documents the same blind spot for tutorial_5_expectation_propagation.

Cheap guard, run at smoke settings in the smoke harness (run_smoke.py / build_util): for each smoke-run script, statically collect the af. constructors it calls (ast walk for Attribute nodes on the af/autofit alias whose name matches a NonLinearSearch subclass) and, in the smoke environment, import the backend module each search needs (a small mapping in one place: BlackJAXNUTS→blackjax, Nautilus→nautilus, Emcee→emcee, DynestyStatic/DynestyDynamic→dynesty, Zeus→zeus, plus corner for any script that calls the corner plotter). A missing module fails the smoke run for that script with a clear message naming the search and the package, before the script itself runs. Optionally the same mapping is asserted against the Colab bootstrap's _SHARED_EXTRAS in its tests, so the two install routes cannot drift apart again.

Activity

  1. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    CollaboratorAuthor

    Implementation shipped to PR #316 at bfb4887. Existing public search manifest supplies dependencies; no duplicate mapping. Independent review CLEAN after correcting current corner_cornerpy API detection; targeted20passed and tenant firewall OK. Actual HowToFit tutorial6 failed0.3s absent blackjax (BlackJAXNUTS and blackjax named), then passed14.8s after installing blackjax1.7.1 in the same isolated environment. Awaiting exact-head CI; local process-reaping failure remains the previously reproduced environment baseline. Heart STALE, no release.

  2. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped in #316, merged 7ac11d7 after human /prm. Exact-head CI 38969557427: every Python job passed. Independent review CLEAN; live witness documented in the PR. Mind lifecycle close-out follows. No release performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions