Skip to content

tests/tools: shared change classifier, ground_truth_plan skips unread docs and unreached tools (Part of #6278) - #6288

Merged
squid-protocol merged 2 commits into
mainfrom
churn/6278-20261023T1847Z
Oct 23, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/6278-20261023T1847Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Slice 1 of #6278: one shared change classifier, and ground_truth_plan.py as its first consumer.

Owner decisions

Owner OK (2026-10-23): TOP PRIORITY, ahead of the DOOM work; workflow edits approved for this issue.

What changed

  • tests/tools/change_classifier.py: area(path) (agent-config, test-read-doc, prose, test-tooling, tests, engine, workflow, other), a generated scan of docs/..., .claude/... and *.md references (AST: string constants, f-string pieces, a / "b" chains, directory aliases), and read_by_ground_truth / runs_in_ground_truth, which ask whether code the Mainframe Ground Truth job runs names a path. Stdlib only.
  • tests/tools/docs_read_by_tests.txt: the generated list (change_classifier.py --write); a freshness test fails when stale. It is .txt because *.json is gitignored.
  • ground_truth_plan.is_input: docs/language_status/* was all input. It is now an input only when job code names the file (register *.md, oracle_assumptions.md, port_blockers.md, cobolrt_rules.json, progress.* stay inputs; zos_probes.json and unread files skip). A tests/tools/*.py module nothing the job reaches (workflow-run tools included) also skips (e.g. ladder_refresh.py). Planners stay inputs. Every other skip is the unchanged NON_INPUTS list.
  • Tests pin each skip and non-skip: the Weekly agent retro 2026-10-23b (Part of #5399) #6245 .claude Markdown, the zos_probes pair, a register *.md beside it, an unreadable list (full), and the scanner and area cases.

Why the classifier narrows only those two: its scan over-approximates, and generic readers (docs/** patterns in post_merge_dispatch, .claude/* in test_generated_docs) reach almost every docs path, so using it everywhere would have lost today's skips. A wrong answer here can only run a job, never skip a needed one.

Class / Sibling gaps

Class: "a required workflow's plan job decides skip from hand-listed path patterns instead of from what its tests actually read".
Siblings: det_sweep_plan.py, ci_shard_plan.py, db2_shard_plan.py, crucible_shard_plan.py, suite_shard_plan.py each keep their own lists (slices 2-6 of the issue). Pre-existing: ci_layout.py lazily imports post_merge_dispatch, which ground_truth_plan lists as a skip (not touched). Root README.md is named by fixtures in tests/core_engine, so a bare name is deliberately never placed on a root or code file.

Remaining slices

Slices 2-6 of #6278: move the other plan jobs onto the classifier.

Savings

Mainframe Ground Truth is ~15% of 2,646 runner-min over 29 PR branches, ~13.7 runner-min per PR on average, and far more on a branch where it runs on every push (14 jobs on one). Each PR touching only unread docs/language_status files, .claude, prose or unreached tools now plans "none" (the required check still reports and passes).

Verification

94 passed (test_change_classifier, test_ground_truth_plan, test_source_reads), audit_check all clear, time_ratchet check 0 over the limit, ruff format clean. pr_gates --fast was queued behind another agent's mutation run for the only heavy slot and was cancelled, so it did not run here.

Checklist: partial [c:a9d05f0b] -- slice 1 only; plan jobs other than ground-truth still use their own lists
Checklist: done [c:ac144b93] -- every new skip is named by a test in test_ground_truth_plan.py

Lessons for agents

  • A planner or classifier file that lists the paths it skips word-names every one of them: exclude such files (PATTERN_HOLDERS) from any "reached by" closure.
  • heavy-run.sh can wait for hours when one slot is held by a mutation run: check pgrep -af heavy-run first.
  • tests/test_source_reads.py rejects errors="replace" in tools too: decode UTF-8, then Latin-1.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 23, 2026 15:17
… language_status docs and unreached tools (Part of #6278)

change_classifier.py maps a path to an area and, from a generated list of docs/.claude/*.md paths that
tests and engine code name (docs_read_by_tests.txt, freshness-tested), says whether code the
Mainframe Ground Truth job runs reads it. ground_truth_plan.is_input asks it for docs/language_status/*
and tests/tools modules; every other skip stays the NON_INPUTS list.

Co-Authored-By: Claude Sonnet 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 23, 2026
@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.

1 participant