G-093: bundle -exclude-paths exposure into the discovery goal (user direction)
Title broadened in both tiers; Goal/Acceptance gain the -exclude-paths
clauses: expose treefilenames' existing capability on runtests (or an
equivalent post-discovery globmatchpath filter), accumulate semantics
matching -include-paths, exclusion winning over inclusion, a
subtree-exclusion run discovering exactly default-discovery minus that
subtree, and both options pinned by the same regression-suite
combination matrix. Notes record the bundling and the middle-ground
motivation examples.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
Scope: src/tests/runtests.tcl, src/modules/punk/path-999999.0a1.0.tm (treefilenames/globmatchpath as implicated), src/modules/punk/args-999999.0a1.0.tm (only if -multiple implicated), src/tests/ (runner-targeting regression suite), src/tests/AGENTS.md
Goal: runtests.tcl -include-paths discovery honours its documented contract - a single value carrying multiple space-separated glob patterns includes every pattern's matches, repeated -include-paths flags accumulate, and deep ** patterns match regardless of whether explicit file-tail globs are supplied - with the verified semantics pinned by a regression suite and the root cause recorded.
Acceptance: the two 2026-07-19 failures reproduce as characterization tests before the fix and pass after it - (a) a single -include-paths value listing four deep patterns (the G-092 measurement set) discovers files from all four subtrees under the default *.test tail glob, and (b) two repeated -include-paths flags naming distinct subtrees discover both (observed matching zero files); the root cause is identified and recorded in this file; a regression suite under src/tests covers single-value multi-pattern, repeated-flag, deep-pattern and tail-glob-present/absent combinations; a full-suite default-discovery run before and after the fix compares PARITY ok via scriptlib/developer/runtests_parity.tcl (default '**' discovery must be unaffected); src/tests/AGENTS.md -include-paths wording is reconciled with the verified semantics.
Goal: runtests.tcl -include-paths discovery honours its documented contract - a single value carrying multiple space-separated glob patterns includes every pattern's matches, repeated -include-paths flags accumulate, and deep ** patterns match regardless of whether explicit file-tail globs are supplied - and a new -exclude-paths option (treefilenames' existing capability exposed, or an equivalent post-discovery globmatchpath filter over the relative paths) gives broad development runs a middle ground between full and targeted by excluding glob-matched files, with both directions' semantics pinned by the same regression suite and the include-side root cause recorded.
Acceptance: the two 2026-07-19 failures reproduce as characterization tests before the fix and pass after it - (a) a single -include-paths value listing four deep patterns (the G-092 measurement set) discovers files from all four subtrees under the default *.test tail glob, and (b) two repeated -include-paths flags naming distinct subtrees discover both (observed matching zero files); the root cause is identified and recorded in this file; -exclude-paths is exposed on runtests (argdoc + src/tests/AGENTS.md documented, accumulate semantics matching -include-paths, exclusion winning over inclusion for the same file) and a full run excluding a named subtree discovers exactly the default-discovery file list minus that subtree; a regression suite under src/tests covers both options across single-value multi-pattern, repeated-flag, deep-pattern and tail-glob-present/absent combinations plus include/exclude interaction; a full-suite default-discovery run before and after the changes compares PARITY ok via scriptlib/developer/runtests_parity.tcl (default '**' discovery with no exclusions must be unaffected); src/tests/AGENTS.md path-targeting wording is reconciled with the verified semantics.
## Context
@ -41,9 +41,13 @@ Candidate root causes to check (from the runtests side inward):