Skip to content

CI cost: one change classifier so each PR runs only the jobs and tests it can affect (docs, ground-truth, det/db2, suite, re-runs) #6278

Closed

Description

@squid-protocol

Owner priority (2026-10-23): top priority, ahead of the DOOM call-graph work. CI capacity is the factory's bottleneck; every runner-minute saved here speeds every other lane.

Measured cost (PR runs 2026-10-23 14:05Z–17:40Z: 600 runs, 29 PR branches)

2,646 runner-min, about 91 runner-min per PR. 208 of the 600 runs had no job that did work (all skipped).

Where it goes Share Note
Det Sweep db2 shards 17% avg 11.2 min/job; ran on docs/ladder-slice-skill (one .claude/skills/*/SKILL.md)
Mainframe Ground Truth 15% ran on nearly every PR, incl. ones touching only tests/tools/test_zos_probes.py + zos_probes.json, port_blockers.json, .claude/settings.json, tests/tools/ladder_refresh.py
Full suite (3 parts) 12% always the whole suite
Det Sweep other jobs 12% det_sweep_plan.py errs to running
CICS crucible + Java compiles + ports compile 16% path filters only
Re-runs per push — e.g. churn/5274-20261023T1352Z: db2 13 jobs, ground-truth 14, full-suite 10 (3 pushes)

Docs specifically, PR #6245 (4 Markdown files under .claude/, no code) ran 8 workflows / 18 jobs: smoke-test (full suite), gitgalaxy, det-sweep, mainframe-ground-truth, muninn, mypy-audit, ruff-audit, small-audits. Only 8 of 38 PR workflows have any docs filter.

And a correctness gap the other way: 257 test files read files under docs/ (136 refs to docs/language_status/, 44 to docs/self_scan/, docs/research/ via study_report.py --check, .claude/ rules via test_agent_guardrail.py), yet smoke-test and gitgalaxy paths-ignore: docs/**. A PR that edits a register entry skips the tests that read it.

Change: one change classifier, consumed by every PR workflow

A changes step (shared module under tests/tools/, the pattern det_sweep_plan.py / ground_truth_plan.py already use) maps the PR's changed paths to areas; each workflow's plan job asks "does any changed area reach me?". Required checks still report (a plan that says "none" passes the check; no workflow-level paths-ignore on required checks).

Areas, derived not hand-kept where possible:

  • prose: Markdown/docs no test reads (README.md, docs/en/, docs/wiki/, ...).
  • test-read docs: every path a test opens (generated by scanning tests/ for docs/..., .claude/..., *.md references; committed list + freshness test).
  • agent-config: .claude/**, CLAUDE.md (only the tests that read them).
  • test-tooling: tests/tools/** (+ its own tests); reaches a heavy job only if that job imports the changed module.
  • engine / translator / runtime areas from the import graph of gitgalaxy/ (cobolrt Java, det, cics, dli, db2, standards, ...), mapped to the jobs that exercise them.

Slices (each ≤ 5 hand-written files, each with tests that pin what may be skipped)

Acceptance

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    scope:infra
    on Oct 23, 2026
  2. changed the title [-]CI: docs-aware path classifier — prose-only PRs skip the heavy suite; docs that tests read still run those tests[/-] [+]CI cost: one change classifier so each PR runs only the jobs and tests it can affect (docs, ground-truth, det/db2, suite, re-runs)[/+] on Oct 23, 2026
  3. added
    priority: high
    on Oct 23, 2026
  4. squid-protocol commented on Oct 23, 2026

    @squid-protocol
    OwnerAuthor

    #6288 merged: a partial slice of [c:a9d05f0b] "1. Classifier module + generated "docs read by tests" list + freshness test; wire ground-truth (ground_truth_plan.py) as first consumer: skip on prose / agent-config / test-tooling-only / data-o"; left: slice 1 only; plan jobs other than ground-truth still use their own lists (promoter-bot)

  5. squid-protocol commented on Oct 23, 2026

    @squid-protocol
    OwnerAuthor

    #6295 merged: a partial slice of [c:2c9c72d8] "3. smoke-test full suite: prose-only → report success without running; test-read docs / agent-config only → run only the tests that read those paths; drop paths-ignore: docs/** from smoke-test"; left: the planner is done; wiring it into smoke-test.yml (plan step, pytest args, full-suite still reporting on skip) and dropping paths-ignore: docs/** is a workflow edit, not authorized in this brief. (promoter-bot)

  6. 92 remaining items

  7. squid-protocol commented on Oct 30, 2026

    @squid-protocol
    OwnerAuthor

    #7051 merged: a partial slice of [c:cc68bcd4] "5. Affected-test selection in the full suite: run only tests reachable from changed modules (import graph, or a nightly per-test coverage map); full run stays nightly + post-merge as the net."; left: <case>/case.json data, non-Python tests/tools files, golden-master snapshots, other .github/ files and the unmapped runtime Java files still plan full. (promoter-bot)

  8. squid-protocol commented on Oct 30, 2026

    @squid-protocol
    OwnerAuthor

    #7057 merged: a partial slice of [c:cc68bcd4] "5. Affected-test selection in the full suite: run only tests reachable from changed modules (import graph, or a nightly per-test coverage map); full run stays nightly + post-merge as the net."; left: engine PRs that also change an equivalence case.json, golden-master snapshots or unmapped det runtime files still plan full; re-measure of runner-min per PR is open. (promoter-bot)

  9. squid-protocol commented on Oct 30, 2026

    @squid-protocol
    OwnerAuthor

    #7060 merged: a partial slice of [c:cc68bcd4] "5. Affected-test selection in the full suite: run only tests reachable from changed modules (import graph, or a nightly per-test coverage map); full run stays nightly + post-merge as the net."; left: golden-master snapshots, doom_speedrun/callgraph_baseline.json, case fixtures and the other det runtime files still plan full; the runner-min per PR re-measure is open. (promoter-bot)

  10. squid-protocol commented on Oct 30, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host nyx, lease renewed 2026-10-30T02:41Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:nyx label.

  11. added a commit that references this issue on Oct 30, 2026
  12. squid-protocol commented on Oct 30, 2026

    @squid-protocol
    OwnerAuthor

    All six slices and all three acceptance boxes are done (last: #7067, the replay test over #6245's file list, README-only, register and test_zos_probes-only path sets). Sibling gaps from #7067 (README.md-only over-selecting tests/core_engine; deploy-docs/referee-panel unexamined) are finer tuning, not acceptance.

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-cdclaim:nyxenhancementgithub-actionspriority: highscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions