Browse Source

G-031 increment 2: componentized kit boot - thin main + shared boot core (0.45.0)

punk_main.tcl is now the thin project-owned main: publishes launch_args +
main_script, declares (empty) project_subcommands and launch_defaults at
==CUSTOMIZE== points, locates the boot core and sources it. Core candidates:
<vfsroot>/punkboot/core.tcl (in-kit via the _vfscommon merge), parent-dir
punkboot/core.tcl (nested app/main.tcl, undroidwish G-129), sibling
punkboot_core.tcl master (source-tree execution - the kitmountpoint
characterization shape). punkboot_core.tcl carries the boot machinery
extracted verbatim from the monolith; delta beyond extraction: contract
preamble with serviceable defaults, normscript from ::punkboot::main_script
instead of [info script], registration-model subcommand selection (project
additions merge in, built-ins cannot be shadowed, declared noargs/unknownfirst
defaults) with a dispatching default arm, ::punkboot::core_version 0.1.0.
make.tcl vfscommonupdate now regenerates _vfscommon.vfs/punkboot/core.tcl
from the _config master.

Parity evidence: full punkexe suite 110 pass / 0 fail against freshly baked
punk902z; kitmountpoint 4/4 across 8.6-backport / 32-bit-modern / 64-bit
runtimes incl the unattributed-mount stderr pin; registration model exercised
end-to-end via a scratch kit; 11-kit default bake with only known-baseline
warnings; punk86 (metakit/starkit, tcl 8.6.17) smoke green. cookfs branch
carried verbatim - no cookfs kit is currently mapped in mapvfs.toml to
exercise it (stale bin/punk9cook.exe is an old vintage, untouched).

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 1 week ago
parent
commit
adeb3e9f29
  1. 20
      CHANGELOG.md
  2. 2
      punkproject.toml
  3. 10
      src/make.tcl
  4. 1674
      src/vfs/_config/punk_main.tcl
  5. 1692
      src/vfs/_config/punkboot_core.tcl

20
CHANGELOG.md

@ -5,6 +5,26 @@ 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.45.0] - 2026-08-02
- Componentized kit boot (G-031 increment 2): every punkshell kit now boots
through a THIN project-owned main.tcl that declares its launch surface and
hands over to a shared layout-owned boot core - <vfsroot>/punkboot/core.tcl,
delivered by the _vfscommon merge (master src/vfs/_config/punkboot_core.tcl,
regenerated by 'make.tcl vfscommonupdate'). The core carries the boot
machinery (G-058 static capture; zipfs/metakit/cookfs detection incl the
G-129 backport mount derivations; package modes incl proj:; libunknown;
src-mode modpod registration) plus the default dispatch, and is versioned
(::punkboot::core_version, 0.1.0). Thin mains may declare project
subcommands (::punkboot::project_subcommands - built-ins cannot be
shadowed) and launch defaults (noargs/unknownfirst): the G-031 registration
model. A main.tcl executed from the source tree finds its sibling master
punkboot_core.tcl, so filesystem-driven launches keep working. Behaviour
parity verified: full punkexe suite (110 pass / 0 fail), kitmountpoint
across the 8.6-backport / 32-bit-modern / 64-bit runtime families, 11-kit
default bake with no new warnings. Layout _config copies and the
project_main.tcl thin-sample rebirth follow in the next increment.
## [0.44.0] - 2026-08-02
- `make.tcl bake` refuses a kit whose source .vfs carries two root-level

2
punkproject.toml

@ -1,6 +1,6 @@
[project]
name = "punkshell"
version = "0.44.0"
version = "0.45.0"
license = "BSD-2-Clause"
url = "https://www.gitea1.intx.com.au/jn/punkshell"
#packager: declared identity for published artifacts (declarative, not proof -

10
src/make.tcl

@ -5812,6 +5812,16 @@ if {$::punkboot::command eq "vfscommonupdate"} {
#temp?
file delete $projectroot/src/vfs/_vfscommon.vfs/lib/.punkcheck
#G-031 boot-core delivery: the layout-owned kit boot core rides the
#_vfscommon merge as <vfsroot>/punkboot/core.tcl, regenerated here from
#the _config master so every kit's thin main.tcl finds it in-kit.
file delete -force $projectroot/src/vfs/_vfscommon.vfs/punkboot
if {[file isfile $projectroot/src/vfs/_config/punkboot_core.tcl]} {
file mkdir $projectroot/src/vfs/_vfscommon.vfs/punkboot
file copy $projectroot/src/vfs/_config/punkboot_core.tcl $projectroot/src/vfs/_vfscommon.vfs/punkboot/core.tcl
} else {
puts stderr "vfscommonupdate: WARNING - no src/vfs/_config/punkboot_core.tcl master - kits will carry no punkboot/core.tcl and thin mains cannot boot"
}
}
vfscommonupdate $projectroot

1674
src/vfs/_config/punk_main.tcl

File diff suppressed because it is too large Load Diff

1692
src/vfs/_config/punkboot_core.tcl

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save