From 1eae726035d1a13dc3d93f9d5873d09b974142f9 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Mon, 3 Aug 2026 15:50:40 +1000 Subject: [PATCH] punk::tcltestrun 0.3.1 + runtestmodules: _mint staging excluded from unbuilt-modpod scan tm_path_additional_ifneeded (punk::tcltestrun) and its inline equivalent in src/modules/test/runtestmodules.tcl called punk::path::subfolders with -exclude {**/_build/** **/_build} - the G-155 _build -> _mint staging rename never reached these call sites, so staged pods in /_mint were being registered as bogus modules (e.g punk::mix::_mint::templates 0.2.0; measured 99 leaked _mint subfolder entries under src/modules across the two staging trees src/modules/_mint + src/modules/punk/mix/_mint). Both call sites now use the full option name and the pruning ***-tail form: -exclude-paths {**/_build/*** **/_mint/***} (_build kept for legacy checkouts). The ***-tail form prunes descent per punk::path 0.5.0, and kit-baked punk::path 0.4.0 already accepts both the literal -exclude-paths name and *** segments (G-093), so kit-child shadowing scenarios stay compatible. Verified: direct probe shows 0 _mint/_build subfolder entries and only legitimate pods registered; runtests.tcl path.test 67/67 with no _mint registrations in the harness startup. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- src/modules/punk/tcltestrun-999999.0a1.0.tm | 4 ++-- src/modules/punk/tcltestrun-buildversion.txt | 3 ++- src/modules/test/runtestmodules.tcl | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/punk/tcltestrun-999999.0a1.0.tm b/src/modules/punk/tcltestrun-999999.0a1.0.tm index 2f941623..f2323180 100644 --- a/src/modules/punk/tcltestrun-999999.0a1.0.tm +++ b/src/modules/punk/tcltestrun-999999.0a1.0.tm @@ -373,8 +373,8 @@ tcl::namespace::eval punk::tcltestrun { #when running against unbuilt modules - we want to ensure that the unbuilt versions of any modules are used rather than any installed versions - so we add package ifneeded definitions for the unbuilt versions of any modules that are present. # add 'package ifneeded' definitions for unbuilt #modpod modules. #first gather subdirectories of modules that contain #modpod-*- in their name - these should be the unbuilt versions of zip based modules. - #'punk::path::subfolders' currently only supports negative matching with -exclude, so we have to filter for the positive match ourselves. - set subfolders [punk::path::subfolders -recursive -exclude {**/_build/** **/_build} $tmpath] + #'punk::path::subfolders' currently only supports negative matching with -exclude-paths, so we have to filter for the positive match ourselves. + set subfolders [punk::path::subfolders -recursive -exclude-paths {**/_build/*** **/_mint/***} $tmpath] set script "" foreach sub $subfolders { #In most cases we could use string match - but the * within modpod-*- could match a forward slash which could then match some other file under a #modpod- folder structure, diff --git a/src/modules/punk/tcltestrun-buildversion.txt b/src/modules/punk/tcltestrun-buildversion.txt index 3a866474..33b18cd5 100644 --- a/src/modules/punk/tcltestrun-buildversion.txt +++ b/src/modules/punk/tcltestrun-buildversion.txt @@ -1,6 +1,7 @@ -0.3.0 +0.3.1 #First line must be a semantic version number #all other lines are ignored. +#0.3.1 - fix: tm_path_additional_ifneeded exclude list missed the G-155 _build->_mint staging rename - staged pods in _mint were registered as bogus _mint::* modules; now -exclude-paths {**/_build/*** **/_mint/***} (full option name, ***-tail pruning form; _build kept for legacy checkouts) #0.3.0 - breaking: tm_path_additional_ifneeded now requires project_root as a 2nd parameter to fix out-of-scope $project_root bug that caused 'no such variable' errors whenever #modpod modules were found #0.3.0 - fix: #modpod version pattern is now extracted dynamically from directory name instead of hardcoded, preventing build-system version replacement from breaking pattern matching in built bootsupport copies #0.3.0 - fix: runtests.tcl second tm_path_additional_ifneeded call now passes modules_tcl$tcl_major instead of modules (copy-paste bug) diff --git a/src/modules/test/runtestmodules.tcl b/src/modules/test/runtestmodules.tcl index 47ee5d7c..ca1eb855 100644 --- a/src/modules/test/runtestmodules.tcl +++ b/src/modules/test/runtestmodules.tcl @@ -41,8 +41,8 @@ if {$test_type eq "unbuilt"} { # add 'package ifneeded' definitions for unbuilt #modpod modules. #first gather subdirectories of modules that contain #modpod-*-999999.0a1.0 in their name - these should be the unbuilt versions of zip based modules. #set subfolders [punk::path::subfolders -recursive [file normalize $project_root/src/modules] -match */#modpod-*-999999.0a1.0] - #'punk::path::subfolders' currently only supports negative matching with -exclude, so we have to filter for the positive match ourselves. - set subfolders [punk::path::subfolders -recursive -exclude {**/_build/** **/_build} [file normalize $project_root/src/modules]] + #'punk::path::subfolders' currently only supports negative matching with -exclude-paths, so we have to filter for the positive match ourselves. + set subfolders [punk::path::subfolders -recursive -exclude-paths {**/_build/*** **/_mint/***} [file normalize $project_root/src/modules]] foreach sub $subfolders { #In most cases we could use string match - but the * within modpod-*-999999.0a1.0 could match a forward slash which could then match some other file under a #modpod- folder structure, #so we use globmatchpath which treats * as matching any characters except path separators.