Twinned from https://github.com/cfsh/ninefold/issues/880 by tools/beads/import_github.py's reconcile pass.
Implement T2 from design_docs/005b-affected-probe-selection.md (§3). Depends on T1 (#875, merged as PR #876 — tools/nflib/probe_select.py + tools/pr/affected_probes.py are on main).
Goal: merge_pr.py's post-merge UI gate defaults to running the affected probe set (from T1). Empty set → skip, stating why. #847's blanket-off default is removed.
Context. merge_pr.py (around :1493) currently skips the gate unless RUN_PROBE_GATE=1. probe_gate.py runs the full sweep and delta-compares against a per-box baseline; sweep_input_changed() is its current skip-predicate.
Build:
- Default: compute the affected set for the merged diff; run exactly those probes; print the set and the rule that produced it before running.
- Empty set → skip with a one-line reason (replaces both the #847 off-default and the old sweep_input_changed skip).
- RUN_PROBE_GATE=1 now means "force the full sweep"; SKIP_PROBE_GATE=1 unchanged (loud opt-out).
- ⚠️ Baseline semantics: a subset run compares only the probes it ran against the baseline. A probe not in the set is "not measured" — never "fixed" and never "missing from the suite". Only a full sweep may write the baseline. Say so in the delta report.
- Keep #728's backgrounded-gate shape; --check-gate reports the selected set the same way it reports the sweep today.
Tests: extend tools/tests/test_merge_pr.py — the #847 GateOffByDefaultTest becomes "gate runs the affected set": a docstring-only tools/nflib merge launches zero probes; a games/explore/ merge selects exactly the explore probes; RUN_PROBE_GATE=1 selects all; subset runs never write the baseline.
PR shape — a stack of two:
1. T2a — capability: probe_gate.py learns to run a named subset and delta-compare only what ran; only full sweeps write the baseline. No default changes; the gate still defaults to off.
2. T2b — policy: merge_pr.py computes the affected set and the default flips from off to selective, reverting #847. A small diff, so the one contentious call — turning the gate back on — is its own review and its own revert.
Done when: the tests above pass, and one real merge through the new gate is shown in T2b's PR body (E5) with its selected set.
None.
No comments.