@ -156,10 +156,44 @@ working tree; one now exists.
must preserve that split. Fallback if real tz fidelity is ever wanted: zeit v0.9.0 is
zig-0.16-compatible, MIT, zero transitive deps - vendor it as a path dep (never a
build-time URL fetch, which conflicts with this goal's no-network-build premise).
- Known upstream gaps carried into the goal work: the catenated/prefixed-zip
`base_offset` read path (`src/zip.zig`) - the fork's raison d'etre - has NO direct
zig-side test; add coverage alongside the machine-listing pin (the parity suite covers
it from the Tcl side only). The undocumented `build` subcommand remains unfinished
scaffolding (wrong arg indexing, writes only an EOCD; its finalize call was restored at
the checkpoint) - finish or remove it during the port. 0.16 first surfaced error
re-confirmed 2026-07-27: `std.process.argsAlloc` removed.
- Known upstream gaps carried into the goal work: the undocumented `build` subcommand
remains unfinished scaffolding (wrong arg indexing, writes only an EOCD; its finalize
call was restored at the checkpoint) - finish or remove it before vendoring. (The
base_offset test gap noted here at activation was closed 2026-07-27 - see Progress.)
- TRAP for any zig-0.16 stdout-writing tool (applies to the G-128 tool too): msys/cygwin
shells hand children OVERLAPPED (asynchronous) pipe handles, but zig 0.16's
`Io.File.stdout()` hardcodes blocking flags and the `Io.Threaded` blocking write path
hits `unreachable` on NtWriteFile PENDING once the 64KB pipe buffer fills - output
truncates at ~64KB and the process dies mid-listing (exit code masked in pipelines).
Fix pattern (landed upstream 2026-07-27): probe the real handle mode once via
`NtQueryInformationFile(.Mode)` and set `flags.nonblocking` honestly so the Io
implementation takes its correct alertable-wait path; console handles fail the probe
and stay blocking. Anonymous CreatePipe pipes (Tcl exec, zig build test) are
synchronous and unaffected.
## Progress
- 2026-07-27 upstream zig 0.16.0 port COMPLETE (commit 3b87087 on top of the e9b5b553
checkpoint): floor moved 0.15.2 -> 0.16.0 (comptime gate + zon minimum_zig_version),
`main(init: std.process.Init)` with Io threaded through all fs access in punkzip.zig +
zipper.zig + punkzip_test.zig, version 2.1.3. Two load-bearing findings fixed en
route: a build-graph race (run steps did not depend on the install step, so the CLI
suite tested a stale zig-out binary under 0.16's scheduler) and the msys overlapped
stdout trap recorded in Notes. Verified on Windows: `zig build test` green under
0.16.0; 841 members CRC-verified extracted from the file-relative
`tclsh90b4_piperepl.exe` in 0.5s; listing byte-identical through msys pipe and file
redirect, and byte-identical to the old 2.1.0 binary's listing of the same kit.
- 2026-07-27 base_offset read path pinned upstream (commit 2e49c75): three container
tests (`zip_prefixed_unadjusted_offsets`, `zip_prefixed_file_relative_offsets` ,
`zip_prefixed_empty` ) build archives in memory, prepend a fake executable prefix,
and verify both offset conventions land on the right base_offset with members
extracting intact. Suite now 125/125.
- Remaining for acceptance: extract-to-directory argument (upstream); machine-readable
listing mode + zig-side format pin test (upstream; must keep the stdout=product /
stderr=diagnostics split per Notes); `build` subcommand finish-or-remove decision;
vendor into `src/tools/punkzip/` with provenance (upstream commit id), re-vendor
procedure and licence records; make.tcl tool build step (zig OPTIONAL - absence
reported, not fatal; test gate keys on exit code, not clean stderr - the zip suite's
negative tests print EOCD warnings while passing); punk::zip accelerator detection +
fast path behind the G-124 floor; parity suite in `src/tests/modules/punk/zip/` ;
recorded benchmark (speedup + entry count where it becomes material).