# G-121 make.tcl bakelist + selective bake: list configured kits, bake by name Status: achieved 2026-07-26 Scope: src/make.tcl (bake @values + new bakelist subcommand; SUBOPTS/SUMMARIES/HELPTEXTS/SUBGROUPS, help/workflow text); src/runtime/mapvfs.config (as read; todo-comment retirement); src/tests/shell/testsuites/punkexe/ (bakelist characterization if feasible); layout make.tcl copies via established sync channels Goal: make.tcl can report and selectively execute the configured kit matrix: `bakelist` lists the configured kit outputs (name, kit type, runtime with presence, vfs folder, deployed state) with optional per-kit name filtering, and `bake ` bakes and deploys exactly the named kits - bare `bake` unchanged (all configured kits). Both consume the PARSED mapping model, not the file format, so the G-024 toml conversion slides underneath without changing the surface. Acceptance: `make.tcl bakelist` under a plain tclsh and under a punk kit executable lists every kit output configured in the runtime mapping with name, kit type, runtime (present/missing), vfs folder and a deployed-state indication (bin copy absent/current/stale vs the build product), and `bakelist ` filters to the named entries; `make.tcl bake ` builds and deploys only the named kit(s) - a recorded verification shows the named kit's artifacts refreshing while other kits' _build/bin artifacts and punkcheck records are untouched - and an unknown name errors without building, listing the configured names; bare `make.tcl bake` processes the same kit set as before the change; help/workflow text documents both per the update contract and the mapvfs.config todo comment is retired to point here; a piped bakelist characterization test lands under punkexe if feasible (else the infeasibility is recorded here); project version minor-bumped with a CHANGELOG entry. ## Context Recorded as a sibling-ergonomics wish during G-104's drafting (archived 2026-07-25 - see goals/archive/G-104-maketcl-buildsuite-surface.md; also noted in archived G-098's notes and the src/runtime/mapvfs.config todo comment): "build a single configured kit by name + list configured kits". G-104 delivered the buildsuite list/info/build surface without this item - the kit wrap subsystem is a separate surface reading src/runtime/mapvfs.config. Today a bake is all-or-nothing: iterating on one kit (e.g punk91 during the work on G-120, achieved 2026-07-25) rebuilds/deploys every configured kit, and discovering what WOULD be baked means reading mapvfs.config's custom line format by eye. The deploy-state question ("is bin/punk91.exe current with what a bake would produce?") has no surface at all - the stale-r1-runtime incident of 2026-07-25 (see archived G-112's flip evidence, goals/archive/G-112-maketcl-subcommand-rename.md) was exactly an invisible kit-state divergence. ## Approach - `bake ?kitname ...?`: extend the existing verb's punk::args definition from `@values -min 0 -max 0` to optional kit-name values; the kit-build loop filters the parsed mapping to the named outputs. Unknown names error before any build, listing the configured names. `bin` (which builds kits "as for bake") stays full-set - out of scope. - `bakelist ?kitname ...?`: new subcommand in the informational SUBGROUP (verbs act, the informational group reports - the G-112 stage-true principle; a `-list` mode flag on bake was rejected for making a verb sometimes not act). Columns: kit name, type (kit|zip|zipcat), runtime name + presence in the runtime store, vfs folder, deployed state. Name filtering doubles as per-kit detail (punk-runtime `list` precedent) - no separate `bakeinfo` word. - Both features consume one parsed-mapping helper so the reader swaps cleanly at G-024 time; scheme-expanded outputs (G-023) enter the same model as expansions when those land. - Discoverability nicety (decided in the work): the bake/bakelist argdocs may enumerate configured kit names as punk::args choices when the mapping parses at definition time, degrading to plain string args otherwise. - Piped output is ESC-free automatically (the G-113 colour policy, achieved 2026-07-25); keep bakelist's columns stable enough to grep. ## Alternatives considered - `bake -list` flag - rejected: a verb that conditionally does not act recreates the semantics-blur G-112 removed. - Action-grouped `bake list|info|build` (G-104 buildsuite shape) - rejected: bare `bake` must keep meaning build-all, and a first positional that is either an action or a kitname is grammar mud. - Bare `kits` noun subcommand - rejected: the G-112 name-selection record already rejected 'kits' as colliding with kit runtimes; `bakelist` is self-locating next to `bake`. ## Progress - 2026-07-26 ALL ACCEPTANCE ITEMS VERIFIED - achieved flip. Shipped in punkshell 0.24.0 (src/make.tcl; git commit "G-121: make.tcl bakelist + selective bake"). Both surfaces (and the argdoc kit-name choices) consume the shared parsed mapping model ::punkboot::lib::mapvfs_parse / mapvfs_kit_outputs / mapvfs_match_outputs - the bake kit machinery's inline parse was replaced by the same helper, so the G-024 toml conversion swaps the reader underneath. - Verification evidence (native Tcl 9.0.3 tclsh90 driving the working tree on windows win32-x86_64; punk902z kit exe via the punkexe suite): - bakelist under plain tclsh AND under punk902z: all 10 configured entries listed with name, type (kit|zip|zipcat), runtime + presence, vfs folder, deployed state; runtime=missing rows for tclsh90magic and the linux tclkit; piped output ESC-free (G-113). `bakelist punk91` filters to the named row and adds the per-kit detail block (resolved paths/sizes/mtimes). Deployed-state content-compare path proven live: equal bytes with differing mtimes classified current. - selective refresh: after deleting src/_build/punk91.exe, `bake -confirm 0 punk91` rebuilt and deployed punk91 only. Recorded stat diff over ALL of src/_build and bin: only punk91.exe, punk91.exe.vfs, raw_tclsfe-x64.exe and bin/punk91.exe changed. punkcheck diffs (src/_build, bin, src/vfs .punkcheck) mention only punk91's records; negative grep for every other kit/vfs name (punk905, punk9_beta, punk9bi, punkbi, punksys, punk86, punkmagic, punk902z, punkshell902, their vfs folders) clean. vfslibs phase narrowed with printed skip notes for unselected vfs folders. - unknown name: `bake nosuchkit` and `bakelist nosuchkit` exit 1 before any build, listing the configured names; a flag-looking unknown adds the flags-before-names hint (punk::args consumes options before values, so `bake -confirm 0 punk91` is the canonical order). - bare `bake -confirm 0`: same kit set as pre-change (punkbi, punksys, punk86, punk91, punk905, punk9_beta, punk902z, punk9bi_beta processed; the 2 historical missing-runtime warnings; no selective narrowing). - characterization test landed: src/tests/shell/testsuites/punkexe/ maketclbakelist.test - 4 PASS under punk902z (full-report row/vocabulary + ESC-free, filtered detail, unknown-name errors on both surfaces with the no-build guarantee); maketclcolour.test still 3 PASS. - help/workflow text updated per the update contract (workflow verified normal + PUNKBOOT_PLAIN=1, width <= 100); mapvfs.config todo retired to point here; project version minor-bumped 0.23.3 -> 0.24.0 with CHANGELOG entry; layout make.tcl copies synced via make.tcl packages; degraded-mode (PUNKBOOT_PLAIN) dispatch carries trailing kit names for bake/bakelist. - Design outcomes worth keeping: - Discoverability nicety implemented: configured kit names render as punk::args choices on bake/bakelist (-choicerestricted 0 - informational only; handler validation stays authoritative and works when the mapping cannot be parsed at define time). - The enumeration helper replicates the kit loop's naming including the duplicate-appname `_` disambiguation; parity assumes the config keeps appnames unique (broken-config edge documented in the helper comment). - Dash-runtime ('-') entries list (runtime "-", no runtime file) but the kit loop's historical existence-filter still never builds them - pre-existing dead path, deliberately unchanged here. - Selective bake fail-fasts on a selected kit whose runtime/vfs is missing; bare bake keeps the historical warn-and-continue for the full set. - runtime_materialization_warning's toml-revision core moved to ::punkboot::lib::runtime_materialization_check, shared with bakelist's rtrev=r notes tag (the reporting complement noted below). ## Notes - 2026-07-25 (landed separately, same day as drafting): make.tcl bake now emits a BUILD-WARNING when a wrapped working runtime is materialized from an older revision than a local -r artifact beside it (the runtime_materialization_warning proc; punkshell 0.23.1). bakelist's deployed-state column is the reporting complement of that acting-path guard - reuse the same toml-revision reader when implementing. - Overlap survey 2026-07-25 (goals_xref paths over src/make.tcl, src/runtime/mapvfs.config, src/vfs/, punkexe suites + report review): src/make.tcl is a ubiquitous anchor (20+ goals, low scores, not substantive). Substantive relations: G-024 (owns the mapping FORMAT - this surface reads the parsed model and must survive the toml swap; its entry-level validation errors are what bakelist surfaces as per-entry state), G-023 (scheme-expanded output names join the listed/bakeable set when its generative naming lands), G-115 (sibling declaration surface for .vfs payload composition - per-kit payload detail could later join bakelist's per-kit view), G-057 (per-kit icon override would appear as per-kit detail; its acceptance already runs through the wrap steps this goal parameterizes), G-028 (deploy-failure/locked-exe naming is the acting sibling of bakelist's deployed-state reporting), G-101 (consumes mapvfs 'kit'-type entries for 8.6 containers - the lister must not assume zip-only types). Archived precedent: G-104 (list/info surface shape + the wish's recorder), G-098 (wish also noted there).