Skip to content

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

Closed

Description

@squid-protocol

Why

Det Sweep is about 40% of GitGalaxy's runner time, and a full sweep adds roughly 280 runner-min to a PR (sampled 2026-10-21). In 30 sampled PR full sweeps:

  • 26 came from the planner's catch-all rule "X is not inside one existing case directory" (tests/tools/det_sweep_plan.py).
  • 4 came from the port diff.

Many of those files can't change the verdict of most cases, or of any case:

file (count in the sample) what it actually moves
tests/equivalence/infeasible_outcomes.json (6) entries keyed by case
tests/equivalence/det_mutation/*.json (3) nothing: no det proof tool reads them (only det_mutation.py / evidence_report.py)
tests/equivalence/det_sweep_baseline.json (1) entries keyed by case
tests/equivalence/db2/**, ims/ggdli.c, equivalence_db2.py, equivalence_ims.py, equivalence_cics*.py (~6) the cases that use that component
gitgalaxy/tools/cobol_to_java/cics_task_filecontrol.py (1) it's spliced into the transaction forge's output like cics_task_containers.py, but #5448 left it off GENERATOR, so it never got the port diff
tests/cobol_mainframe/corpora.json the cases on the corpora whose pin changed

Asks

  1. Ignore det_mutation/ and det_mutation_survivors/: mode none when nothing else changed.
  2. Keyed files: narrow det_sweep_baseline.json and infeasible_outcomes.json to the case keys whose entries changed between the merge base and HEAD. For a changed family text in infeasible_outcomes.json, include the cases that cite that family. Any other top-level change, an unknown case key, or an unreadable side stays a full sweep.
  3. corpora.json: narrow to the cases on corpora whose entry changed.
  4. Harness and oracle files: use the component map the evidence records are already fingerprinted with (evidence.COMPONENTS, evidence: finer-grained fingerprints — a case goes stale only when the harness/runtime parts it uses change #4731). A file in a component re-proves only the cases that component's rule selects (Db2 only, IMS only, online only, batch only, ...). A file in <input>:core, or a component every case uses, stays a full sweep. This is "re-prove only what changed", computed from the diff over the same per-case component fingerprints, so there's no new cache to trust.
  5. Generator list: add cics_task_filecontrol.py to GENERATOR, plus a test that every cics_task_* module the transaction forge imports is listed.

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

Acceptance

  • Unit tests in tests/cobol_mainframe/test_det_sweep_fast.py cover each rule and its full-sweep fallback.
  • Replaying the planner on recent PR diffs shows the catch-all share dropping.

Related: #5882 (db2 shard scaling), #4814 / #4847 (port diff), #4731 (component fingerprints), #5135.

🤖 Generated with Claude Code

Activity

  1. added
    github-actions
    ci-cd
    scope:infra
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 22, 2026
    0d85251
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

    ci-cdgithub-actionsperformancescope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions