From 5c25d15cc7dedb883a6d91ab3ba6aeb9a47a701d Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Mon, 27 Jul 2026 19:33:55 +1000 Subject: [PATCH] G-126 achieved 2026-07-27: flip + archive record + reference sweep Every acceptance clause is met: vendored source green under the pinned zig 0.16 toolchain via the make.tcl tool step (zig optional), upstream extract-to-directory + pinned porcelain listing, punk::zip accelerator with the parity suite (identical names/bytes/mtimes both engines over the G-124 shapes and the file-relative piperepl kit; pure path proven when absent), recorded benchmark (crossover ~15-20 members, material from ~50, x2.3-2.6 native / x3.8-4.9 kit-hosted), and PROVENANCE.md origin/re-vendor/licence records. Index entry moved to GOALS-archive.md; detail Status flipped (the file moves to goals/archive/ in the adjacent pure-rename commit). Reference sweep: G-101's pending-tense accelerator mention rewritten as achieved with the archive path; G-128's Depends-on gains the archive pointer plus the now-existing pattern surface and the zig-0.16 traps its port should read first. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- GOALS-archive.md | 4 ++++ GOALS.md | 4 ---- goals/G-101-tcl86-kit-container-strategy.md | 6 ++++-- goals/G-126-punkzip-accelerator.md | 2 +- goals/G-128-portable-pe-resource-stamping.md | 13 +++++++++++-- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/GOALS-archive.md b/GOALS-archive.md index f3f36aee..4d8474cc 100644 --- a/GOALS-archive.md +++ b/GOALS-archive.md @@ -214,3 +214,7 @@ Acceptance: a kit baked from a runtime that mounts its attached archive at the e ### G-133 [achieved 2026-07-27] Bakes verify payload/target consistency: smoke-requires probe + advisory binary-arch scan → detail: goals/archive/G-133-bake-payload-consistency-checks.md Scope: src/make.tcl (post-merge advisory arch scan at the G-125 gate seam; post-bake smoke-require step for host-runnable kits; recapped reporting); src/modules/punkboot/utils-999999.0a1.0.tm (binary-arch classifier + payload scan predicate beside vfs_boot_library_report); src/runtime/mapvfs.config (per-kit smoke-require declaration - interim line format, schema home moves with G-024); src/tests/modules/punkboot/utils/ (classifier fixtures); src/tests/shell/testsuites/punkexe/ (reporting characterization); src/AGENTS.md + bin/AGENTS.md (what is and is not guaranteed) Acceptance: a merged payload carrying a wrong-arch binary outside any platform-discriminated subdir produces a recapped BUILD-WARNING naming file, found architecture and kit target, with the 2026-07-27 punkluck86 case (x64 thread dll under plain lib_tcl8/ in a win32-ix86 kit) reproduced as a fixture; multi-arch platform-subdir packages (iocp-2.0.2's win32-ix86 + win32-x86_64 pair) and recognised vendor spellings (blend2d-style win-x64) produce no warning; the scan is structural, non-executing, runs for cross-target kits and its measured per-kit cost is recorded as negligible; a kit entry may declare smoke-require packages, and for host-runnable kits the freshly built artifact is executed via its tclsh subcommand with each declared package plain-required - failures are recapped naming kit, package and the actual error, the Thread version-shadowing case is caught by construction, cross-target kits skip with a stated reason, and undeclared kits run nothing new; the classifier is unit-tested over PE i386/x64/arm64 fixtures and platform-subdir layouts with non-PE formats classified or honestly unknown; and src/AGENTS.md + bin/AGENTS.md state what the checks do not guarantee (statics, pure-tcl packages with binary deps, and version-preference outcomes are visible only to the smoke probe). + +### G-126 [achieved 2026-07-27] punkzip as a vendored zip accelerator: zig 0.16 port, reproducible build into bin/, punk::zip fast path → detail: goals/archive/G-126-punkzip-accelerator.md +Scope: src/tools/punkzip/ (vendored punkzip source tree - root name settled in the work - with provenance and licence records); src/make.tcl (tool build step); bin/tools/zig* (pinned toolchain as consumed); bin/punkzip.exe (untracked build output); src/modules/punk/zip-999999.0a1.0.tm (accelerator detection + fast path behind the G-124 pure-Tcl floor); src/tests/modules/punk/zip/ (parity suite - accelerated and pure-Tcl paths must agree); upstream maintained checkout c:/repo/jn/zig/punkzip (re-vendor source, read-only from this repo) +Acceptance: the vendored source builds under the repo's pinned zig 0.16 toolchain with 'zig build test' green (the port's own 10 test modules), driven by a make.tcl step that produces bin/punkzip.exe reproducibly on a clean checkout - and zig stays OPTIONAL: a tclsh-only clean checkout completes packages + bake unchanged, with the step's absence reported rather than fatal; punkzip gains an explicit extract-to-directory argument and a machine-readable listing mode whose format is pinned by a test (the current fixed-width table stays the human default); punk::zip detects the accelerator and uses it, with a parity suite proving accelerated and pure-Tcl paths return identical listings and produce byte-identical extraction trees over the G-124 fixture set including the file-relative prefixed executable, and proving the pure-Tcl path is still taken when the binary is absent; a recorded benchmark on a representative kit payload states the speedup and the entry count at which it becomes material; the vendored tree records its upstream origin, the commit or state it was taken from, the re-vendor procedure, and its licensing (public-domain hwzip lineage plus MIT musl time.zig) per G-063 and the G-026 provenance direction. diff --git a/GOALS.md b/GOALS.md index 0c5aa716..79590b1f 100644 --- a/GOALS.md +++ b/GOALS.md @@ -391,10 +391,6 @@ Detail: goals/G-123-thirdparty-runtime-tiers.md -### G-126 [active] punkzip as a vendored zip accelerator: zig 0.16 port, reproducible build into bin/, punk::zip fast path -Scope: src/tools/punkzip/ (vendored punkzip source tree - root name settled in the work - with provenance and licence records); src/make.tcl (tool build step); bin/tools/zig* (pinned toolchain as consumed); bin/punkzip.exe (untracked build output); src/modules/punk/zip-999999.0a1.0.tm (accelerator detection + fast path behind the G-124 pure-Tcl floor); src/tests/modules/punk/zip/ (parity suite - accelerated and pure-Tcl paths must agree); upstream maintained checkout c:/repo/jn/zig/punkzip (re-vendor source, read-only from this repo) -Detail: goals/G-126-punkzip-accelerator.md - ### G-127 [proposed] Cross-target bake of a custom .vfs: per-target payload and per-target output location Scope: src/make.tcl (target-keyed output location and deploy folder, kit-name disambiguation by target, payload/target mismatch reporting, retirement of the kit-loop cross-platform TODO); src/runtime/vendorlib_vfs.toml (per-target payload declaration - format coordinated with G-115 and G-024); src/runtime/mapvfs.config (one vfs definition paired with several targets); src/vfs/ (per-target payload convention with punk9linux.vfs as the migration case); bin/kits// (non-native kit output tier, beside the existing bin/runtime// input tier); src/tests/shell/testsuites/punkexe/ (characterization - two-target bake, no-collision, mismatch report); bin/AGENTS.md + src/AGENTS.md (where cross-target kits land) Detail: goals/G-127-crosstarget-vfs-bake.md diff --git a/goals/G-101-tcl86-kit-container-strategy.md b/goals/G-101-tcl86-kit-container-strategy.md index 9732bec6..2f1f30f2 100644 --- a/goals/G-101-tcl86-kit-container-strategy.md +++ b/goals/G-101-tcl86-kit-container-strategy.md @@ -71,8 +71,10 @@ unblocked; activation is the user's call. zipfs, no vfs::zip and no tcllib: `punk::zip::members` lists an archive and `punk::zip::unzip` extracts it, including from an executable-prefixed image under either offset convention (`punk::zip::archive_info` reports which). If this goal picks a - zip-shaped container, the read half is already solved (and G-126 would add an optional - accelerator). + zip-shaped container, the read half is already solved, and the optional punkzip + extraction accelerator now exists too (G-126, achieved 2026-07-27 - see + goals/archive/G-126-punkzip-accelerator.md: punk::zip::accelerator + the accelerated + unzip path, x2.3-4.9 at kit member counts). - Related: G-116 (suite-built tcltls with a zig-built crypto backend) - the payload question is shared: whatever container this goal picks carries the battery set, and G-116's bi-family payload contract is generation-shaped, not diff --git a/goals/G-126-punkzip-accelerator.md b/goals/G-126-punkzip-accelerator.md index aa0c39ea..cf0526e3 100644 --- a/goals/G-126-punkzip-accelerator.md +++ b/goals/G-126-punkzip-accelerator.md @@ -1,6 +1,6 @@ # G-126 punkzip as a vendored zip accelerator: zig 0.16 port, reproducible build into bin/, punk::zip fast path -Status: active +Status: achieved 2026-07-27 Scope: src/tools/punkzip/ (vendored punkzip source tree - root name settled in the work - with provenance and licence records); src/make.tcl (tool build step); bin/tools/zig* (pinned toolchain as consumed); bin/punkzip.exe (untracked build output); src/modules/punk/zip-999999.0a1.0.tm (accelerator detection + fast path behind the G-124 pure-Tcl floor); src/tests/modules/punk/zip/ (parity suite - accelerated and pure-Tcl paths must agree); upstream maintained checkout c:/repo/jn/zig/punkzip (re-vendor source, read-only from this repo) Goal: punkshell carries punkzip as vendored source, builds it from the repo's pinned zig toolchain, and uses the resulting binary as an optional accelerator for zip reading - with the pure-Tcl path as the always-available floor - so a machine with zig gets fast archive listing and extraction (materially so for bakes with large library payloads) while a clean checkout with only tclsh still builds and bakes exactly as before. Acceptance: the vendored source builds under the repo's pinned zig 0.16 toolchain with 'zig build test' green (the port's own 10 test modules), driven by a make.tcl step that produces bin/punkzip.exe reproducibly on a clean checkout - and zig stays OPTIONAL: a tclsh-only clean checkout completes packages + bake unchanged, with the step's absence reported rather than fatal; punkzip gains an explicit extract-to-directory argument and a machine-readable listing mode whose format is pinned by a test (the current fixed-width table stays the human default); punk::zip detects the accelerator and uses it, with a parity suite proving accelerated and pure-Tcl paths return identical listings and produce byte-identical extraction trees over the G-124 fixture set including the file-relative prefixed executable, and proving the pure-Tcl path is still taken when the binary is absent; a recorded benchmark on a representative kit payload states the speedup and the entry count at which it becomes material; the vendored tree records its upstream origin, the commit or state it was taken from, the re-vendor procedure, and its licensing (public-domain hwzip lineage plus MIT musl time.zig) per G-063 and the G-026 provenance direction. diff --git a/goals/G-128-portable-pe-resource-stamping.md b/goals/G-128-portable-pe-resource-stamping.md index ee6b1340..e098342d 100644 --- a/goals/G-128-portable-pe-resource-stamping.md +++ b/goals/G-128-portable-pe-resource-stamping.md @@ -77,8 +77,17 @@ the parked RT_VERSION stamping wants, since the project version is known late. - Depends on: G-057 - supplies the mechanism seam this plugs into, and stays the no-toolchain windows path. This goal adds a mechanism; it does not remove one. -- Depends on: G-126 - the vendored-zig-tool build step, optional-zig posture and - provenance pattern are shared rather than duplicated. +- Depends on: G-126 (achieved 2026-07-27 - see goals/archive/G-126-punkzip-accelerator.md) - + the vendored-zig-tool build step, optional-zig posture and provenance pattern are + shared rather than duplicated. Everything this goal needs from it now EXISTS: + vendor under src/tools// with a PROVENANCE.md (record format + re-vendor + procedure per src/tools/AGENTS.md), declare the zig floor in build.zig.zon + minimum_zig_version, and `make.tcl tool` discovers/builds/tests/installs it with + zero make.tcl edits. Traps recorded in the archived detail worth reading before + the port: zig build run-steps need their own install-step dependency, msys pipes + hand OVERLAPPED stdout handles (probe pattern in punkzip's stdout_file), and 0.16 + Io openFile defaults allow_directory=true (breaks file-vs-dir probes) and cannot + stamp directory timestamps (direct SetFileTime route). - Related: G-123 / G-006 - publishing the built tool as a punkbin artifact is the route that gives a no-toolchain user portable stamping without depending on the committed twapi, which is what makes the G-004 tension resolvable rather than permanent.