Skip to content

det sweep: shared files prove only the cases they can move (Fixes #5885) - #5886

Merged
squid-protocol merged 1 commit into
mainfrom
ci/det-plan-narrow
Oct 21, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
ci/det-plan-narrow

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #5885.

Problem: 26 of 30 sampled PR full sweeps came from the planner's catch-all rule ("X is not inside one existing case directory"), not from a translator or core-harness change. A full sweep adds roughly 280 runner-min to a PR, and Det Sweep is about 40% of runner time.

What changes (tests/tools/det_sweep_plan.py):

  • Mutation files ignored: det_mutation/ and det_mutation_survivors/ are no longer det inputs. No det proof tool reads them; only det_mutation.py and evidence_report.py do.
  • Keyed files (KEYED): det_sweep_baseline.json and infeasible_outcomes.json re-prove only the cases whose entries differ between the merge base and HEAD. A changed infeasible-outcome family text re-proves the cases that cite that family.
    • Any other top-level change, an entry for an unknown case, or an unreadable side is still a full sweep.
    • infeasible_outcomes.check already validates the whole file's form on every det run.
  • Corpus pin: a corpora.json change re-proves the cases on corpora whose pin changed.
  • Harness and oracle components: a harness or oracle file re-proves the cases that use its component, using the same component map the evidence records are fingerprinted with (evidence.COMPONENTS, evidence: finer-grained fingerprints — a case goes stale only when the harness/runtime parts it uses change #4731). Examples: db2/** and equivalence_db2.py → Db2 cases; ims/ggdli.c and equivalence_ims.py → IMS cases; cics/** → online cases.
    • A file in <input>:core (e.g. equivalence.py), or a component every case uses (the LE models), is still a full sweep.
    • In effect this re-proves only what changed, computed from the diff over per-case component fingerprints the repo already maintains, with no new cache to trust.
  • Generator list: cics_task_filecontrol.py joins GENERATOR. Split the CICS file-control family out of the forge and the stub (Part of #5274) #5448 split it out of the transaction forge like cics_task_containers.py but left it off the list, so it never got the port diff. A new test fails if another cics_task_* split is missed.

Safety net: unchanged. The nightly Det Sweep on main is still a full sweep, and Evidence Refresh still runs the Db2 cases, so a missed narrowing is caught within a day. This is the same model the port-diff narrowing (#4814) relies on.

Replay on the 30 real full-sweep diffs (merge base...head, via the API):

new plan runs
narrow, 1–2 cases (mostly infeasible_outcomes.json) 8
Db2 cases only (6 non-Db2 shards skipped) 1
nothing to prove (det_mutation) 1
narrow but 146 cases (CICS harness; about full cost) 2
port diff 9
still full (equivalence.py, equivalence_inputs.py, det_port.py, guardrail, workflow) 9

Checks:

  • test_det_sweep_fast.py: 73 passed, with new tests for each rule and its full fallback; test_shepherd_gh.py also passes.
  • ruff_audit --ci: no new findings. mypy_audit --ci: no new errors.
  • This PR changes the planner itself, so its own Det Sweep is a full sweep.

🤖 Generated with Claude Code

26 of 30 sampled PR full sweeps came from the planner's catch-all
('X is not inside one existing case directory'). Now:
- det_mutation/ and det_mutation_survivors/ are no det input (no det
  proof tool reads them);
- det_sweep_baseline.json and infeasible_outcomes.json prove the cases
  whose entries changed between the merge base and HEAD (a changed
  family text: the cases citing it); any other change is still full;
- corpora.json proves the cases on corpora whose pin changed;
- a harness / oracle file proves the cases using its component, by the
  map the evidence records are fingerprinted with (evidence.COMPONENTS,
  #4731); <input>:core or a component every case uses stays full;
- cics_task_filecontrol.py joins GENERATOR (#5448 split it out of the
  transaction forge like cics_task_containers.py) with a test that
  every cics_task_* module the forge imports is listed.
The nightly full sweep stays the backstop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 21, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 17:28
@squid-protocol
squid-protocol merged commit 0d85251 into main Oct 21, 2026
34 checks passed
@squid-protocol
squid-protocol deleted the ci/det-plan-narrow branch October 21, 2026 17:31
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Det Sweep planner: prove only the cases a change can move (catch-all full sweeps → narrow)

1 participant