From 3cf37a1674e9a9a8ced60d63b0708aaa89155a6c Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Sun, 2 Aug 2026 21:24:09 +1000 Subject: [PATCH] G-031 boot core 0.2.1: graceful missing-app-package subcommand arms (0.47.1) shellspy/punk/script/shell report the missing package by subcommand name and exit 1 instead of a raw package-require trace - found adopting the shared core in the tomlish kits (app-tomlish only; proven there first, master replay identical by diff). Layout _config/_vfscommon copies refreshed. tomlish adoption itself is committed in its own fossil (bbc68a3f) - the G-031 derived-project proof. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- CHANGELOG.md | 11 ++++++++ punkproject.toml | 2 +- .../src/vfs/_config/punkboot_core.tcl | 28 +++++++++++++++---- .../src/vfs/_vfscommon.vfs/punkboot/core.tcl | 28 +++++++++++++++---- src/vfs/_config/punkboot_core.tcl | 28 +++++++++++++++---- 5 files changed, 78 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8878912..4193d909 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ 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` "Project Versioning" section for the bump policy. +## [0.47.1] - 2026-08-02 + +- Boot core 0.2.1: the built-in subcommands that require app packages + (shellspy/punk/script/shell) fail gracefully by name when a kit does not + carry the package - "script: this kit does not carry the app-punkscript + package (...)" + exit 1 - instead of a raw package-require trace. Found + adopting the shared core in the tomlish kits (which carry app-tomlish + only); punkshell's own kits carry all app packages and are unaffected. + tomlish itself now boots the componentized boot: its 547-line forked main + is replaced by a thin declarative main (the G-031 derived-project proof). + ## [0.47.0] - 2026-08-02 - Punk executables self-report build provenance (G-025): new 'buildinfo' diff --git a/punkproject.toml b/punkproject.toml index 30418252..db858773 100644 --- a/punkproject.toml +++ b/punkproject.toml @@ -1,6 +1,6 @@ [project] name = "punkshell" -version = "0.47.0" +version = "0.47.1" license = "BSD-2-Clause" url = "https://www.gitea1.intx.com.au/jn/punkshell" #packager: declared identity for published artifacts (declarative, not proof - diff --git a/src/project_layouts/vendor/punk/project-0.1/src/vfs/_config/punkboot_core.tcl b/src/project_layouts/vendor/punk/project-0.1/src/vfs/_config/punkboot_core.tcl index 98151603..41e20475 100644 --- a/src/project_layouts/vendor/punk/project-0.1/src/vfs/_config/punkboot_core.tcl +++ b/src/project_layouts/vendor/punk/project-0.1/src/vfs/_config/punkboot_core.tcl @@ -42,7 +42,7 @@ namespace eval ::punkboot { #boot-core identity (G-031; stamped into kits + reported by the G-025 #buildinfo surfaces) - variable core_version 0.2.0 + variable core_version 0.2.1 } if {![info exists ::punkboot::launch_args]} { namespace eval ::punkboot [list variable launch_args $::argv] @@ -1663,7 +1663,11 @@ if {![info exists ::punkboot::launch_defaults]} { } shellspy { #pass through to shellspy commandline processor - package require app-shellspy + #graceful when a derived kit does not carry the app package (0.2.1) + if {[catch {package require app-shellspy} errM]} { + puts stderr "shellspy: this kit does not carry the app-shellspy package ($errM)" + exit 1 + } } punk { #The punk executable must also support running commands piped into stdin. @@ -1679,10 +1683,16 @@ if {![info exists ::punkboot::launch_defaults]} { if {[llength $subcommand_arglist]} { #puts stdout "main.tcl launching app-punkshell with args: $subcommand_arglist" - package require app-punkshell + if {[catch {package require app-punkshell} errM]} { + puts stderr "punk: this kit does not carry the app-punkshell package ($errM)" + exit 1 + } } else { #punk interactive shell - package require app-repl + if {[catch {package require app-repl} errM]} { + puts stderr "punk: this kit does not carry the app-repl package ($errM)" + exit 1 + } } } script { @@ -1691,12 +1701,18 @@ if {![info exists ::punkboot::launch_defaults]} { #no shellfilter stacks/transforms, no interactive fallback, honest exit codes. #The launch plumbing must emit nothing on stdout/stderr (exec-style callers). set ::tcl_interactive 0 - package require app-punkscript + if {[catch {package require app-punkscript} errM]} { + puts stderr "script: this kit does not carry the app-punkscript package ($errM)" + exit 1 + } } shell { #app-punkshell supports running a script and maintaining an interactive shell afterwards # or just launching an interactive shell if no script is specified - package require app-punkshell + if {[catch {package require app-punkshell} errM]} { + puts stderr "shell: this kit does not carry the app-punkshell package ($errM)" + exit 1 + } #if {[llength $subcommand_arglist]} { # #run script and maintain interactive shell. # package require app-punkshell diff --git a/src/project_layouts/vendor/punk/project-0.1/src/vfs/_vfscommon.vfs/punkboot/core.tcl b/src/project_layouts/vendor/punk/project-0.1/src/vfs/_vfscommon.vfs/punkboot/core.tcl index 98151603..41e20475 100644 --- a/src/project_layouts/vendor/punk/project-0.1/src/vfs/_vfscommon.vfs/punkboot/core.tcl +++ b/src/project_layouts/vendor/punk/project-0.1/src/vfs/_vfscommon.vfs/punkboot/core.tcl @@ -42,7 +42,7 @@ namespace eval ::punkboot { #boot-core identity (G-031; stamped into kits + reported by the G-025 #buildinfo surfaces) - variable core_version 0.2.0 + variable core_version 0.2.1 } if {![info exists ::punkboot::launch_args]} { namespace eval ::punkboot [list variable launch_args $::argv] @@ -1663,7 +1663,11 @@ if {![info exists ::punkboot::launch_defaults]} { } shellspy { #pass through to shellspy commandline processor - package require app-shellspy + #graceful when a derived kit does not carry the app package (0.2.1) + if {[catch {package require app-shellspy} errM]} { + puts stderr "shellspy: this kit does not carry the app-shellspy package ($errM)" + exit 1 + } } punk { #The punk executable must also support running commands piped into stdin. @@ -1679,10 +1683,16 @@ if {![info exists ::punkboot::launch_defaults]} { if {[llength $subcommand_arglist]} { #puts stdout "main.tcl launching app-punkshell with args: $subcommand_arglist" - package require app-punkshell + if {[catch {package require app-punkshell} errM]} { + puts stderr "punk: this kit does not carry the app-punkshell package ($errM)" + exit 1 + } } else { #punk interactive shell - package require app-repl + if {[catch {package require app-repl} errM]} { + puts stderr "punk: this kit does not carry the app-repl package ($errM)" + exit 1 + } } } script { @@ -1691,12 +1701,18 @@ if {![info exists ::punkboot::launch_defaults]} { #no shellfilter stacks/transforms, no interactive fallback, honest exit codes. #The launch plumbing must emit nothing on stdout/stderr (exec-style callers). set ::tcl_interactive 0 - package require app-punkscript + if {[catch {package require app-punkscript} errM]} { + puts stderr "script: this kit does not carry the app-punkscript package ($errM)" + exit 1 + } } shell { #app-punkshell supports running a script and maintaining an interactive shell afterwards # or just launching an interactive shell if no script is specified - package require app-punkshell + if {[catch {package require app-punkshell} errM]} { + puts stderr "shell: this kit does not carry the app-punkshell package ($errM)" + exit 1 + } #if {[llength $subcommand_arglist]} { # #run script and maintain interactive shell. # package require app-punkshell diff --git a/src/vfs/_config/punkboot_core.tcl b/src/vfs/_config/punkboot_core.tcl index 98151603..41e20475 100644 --- a/src/vfs/_config/punkboot_core.tcl +++ b/src/vfs/_config/punkboot_core.tcl @@ -42,7 +42,7 @@ namespace eval ::punkboot { #boot-core identity (G-031; stamped into kits + reported by the G-025 #buildinfo surfaces) - variable core_version 0.2.0 + variable core_version 0.2.1 } if {![info exists ::punkboot::launch_args]} { namespace eval ::punkboot [list variable launch_args $::argv] @@ -1663,7 +1663,11 @@ if {![info exists ::punkboot::launch_defaults]} { } shellspy { #pass through to shellspy commandline processor - package require app-shellspy + #graceful when a derived kit does not carry the app package (0.2.1) + if {[catch {package require app-shellspy} errM]} { + puts stderr "shellspy: this kit does not carry the app-shellspy package ($errM)" + exit 1 + } } punk { #The punk executable must also support running commands piped into stdin. @@ -1679,10 +1683,16 @@ if {![info exists ::punkboot::launch_defaults]} { if {[llength $subcommand_arglist]} { #puts stdout "main.tcl launching app-punkshell with args: $subcommand_arglist" - package require app-punkshell + if {[catch {package require app-punkshell} errM]} { + puts stderr "punk: this kit does not carry the app-punkshell package ($errM)" + exit 1 + } } else { #punk interactive shell - package require app-repl + if {[catch {package require app-repl} errM]} { + puts stderr "punk: this kit does not carry the app-repl package ($errM)" + exit 1 + } } } script { @@ -1691,12 +1701,18 @@ if {![info exists ::punkboot::launch_defaults]} { #no shellfilter stacks/transforms, no interactive fallback, honest exit codes. #The launch plumbing must emit nothing on stdout/stderr (exec-style callers). set ::tcl_interactive 0 - package require app-punkscript + if {[catch {package require app-punkscript} errM]} { + puts stderr "script: this kit does not carry the app-punkscript package ($errM)" + exit 1 + } } shell { #app-punkshell supports running a script and maintaining an interactive shell afterwards # or just launching an interactive shell if no script is specified - package require app-punkshell + if {[catch {package require app-punkshell} errM]} { + puts stderr "shell: this kit does not carry the app-punkshell package ($errM)" + exit 1 + } #if {[llength $subcommand_arglist]} { # #run script and maintain interactive shell. # package require app-punkshell