Skip to content

fix: run custom smoke runners on code-only PRs #298

Closed

Description

@Jammy2211

Overview

Custom pytest runners inherit a smoke-only relevance filter and can skip all tests on Python-only PRs. This task makes the shared workflow respect its existing runner input.

Plan

  • Bypass the smoke-only filter for non-default runners; preserve the docs-only skip and fail-closed handling.
  • Exercise the real classifier shell against Python, config, documentation and failed-diff cases.
  • Audit callers and document that skipped required jobs are not passing test evidence.
  • Validate Heart and independently review the change.
    Tier: glance — merge mode: auto-merge on green only if the declared live caller Witness passes; otherwise stop at PR-open for human review.
Detailed implementation plan

Affected Repositories

  • PyAutoHeart (primary)
  • euclid_strong_lens_modeling_pipeline (consumer audit; no input migration needed)

Branch Survey

PyAutoHeart main clean; no existing active Mind claim or open PR found.
Suggested branch: feature/custom-runner-relevance.

Implementation Steps

  1. Pass inputs.runner into the Classify the diff step of .github/workflows/smoke-tests.yml. Apply no_smoke_relevant_changes only to .github/scripts/run_smoke.py.
  2. Extend tests/test_smoke_tests_wiring.py's shell-executing helper with runner selection and regressions.
  3. Add caller audit and skip-evidence semantics to docs/internals.md.
  4. Run full Heart suite and independent review. Live pipeline PR witness requires the shared workflow to be adopted; do not claim synthetic classifier tests satisfy that witness.

Authorization

Human requested four linked tasks automatically, approved this fixed batch with “Go” on 2026-10-16. Sequential execution. No release authorization. Heart latest published Health run 38880730943 reports red→stale; local read-only fallback is STALE (missing local evidence). No RED override.

Original Prompt

Starting prompt

The reusable smoke workflow's relevance gate skips the unit / slow pytest jobs on every pipeline PR that does not touch scripts/ — three PRs merged with zero tests run

Type: bug
Target: pyautoheart
Repos:

  • PyAutoHeart
  • euclid_strong_lens_modeling_pipeline
    Themes:
  • ci
    Difficulty: small
    Autonomy: supervised
    Priority: high
    Status: formalised
    Consequence: glance
    Witness: A euclid_strong_lens_modeling_pipeline PR touching only util.py or tests/ shows unit / smoke and slow / smoke run (not skipped) on both Python legs; every other caller passing runner: is audited and listed in the PR; the CI-map doc says a skipped required job on a PR is not green.
    Review-minutes: 3
    Unattended: ready
    Filed: 2026-09-16
    Updated: 2026-09-16

Finding

Found 2026-09-16 while running /prm on euclid_strong_lens_modeling_pipeline PR #79.

PyAutoHeart/.github/workflows/smoke-tests.yml has a changes job whose
no_smoke_relevant_changes gate (pull_request only) sets true unless a changed path
matches scripts/*|config/*|smoke_tests.txt|smoke_notebooks.txt|.github/*; the smoke
job is skipped when it is true.

That path list is right for the smoke runner, but the pipeline's
.github/workflows/tests.yml reuses the same workflow with
runner: .github/scripts/run_tests.py for its unit (pytest -m "not slow") and
slow (pytest -m slow) jobs — and the gate is inherited unchanged. A PR that changes
util.py, tests/, catalogue/ or any root .py therefore runs NO pytest on the PR:
the unit / smoke and slow / smoke legs show skipped, mergeStateStatus is CLEAN,
and the PR looks green.

Evidence

Fix ask

  • When the caller passes a non-default runner (or a new boolean input such as
    skip-relevance-gate: true, or an input relevant-paths: glob list), the changes
    job must not apply the smoke path filter. Pytest relevance is at least **/*.py,
    tests/**, pytest.ini, pyproject.toml, config/**, .github/**; simplest is to
    run the matrix unconditionally whenever runner is set (keep the docs-only skip).
  • Update euclid_strong_lens_modeling_pipeline/.github/workflows/tests.yml to pass the
    input.
  • Audit every other caller of the reusable workflow that passes runner: (e.g.
    autolens_workspace_test retime.yml) for the same inheritance.
  • Add the check to the PyAutoHeart CI-map doc / the ci_status reading so skipped on
    a required workflow on a PR is surfaced rather than reading as green.

Related

  • The unit/slow split rationale in the pipeline's tests.yml header.
  • Heart's own comment in the gate explains why pushes to main always run the full
    matrix (readiness reads main's conclusion).

Folded 2026-09-17

draft/bug/pyautoheart/smoke_gate_skips_pytest_runners_on_pr.md (filed 2026-09-10
from pipeline PR #65) was the same defect with less evidence and was removed at
the witness-campaign close-out (PyAutoMind#398). Its witness — a
euclid_strong_lens_modeling_pipeline PR touching only tests/ shows
unit / smoke (3.12) and unit / smoke (3.13) run and pass rather than skipped —
is this prompt's witness in other words.

Reconciliation — 2026-10-01

Keep open — source confirms the defect. Heart origin/main ff7003f, .github/workflows/smoke-tests.yml:184-192, still applies the smoke-only path list to every PR without consulting the custom runner; the smoke job gates on that output at lines 221-223. Merged PR #220 introduced the relevance filter, not the custom-runner repair. complete/2026/09/smoke-relevance-gate.md describes that earlier change, and witness-campaign.md explicitly describes folding the duplicate report into this surviving prompt.

Activity

  1. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    ContributorAuthor

    Implementation checkpoint: draft PR #299, commit e2f7589. Full Heart suite 1252 passed; independent code review CLEAN; PR Heart Tests CI passed (run 38960631750). Live pipeline unit/slow witness remains unresolved, so no autonomous merge or completion. Mind active.md preserves the claim; approved grouped-layout task #300 waits behind it. Resume by obtaining caller witness/review, then lifecycle close-out.

  2. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    ContributorAuthor

    Live witness launched in pipeline draft PR PyAutoLabs/euclid_strong_lens_modeling_pipeline#111. Base codex/heart-298-validation-base already pins both existing Tests jobs to Heart candidate e2f7589; head codex/heart-298-witness differs only by tests/test_ci_relevance_witness.py. This isolates the relevant tests-only PR diff from the workflow pin. Inspect unit/slow jobs on both Python versions and pytest logs. Neither validation branch is to merge; retain PR as evidence and close without merging once collected.

  3. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    ContributorAuthor

    Live run started: https://github.com/PyAutoLabs/euclid_strong_lens_modeling_pipeline/actions/runs/38962160696 (validation PR #111, head 697a78d94aa1bc4a6528d8e8d124406c5d6f6199). Both changes jobs passed. All FOUR target jobs are running rather than skipped: unit/smoke 3.12 + 3.13 and slow/smoke 3.12 + 3.13, currently installing dependencies. This establishes that the relevance gate admits the tests-only diff; successful pytest execution is still pending. Resume by inspecting all four job conclusions/logs. No merge yet.

  4. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    ContributorAuthor

    Shipped in #299, merged a166454. Exact-head checks and live witness passed: 38960631750; pipeline witness 38962160696. Independent code review CLEAN. Mind lifecycle close-out follows. No release performed or claimed.

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