005b T3: run_probes.py — affected set by default, --all for the sweep nf-8ad2 ← Beads

closed priority 2 task unassigned activesession:run-probes-default

Twinned from https://github.com/cfsh/ninefold/issues/886 by tools/beads/import_github.py's reconcile pass.

Implement T3 from design_docs/005b-affected-probe-selection.md (§3). Depends on T1 only (#875, merged as PR #876tools/nflib/probe_select.py + tools/pr/affected_probes.py are on main). Independent of T2 (#880, merged).

Goal: running probes defaults to the set the working tree's diff affects. The full sweep becomes the explicit case (--all), and probe_all.py is renamed run_probes.py — a name that says "all" should not be the tool whose default is a subset (C1).

Context. probe_all.py (repo root) runs the full suite, already accepts explicit probe names as positional args. Probes stay out of presubmit.py#458 settled that. This command is the fast path for devs verifying a game change.

PR shape — a stack of two, at different cognitive levels:

1. T3a — the rename, mechanical, no behaviour change. git mv probe_all.py run_probes.py, then update every reference in the same PR — tools/pr/probe_gate.py (imports it, spawns it, its RESULTS_MARKER prose), tools/pr/merge_pr.py, probe.py, presubmit.py, tools/nflib/ docstrings, the tools/tests/ suite, notes/machines.md, notes/probes.md. No compatibility shim: grep says every caller is in-repo, delete the old name outright (B12). tools/tests/test_doc_pointers.py guards the doc references. ⚠️ T3a does not depend on T1 — it can land first of everything. 2. T3b — the behaviour change, stacked on T1 and T3a: - ./run_probes.py (bare) — diff the working tree against origin/main (override with --base), select via T1's probe_select.py, run that set. Print the set and matched rules first; empty set prints why and exits 0. - ./run_probes.py --all — the full suite (today's bare behaviour). - ./run_probes.py <name>… — explicit names, unchanged. - ./dev.py check appends one line when the diff affects probes: the count, and the bare ./run_probes.py invocation to run them (C5). No new dev.py verb.

Tests: T3a rides the existing suite plus a grep in the PR body showing zero remaining probe_all references. T3b unit-tests the selection plumbing (tools/tests/); the run path reuses the existing sweep machinery.

Done when: the bare invocation runs exactly the affected probes; --all runs the full suite; a tools-only change exits 0 explaining the empty set; no reference to probe_all.py remains.

Dependencies

None.

Comments

No comments.

Add a comment