Browse Source

G-121: make.tcl bakelist + selective bake (punkshell 0.24.0)

One parsed-mapping model (::punkboot::lib::mapvfs_parse / mapvfs_kit_outputs /
mapvfs_match_outputs) now backs the kit surfaces - the bake machinery, the new
bakelist report and the bake/bakelist argdoc kit-name choices all consume the
model, never the file format, so the G-024 toml conversion can swap the reader
underneath.

- bakelist ?kitname ...? (informational SUBGROUP): kit name, type, runtime with
  presence, vfs folder, deployed state of bin/<kit> vs src/_build/<kit>
  (current|stale|absent|nobuild; size/mtime fast path, byte-compare when in
  doubt), anomalies as trailing key=value notes (runtime=missing, vfs=missing,
  rtrev=r<cur><r<max> via the shared runtime_materialization_check core).
  Name filtering doubles as per-kit detail (resolved paths/sizes/mtimes).
- bake ?kitname ...?: selective kit assembly - unknown names error before any
  build listing the configured names (flag-order hint included); selected-but-
  unbuildable kits (missing runtime/vfs) fail fast; runtime BUILDCOPY/caps
  probe/vfs cksums/vfslibs phase all narrow to the selected kits so other kits'
  _build/bin artifacts and punkcheck records stay untouched. Bare bake
  unchanged (verified full-set run). Deprecated alias vfs mirrors the values.
- argdocs: SUBVALUES/VALUES_SYNOPSES mechanism, kitname choices enumerated from
  the mapping at define time (-choicerestricted 0, degrade-safe), block-form
  help values; SUMMARIES/HELPTEXTS/SUBOPTS/SUBGROUPS/known_commands/plain
  gethelp/workflow text updated per the update contract; degraded-mode
  (PUNKBOOT_PLAIN) dispatch collects trailing kit names.
- mapvfs.config todo comment retired to point at G-121.
- piped characterization: src/tests/shell/testsuites/punkexe/maketclbakelist.test
  (full-report row/vocabulary + ESC-free, filtered detail, unknown-name errors
  on both surfaces with the no-build guarantee) - 4 PASS; maketclcolour.test
  still 3 PASS.
- selective-refresh verification (recorded in the goal file): forced punk91
  rebuild + deploy via 'bake -confirm 0 punk91'; stat diffs over src/_build and
  bin show only punk91.exe, punk91.exe.vfs, raw_tclsfe-x64.exe and bin/punk91.exe
  changed; .punkcheck diffs mention only punk91's records (negative grep for
  all other kit/vfs names clean).
- docs: src/AGENTS.md work-guidance bullet; ARCHITECTURE.md build-entry
  subcommand list refreshed (bake/bakehouse naming + bakelist, stale in-flux
  G-112 mention dropped); CHANGELOG 0.24.0 + punkproject.toml minor bump.

Claude-Session: https://claude.ai/code/session_01Jz7wkUsknJzyuJ3tgMaL2t
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 5 days ago
parent
commit
0abd07ecd7
  1. 4
      ARCHITECTURE.md
  2. 15
      CHANGELOG.md
  3. 2
      punkproject.toml
  4. 1
      src/AGENTS.md
  5. 823
      src/make.tcl
  6. 6
      src/runtime/mapvfs.config
  7. 150
      src/tests/shell/testsuites/punkexe/maketclbakelist.test

4
ARCHITECTURE.md

@ -80,7 +80,7 @@ Two layers with a deliberate dependency direction (the class never depends on th
## Build, provenance and kits ## Build, provenance and kits
- **`src/make.tcl` is the single build entry.** Key subcommands: `modules`/`libs`/`packages` (repo-root build outputs), `vfscommonupdate` (regenerate `_vfscommon.vfs`), `vfs`, `bin`, `project` (full kit build into `bin/`), `bootsupport` (snapshot refresh), `vendorupdate`, `check`, `workflow`, `projectversion`. Dispatch and help dogfood `punk::args` (G-030, achieved) and degrade to plain scan/help when bootsupport `punk::args` is stale (`PUNKBOOT_PLAIN=1` forces the degraded mode). Source: `src/AGENTS.md`. - **`src/make.tcl` is the single build entry.** Key subcommands: `modules`/`libs`/`packages` (repo-root build outputs), `vfscommonupdate` (regenerate `_vfscommon.vfs`), `bake` (kit assembly into `bin/`; optional kit names confine the run to those kits - G-121), `bakelist` (report the configured kit matrix with runtime/vfs presence and deployed state), `bin`, `bakehouse` (packages + bake for a clean checkout; `project`/`vfs` remain as deprecated aliases - G-112 rename, achieved), `bootsupport` (snapshot refresh), `vendorupdate`, `check`, `workflow`, `projectversion`. Dispatch and help dogfood `punk::args` (G-030, achieved) and degrade to plain scan/help when bootsupport `punk::args` is stale (`PUNKBOOT_PLAIN=1` forces the degraded mode). Source: `src/AGENTS.md`.
- **punkcheck** records every install/delete as events in per-folder `.punkcheck` directories - the basis for skip/copy change detection, superseded-module pruning and provenance. Single OO record lifecycle (G-094, achieved) with atomic saves and advisory event-scoped locking for concurrent writers (G-095, achieved). - **punkcheck** records every install/delete as events in per-folder `.punkcheck` directories - the basis for skip/copy change detection, superseded-module pruning and provenance. Single OO record lifecycle (G-094, achieved) with atomic saves and advisory event-scoped locking for concurrent writers (G-095, achieved).
- **Provenance gates.** Build/promotion commands warn on uncommitted `src/` changes (column-0 `PROVENANCE-WARNING:` token, `-dirty-abort` for strict mode); `vendorupdate` warns for dirty source-project checkouts. - **Provenance gates.** Build/promotion commands warn on uncommitted `src/` changes (column-0 `PROVENANCE-WARNING:` token, `-dirty-abort` for strict mode); `vendorupdate` warns for dirty source-project checkouts.
- **Buildsuites and the kit family.** `src/buildsuites/suite_tcl90/` builds Tcl/Tk/tcllib from source with a pinned zig toolchain and produces the runtime kit family (plain / punk / bi) plus artifact metadata (G-096-G-117 era: see archived goals G-096, G-098, G-102, G-103, G-107); artifacts publish to the punkbin repo that `bin/punk-runtime.cmd` fetches from. The 8.6 family and kit container strategy are in-flux - see "In-flux areas". - **Buildsuites and the kit family.** `src/buildsuites/suite_tcl90/` builds Tcl/Tk/tcllib from source with a pinned zig toolchain and produces the runtime kit family (plain / punk / bi) plus artifact metadata (G-096-G-117 era: see archived goals G-096, G-098, G-102, G-103, G-107); artifacts publish to the punkbin repo that `bin/punk-runtime.cmd` fetches from. The 8.6 family and kit container strategy are in-flux - see "In-flux areas".
@ -102,7 +102,7 @@ Mechanics here are documented as pointers only - detailed prose would be obsolet
- Input mode and completion: G-013 (raw-mode default), G-044 (punk::args-driven completion). - Input mode and completion: G-013 (raw-mode default), G-044 (punk::args-driven completion).
- Stored configuration and help: G-014 (punk::config toml), G-042 (subshell help topics), G-043 (subshell definition plugins). - Stored configuration and help: G-014 (punk::config toml), G-042 (subshell help topics), G-043 (subshell definition plugins).
- Console err channel: G-011. - Console err channel: G-011.
- Launch surface: G-023 (version-named binaries), G-033 (`proj:` package mode), G-077 (`-e` one-liners), G-089 (scriptlib in kits), G-112 (make.tcl subcommand rename). - Launch surface: G-023 (version-named binaries), G-033 (`proj:` package mode), G-077 (`-e` one-liners), G-089 (scriptlib in kits).
- 8.6 buildsuite family: G-099, G-100, G-101. - 8.6 buildsuite family: G-099, G-100, G-101.
## Doc map - which lane holds what ## Doc map - which lane holds what

15
CHANGELOG.md

@ -5,6 +5,21 @@ The latest `## [X.Y.Z]` header must match the `version` field in `punkproject.to
Entries are newest-first; one bullet per notable change. See the root `AGENTS.md` Entries are newest-first; one bullet per notable change. See the root `AGENTS.md`
"Project Versioning" section for the bump policy. "Project Versioning" section for the bump policy.
## [0.24.0] - 2026-07-26
- make.tcl bakelist + selective bake (G-121): new informational `bakelist ?kitname ...?`
subcommand reports the kit outputs configured in src/runtime/mapvfs.config - kit name,
kit type, runtime (with presence in the runtime store), vfs folder, and the deployed
state of bin/<kit> vs the src/_build build product (current|stale|absent|nobuild), with
anomalies (runtime=missing, vfs=missing, rtrev=r<cur><r<max> runtime-materialization
staleness) in a trailing notes column; name filtering doubles as per-kit detail.
`bake ?kitname ...?` now bakes and deploys only the named kits - other kits' _build/bin
artifacts and punkcheck records are untouched, the vfslibs phase narrows to the named
kits' vfs folders, and an unknown name errors before any build, listing the configured
names. Bare `bake` is unchanged (all configured kits). Both surfaces (and the argdoc
kit-name choices) consume one parsed mapping model (::punkboot::lib::mapvfs_*), so the
config-format work (G-024 toml direction) can swap the reader underneath.
## [0.23.3] - 2026-07-25 ## [0.23.3] - 2026-07-25
- make.tcl colour policy: unix-class Tcl 8.6 terminals auto-detected via the tty channel - make.tcl colour policy: unix-class Tcl 8.6 terminals auto-detected via the tty channel

2
punkproject.toml

@ -1,4 +1,4 @@
[project] [project]
name = "punkshell" name = "punkshell"
version = "0.23.3" version = "0.24.0"
license = "BSD-2-Clause" license = "BSD-2-Clause"

1
src/AGENTS.md

@ -72,6 +72,7 @@ Recovery after a wrong path guess:
- make.tcl subcommands and flags are punk::args-declared (G-030): `tclsh src/make.tcl help ?subcommand?` or `<subcommand> -help` shows tabled usage; invalid arguments produce punk::args usage errors. The dispatch degrades to plain scan/help when the bootsupport punk::args (or its rendering stack) is stale or unavailable; `PUNKBOOT_PLAIN=1` forces the degraded mode for troubleshooting. The `::punkboot::argdoc` definitions are constructed (string-built) and use the G-045 authoring mechanisms — block-form help values + `@normalize`, explicit `@form -synopsis` — see src/modules/AGENTS.md "punk::args definition authoring ergonomics" before editing them or authoring similar definitions. - make.tcl subcommands and flags are punk::args-declared (G-030): `tclsh src/make.tcl help ?subcommand?` or `<subcommand> -help` shows tabled usage; invalid arguments produce punk::args usage errors. The dispatch degrades to plain scan/help when the bootsupport punk::args (or its rendering stack) is stale or unavailable; `PUNKBOOT_PLAIN=1` forces the degraded mode for troubleshooting. The `::punkboot::argdoc` definitions are constructed (string-built) and use the G-045 authoring mechanisms — block-form help values + `@normalize`, explicit `@form -synopsis` — see src/modules/AGENTS.md "punk::args definition authoring ergonomics" before editing them or authoring similar definitions.
- Uncommitted `make.tcl`-generated outputs may be batched into one commit, regardless of how many `make.tcl` invocations produced them. This covers punkcheck-managed build outputs that are VCS-tracked: `src/bootsupport/`, `_vfscommon.vfs/modules` + `/lib`, declared per-kit `*.vfs/lib_tcl<N>/<pkg>` subfolders, the thin-layout sync copies (`src/project_layouts/vendor/punk/<layout>/src/{make.tcl,build.tcl}` + bootsupport manifest copies), and the module-shipped layout payload under `src/modules/punk/mix/#modpod-templates-*/templates/project_layouts/` (G-087: synced from `src/project_layouts` - never hand-edit the modpod copy). (Root `modules/`, `lib/`, `modules_tcl<N>/`, `lib_tcl<N>/` are gitignored and never committed.) Each module's old→new version rename is atomic; a regeneration reflects one build-output refresh, not independent hand-edits. This is a carve-out from generic "split aggressively" commit guidance for punkcheck-managed build outputs only — it does not cover user-curated VFS content (`_config/`, per-kit `*.vfs/` outside declared `lib_tcl<N>` subfolders, `_aside/`, `mkzipfix.vfs`, `_vfscommon.vfs/doc`), which commits separately per its own concerns. - Uncommitted `make.tcl`-generated outputs may be batched into one commit, regardless of how many `make.tcl` invocations produced them. This covers punkcheck-managed build outputs that are VCS-tracked: `src/bootsupport/`, `_vfscommon.vfs/modules` + `/lib`, declared per-kit `*.vfs/lib_tcl<N>/<pkg>` subfolders, the thin-layout sync copies (`src/project_layouts/vendor/punk/<layout>/src/{make.tcl,build.tcl}` + bootsupport manifest copies), and the module-shipped layout payload under `src/modules/punk/mix/#modpod-templates-*/templates/project_layouts/` (G-087: synced from `src/project_layouts` - never hand-edit the modpod copy). (Root `modules/`, `lib/`, `modules_tcl<N>/`, `lib_tcl<N>/` are gitignored and never committed.) Each module's old→new version rename is atomic; a regeneration reflects one build-output refresh, not independent hand-edits. This is a carve-out from generic "split aggressively" commit guidance for punkcheck-managed build outputs only — it does not cover user-curated VFS content (`_config/`, per-kit `*.vfs/` outside declared `lib_tcl<N>` subfolders, `_aside/`, `mkzipfix.vfs`, `_vfscommon.vfs/doc`), which commits separately per its own concerns.
- Kit bakes consume the punk-runtime WORKING COPIES under `bin/runtime/<platform>/`: `make.tcl bake`/`bakehouse` emit a `BUILD-WARNING:` (recapped at end of run) when a wrapped runtime's beside-toml revision is older than an `-r<N>` artifact present in the same folder - the forgot-to-switch-back guard for deliberate `punk-runtime use <old-rN>` testing excursions. Heed it before trusting freshly baked family kits; `bin/punk-runtime.cmd use <artifact-r<N>>` (`.exe` suffix optional) re-materializes the working copy. - Kit bakes consume the punk-runtime WORKING COPIES under `bin/runtime/<platform>/`: `make.tcl bake`/`bakehouse` emit a `BUILD-WARNING:` (recapped at end of run) when a wrapped runtime's beside-toml revision is older than an `-r<N>` artifact present in the same folder - the forgot-to-switch-back guard for deliberate `punk-runtime use <old-rN>` testing excursions. Heed it before trusting freshly baked family kits; `bin/punk-runtime.cmd use <artifact-r<N>>` (`.exe` suffix optional) re-materializes the working copy.
- `tclsh src/make.tcl bakelist ?kitname ...?` (G-121) reports the kit outputs configured in `src/runtime/mapvfs.config`: kit name, kit type, runtime (with presence in the runtime store), vfs folder, and the deployed state of `bin/<kit>` vs the `src/_build` build product (`current|stale|absent|nobuild`), with anomalies (`runtime=missing`, `vfs=missing`, `rtrev=r<cur><r<max>` materialization staleness) in a trailing notes column. Name arguments filter the report and add a per-kit detail block. `make.tcl bake ?kitname ...?` bakes and deploys only the named kits - other kits' `_build`/`bin` artifacts and punkcheck records are untouched and the vfslibs phase narrows to the named kits' vfs folders; an unknown name errors before any build, listing the configured names; flags go before kit names (`make.tcl bake -confirm 0 punk91`). Bare `bake` processes all configured kits as before. Both surfaces consume the shared parsed-mapping helpers (`::punkboot::lib::mapvfs_*`) rather than the file format, so the G-024 config-format work swaps the reader underneath. Piped characterization: `src/tests/shell/testsuites/punkexe/maketclbakelist.test`.
- Use `punk make.tcl bakehouse` or `punk902z make.tcl bakehouse` inside Punk shell when building binaries through Punk (the deprecated `project` alias still maps). Driving make.tcl from a built punk executable is supported for informational/update subcommands and for kit builds of *other* kits — the kit whose deployed executable is running the build is skipped with a warning (it cannot be replaced while running, and the pre-deploy process sweep must not kill the build itself; the sweep also excludes the build's own pid in all cases). Rebuild that kit from tclsh or a different kit. - Use `punk make.tcl bakehouse` or `punk902z make.tcl bakehouse` inside Punk shell when building binaries through Punk (the deprecated `project` alias still maps). Driving make.tcl from a built punk executable is supported for informational/update subcommands and for kit builds of *other* kits — the kit whose deployed executable is running the build is skipped with a warning (it cannot be replaced while running, and the pre-deploy process sweep must not kill the build itself; the sweep also excludes the build's own pid in all cases). Rebuild that kit from tclsh or a different kit.
- **Punk-exe-hosted make.tcl runs in a pre-loaded interp, not a virgin one** — the kit's script-mode boot has already loaded much of the punk stack (punk, punk::lib, punk::repl, punk::console, punk::du, flagfilter, struct::set ...) and set process state (app-punkscript forces `::tcl_interactive 0` for script semantics; libunknown/packagepreference are active). Consequences make.tcl must (and now does) handle explicitly: `package require` of an already-provided package is a no-op, so anything make.tcl breaks in the interp (the accelerator-reload block forgets+destroys sha1/md5/struct::* — it re-requires what was loaded), and anything computed at package-load time (punk::repl's `::tcl_interactive` probe — the shell branch recomputes it before `repl::start`), must be restored deliberately rather than relying on later loads to re-fire. Also note the copies that run in this mode are the *kit's* pre-loaded modules, not the bootsupport snapshots make.tcl's paths would otherwise prefer — silent provenance mixing when versions diverge. When adding interp-surgery or load-time-state assumptions to make.tcl, test under both `tclsh src/make.tcl ...` and `<punkexe> src/make.tcl ...`. - **Punk-exe-hosted make.tcl runs in a pre-loaded interp, not a virgin one** — the kit's script-mode boot has already loaded much of the punk stack (punk, punk::lib, punk::repl, punk::console, punk::du, flagfilter, struct::set ...) and set process state (app-punkscript forces `::tcl_interactive 0` for script semantics; libunknown/packagepreference are active). Consequences make.tcl must (and now does) handle explicitly: `package require` of an already-provided package is a no-op, so anything make.tcl breaks in the interp (the accelerator-reload block forgets+destroys sha1/md5/struct::* — it re-requires what was loaded), and anything computed at package-load time (punk::repl's `::tcl_interactive` probe — the shell branch recomputes it before `repl::start`), must be restored deliberately rather than relying on later loads to re-fire. Also note the copies that run in this mode are the *kit's* pre-loaded modules, not the bootsupport snapshots make.tcl's paths would otherwise prefer — silent provenance mixing when versions diverge. When adding interp-surgery or load-time-state assumptions to make.tcl, test under both `tclsh src/make.tcl ...` and `<punkexe> src/make.tcl ...`.
- Binary images are platform-specific; build on each target platform rather than expecting a cross-platform flag. - Binary images are platform-specific; build on each target platform rather than expecting a cross-platform flag.

823
src/make.tcl

File diff suppressed because it is too large Load Diff

6
src/runtime/mapvfs.config

@ -65,9 +65,9 @@ tclsfe-x64.exe {punk9wintk903.vfs punk91 zip}
#_beta convention: wrap freshly suite-built runtimes as *_beta kits even BEFORE they have passed the #_beta convention: wrap freshly suite-built runtimes as *_beta kits even BEFORE they have passed the
# punk test suites - so new-runtime behaviour can be trialled interactively. Drop _beta on acceptance. # punk test suites - so new-runtime behaviour can be trialled interactively. Drop _beta on acceptance.
# (punk905_beta trialled and PROMOTED to punk905 2026-07-21.) # (punk905_beta trialled and PROMOTED to punk905 2026-07-21.)
#todo: 'make.tcl bake' enhancement - build a single configured kit by name + list configured kits #'make.tcl bakelist ?kitname ...?' lists the kit outputs configured here (runtime/vfs presence +
# (sibling-ergonomics wish recorded in G-104, achieved 2026-07-25 WITHOUT this item - # deployed state); 'make.tcl bake ?kitname ...?' bakes/deploys only the named kits (G-121 -
# see goals/archive/G-104-maketcl-buildsuite-surface.md; still open) # see goals/G-121-bakelist-selective-bake.md; wish originally recorded in archived G-104).
#5 #5
tclsh905.exe {punk9wintk905.vfs punk905 zip} tclsh905.exe {punk9wintk905.vfs punk905 zip}

150
src/tests/shell/testsuites/punkexe/maketclbakelist.test

@ -0,0 +1,150 @@
package require tcltest
#Piped characterization of the make.tcl bakelist report and the bake-side selective
#kit-name validation (goal G-121). Runs the WORKING TREE's src/make.tcl under the
#built punk executable's 'script' subcommand with output captured through a pipe,
#and pins:
# - 'bakelist' exits 0, output is ESC-free (G-113 piped policy), the stable header
# row is present and the punk91 row carries the expected type/runtime/vfs columns
# with a deployed state from the documented vocabulary
# - 'bakelist <kitname>' filters to the named entry and appends the per-kit detail
# block; unfiltered rows do not appear
# - 'bakelist <unknown>' exits 1 naming the unknown and listing the configured names
# - 'bake <unknown>' exits 1 BEFORE any build ("nothing built"), listing the
# configured names - the no-build guarantee of selective bake
#The row pins are characterization of the current src/runtime/mapvfs.config kit
#matrix (punk91 = tclsfe-x64 + punk9wintk903.vfs, zip) - a deliberate config change
#legitimately updates them.
#
#Target executable resolved from env(PUNK_SHELL_TEST_EXE), else <projectroot>/bin/punk902z.exe
#then <projectroot>/bin/punkshell902. Skipped (constraint punkexeavailable) if none found.
namespace eval ::testspace {
namespace import ::tcltest::*
variable testdir [file dirname [file normalize [info script]]]
#<projectroot>/src/tests/shell/testsuites/punkexe -> 5 levels up to <projectroot>
variable projectroot [file normalize [file join $testdir .. .. .. .. ..]]
variable maketcl [file join $projectroot src make.tcl]
variable punkexe ""
if {[info exists ::env(PUNK_SHELL_TEST_EXE)] && $::env(PUNK_SHELL_TEST_EXE) ne ""} {
set punkexe [file normalize $::env(PUNK_SHELL_TEST_EXE)]
} else {
foreach candidate [list [file join $projectroot bin punk902z.exe] [file join $projectroot bin punkshell902]] {
if {[file exists $candidate]} {
set punkexe $candidate
break
}
}
}
testConstraint punkexeavailable [expr {$punkexe ne "" && [file exists $punkexe]}]
variable maketcl_run_timeout_ms 60000
variable runstate
array set runstate {}
proc maketcl_run_read {chan} {
variable runstate
append runstate(output) [read $chan]
if {[chan eof $chan]} {
chan event $chan readable {}
set runstate(done) eof
}
}
#Run <punkexe> script src/make.tcl <subcommand...> with output captured through a
#pipe (stdin half-closed for immediate EOF - make.tcl must never wait on stdin for
#these subcommands). Returns dict: timedout 0|1, exitcode <int|"">, output
#<combined stdout+stderr>.
proc maketcl_run {cmdargs} {
variable runstate
variable maketcl_run_timeout_ms
variable punkexe
variable maketcl
array unset runstate
set runstate(output) ""
set runstate(done) ""
set chan [open |[list $punkexe script $maketcl {*}$cmdargs 2>@1] r+]
chan configure $chan -blocking 0 -translation binary
catch {chan close $chan write} ;#no stdin for the child - immediate EOF
set timerid [after $maketcl_run_timeout_ms [list set [namespace current]::runstate(done) timeout]]
chan event $chan readable [list [namespace current]::maketcl_run_read $chan]
while {$runstate(done) eq ""} {
vwait [namespace current]::runstate(done)
}
after cancel $timerid
set timedout [expr {$runstate(done) eq "timeout"}]
set exitcode ""
if {$timedout} {
catch {exec {*}[auto_execok taskkill] /F /T /PID [lindex [pid $chan] 0]}
catch {chan close $chan}
} else {
chan configure $chan -blocking 1
if {[catch {chan close $chan} errdata errdict]} {
set exitcode [lindex [dict get $errdict -errorcode] end]
} else {
set exitcode 0
}
}
return [dict create timedout $timedout exitcode $exitcode output $runstate(output)]
}
proc esc_count {text} {
return [regexp -all {\x1b} $text]
}
#added 2026-07-26 (agent, G-121)
test maketcl_bakelist_full_report {piped make.tcl bakelist: exit 0, ESC-free, header row + punk91 row with documented deployed vocabulary} -constraints {punkexeavailable} -body {
set r [maketcl_run {bakelist}]
set out [dict get $r output]
set result [list]
lappend result timedout [dict get $r timedout] exitcode [dict get $r exitcode]
lappend result esc [esc_count $out]
lappend result header [regexp {(?n)^kit\s+type\s+runtime\s+vfs\s+deployed\s*$} $out]
lappend result punk91row [regexp {(?n)^punk91\s+zip\s+tclsfe-x64\s+punk9wintk903\.vfs\s+(current|stale|absent|nobuild)\y} $out]
set result
} -result {timedout 0 exitcode 0 esc 0 header 1 punk91row 1}
#added 2026-07-26 (agent, G-121)
test maketcl_bakelist_filtered_detail {bakelist punk91 filters to the named entry and appends the per-kit detail block} -constraints {punkexeavailable} -body {
set r [maketcl_run {bakelist punk91}]
set out [dict get $r output]
set result [list]
lappend result timedout [dict get $r timedout] exitcode [dict get $r exitcode]
lappend result punk91row [regexp {(?n)^punk91\s+zip\s+} $out]
lappend result otherrows [regexp {(?n)^(punk905|punkbi|punksys|punk86)\s} $out]
lappend result detailblock [regexp {(?n)^detail: punk91\s*$} $out]
lappend result detailpaths [regexp {(?n)^\s+build product: src/_build/punk91} $out]
set result
} -result {timedout 0 exitcode 0 punk91row 1 otherrows 0 detailblock 1 detailpaths 1}
#added 2026-07-26 (agent, G-121)
test maketcl_bakelist_unknown_name {bakelist with an unknown kit name exits 1 naming it and listing the configured names} -constraints {punkexeavailable} -body {
set r [maketcl_run {bakelist nosuchkitxyz}]
set out [dict get $r output]
set result [list]
lappend result timedout [dict get $r timedout] exitcode [dict get $r exitcode]
lappend result named [regexp {bakelist: unknown kit name\(s\): nosuchkitxyz} $out]
lappend result confignames [regexp {configured kit outputs: .*punk91} $out]
set result
} -result {timedout 0 exitcode 1 named 1 confignames 1}
#added 2026-07-26 (agent, G-121)
test maketcl_bake_unknown_name_no_build {bake with an unknown kit name exits 1 before any build, listing the configured names} -constraints {punkexeavailable} -body {
set r [maketcl_run {bake nosuchkitxyz}]
set out [dict get $r output]
set result [list]
lappend result timedout [dict get $r timedout] exitcode [dict get $r exitcode]
lappend result nothingbuilt [regexp {make\.tcl bake: unknown kit name\(s\): nosuchkitxyz - nothing built} $out]
lappend result confignames [regexp {configured kit outputs: .*punk91} $out]
#the run must never reach the kit machinery (no vfs scan / kit processing output)
lappend result nomachinery [expr {![regexp {processing targetkit:} $out]}]
set result
} -result {timedout 0 exitcode 1 nothingbuilt 1 confignames 1 nomachinery 1}
cleanupTests
}
namespace delete ::testspace
Loading…
Cancel
Save