Browse Source

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
master
Julian Noble 3 days ago
parent
commit
3335f09a56
  1. 2
      GOALS.md
  2. 22
      goals/G-093-runtests-includepaths-discovery.md

2
GOALS.md

@ -342,6 +342,6 @@ Detail: goals/G-089-scriptlib-kits-and-modes.md
Scope: src/modules/shellfilter-999999.0a1.0.tm (stack placement, insert_transform, junctions), src/modules/shellthread-999999.0a1.0.tm (worker park/adoption/termination), src/tests/modules/ (new characterization suites), README.md ('very unripe parts' note)
Detail: goals/G-090-shellfilter-shellthread-audit.md
### G-093 [proposed] runtests -include-paths multi-pattern/repeated-flag discovery: investigate and fix
### G-093 [proposed] runtests path-glob discovery: fix -include-paths multi-pattern/repeated-flag matching + expose -exclude-paths
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
Detail: goals/G-093-runtests-includepaths-discovery.md

22
goals/G-093-runtests-includepaths-discovery.md

@ -1,9 +1,9 @@
# G-093 runtests -include-paths multi-pattern/repeated-flag discovery: investigate and fix
# G-093 runtests path-glob discovery: fix -include-paths multi-pattern/repeated-flag matching + expose -exclude-paths
Status: proposed
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):
## Notes
- treefilenames already implements -exclude-paths (argdoc documents tailbase-relative
matching) but runtests does not expose it. A runtests -exclude-paths option (discussed
2026-07-19 as a middle ground between full and targeted runs) would ride the same
discovery machinery - implement or verify it alongside this fix so both directions'
multi-pattern semantics get pinned by the same regression suite, or filter post-discovery
over the returned relative paths via globmatchpath (shown reliable standalone).
- The -exclude-paths clause was bundled into this goal at user direction 2026-07-19 (it
was initially a Notes-level suggestion). treefilenames already implements -exclude-paths
(its argdoc documents tailbase-relative matching) but runtests does not expose it -
the exposure is expected to be a thin option declaration + passthrough, OR a
post-discovery filter over the returned relative paths via globmatchpath (shown reliable
standalone), whichever the include-side root cause makes the safer home. Middle-ground
motivation examples: excluding shell/** when no built kit is present, runtimebash_wsl
without WSL, or a heavy suite family unrelated to the change - most valuable for
sequential/tcl8.6 contexts where full runs still cost minutes (-jobs 8 full runs are
~1m26s post G-092).

Loading…
Cancel
Save