Repository navigation
Description
This was generated by AI during triage.
Problem
scripts/affected-tests selects the full Rust suite for any path it doesn't know, including Markdown that no build or test reads. PR #1595 changed only docs/adr/0001-rust-binary-with-embedded-skills.md, yet the selector printed Conservative full-suite selection for 'docs/adr/…' and ran the whole suite. With the machine loaded (load average 18.5), two of the #1396 wall-clock tests failed. So a prose edit cost a full run plus time spent ruling out failures that had nothing to do with it. CI then ran the suite again anyway. On the 4-core hosts a full run takes a median of 19–23 minutes (#1522).
Docs-only changes are common. Of the last 300 commits on main, 14 touched only docs/adr/, docs/research/, docs/grill-with-docs/, docs/agents/, GLOSSARY.md or CODING_STANDARDS.md.
What reads docs/ today
Searching src, tests, scripts, site and console for references:
docs/guide.md: the site generator and site tests (already mapped to the site checks)docs/experiment-results.md:include_str!intests/experiments/result_format.rsdocs/research/second-opinion-replays/replay.py:scripts/test_replay.pytests/packaging.rschecks thatdocs/is left out of the crate, whatever is in itsrc/security/audit.rslooks fordocs/THREAT-MODEL.mdin the target repository, not this one
Every other Markdown file under docs/, plus GLOSSARY.md and CODING_STANDARDS.md, is read by nothing that builds or tests.
Proposal
Add a docs area to the selector: a change that touches only Markdown nobody reads selects no checks and prints why (No checks for docs-only 'docs/adr/…'.). Specifically:
- Docs area:
docs/**/*.md,GLOSSARY.md,CODING_STANDARDS.md - Exceptions (unchanged selection):
docs/guide.md(site checks),docs/experiment-results.md(full Rust suite, or--test experimentsif narrowing is in place), and any non-Markdown file underdocs/(full suite, as now) - Mixed with any other area, the docs paths add nothing and the other areas select as today
This keeps #724's rule that a new area can't silently opt out. To make sure a future test that starts reading some doc isn't skipped without anyone noticing, a selector test checks the repository for code references to docs/**/*.md, GLOSSARY.md and CODING_STANDARDS.md. Each one must appear in the selector's exception list, and the test fails otherwise, naming the file.
Acceptance criteria
- With only
docs/adr/*.mdchanged,scripts/affected-tests mainruns nothing, prints the docs-only reason, and exits 0 -
docs/guide.mdstill selects the site checks,docs/experiment-results.mdstill selects Rust tests, and a non-Markdown file underdocs/still selects the full suite - A docs path together with a
src/path selects exactly what thesrc/path alone selects -
scripts/test_affected_tests.pycovers each case above, plus the reference check: adding a test thatinclude_str!s an unlisted doc makes it fail -
docs/testing.md's selection table has a docs row and lists the exceptions -
python3 -m unittest discover -s scripts -p test_affected_tests.pypasses
Out of scope
- How much of the Rust suite a
src/**change should run (Decide how much of the Rust suite a local run selects on 4-core hosts #1522) - CI's own path filtering: CI keeps running every check on every PR
README.mdandAGENTS.md: the site tests readREADME.md, and changes to agent instructions deserve a closer look
Activity
JacobStephens2 commentedon Nov 9, 2026
Triage: ready for an agent
Checked against
mainon 2026-11-09: the selector still has no docs area, and a path it doesn't know selects the full Rust suite.New evidence from the 2026-11-09 retro: six implement sessions on five issues ran the full suite for changes that were prose only. #1868 changed one research note, edited in two minutes. Its Ticket run took 75 minutes, and its first full-suite run failed after 12 minutes on a cause the change had nothing to do with (#1895).
Agent Brief
Category: enhancement
Summary:
scripts/affected-testsselects no checks for a change that touches only Markdown that nothing builds or tests.Current behavior:
A path outside the selector's named areas selects the full Rust suite, so a change to an ADR, a research note or the glossary runs it. On the hosts a full run that passes takes a median of 38 to 52 minutes, and CI runs the suite again.
Desired behavior:
docs/, plusGLOSSARY.mdandCODING_STANDARDS.md. A change that touches only this area runs nothing, prints the reason and exits 0.docs/that isn't Markdown selects the full suite, as now.Key interfaces:
docs/testing.md: a docs row that lists the exceptions.Acceptance criteria:
scripts/affected-tests mainruns nothing, prints the docs-only reason and exits 0.docs/still selects the full suite.src/path selects exactly what thesrc/path selects alone.docs/testing.mdhas a docs row and lists the exceptions.python3 -m unittest discover -s scripts -p test_affected_tests.pypasses.Out of scope:
src/**change runs (Decide how much of the Rust suite a local run selects on 4-core hosts #1522).README.mdandAGENTS.md: the site tests read the first, and a change to agent instructions deserves the suite.