6.8 KiB
G-099 suite_tcl86: zig buildsuite for core-8-6-branch (runtime, thread, tclvfs, core-test gate)
Status: proposed Scope: src/buildsuites/suite_tcl86/ (new: suite.tcl driver, 8.6 zig recipe + helper modules, expected_test_failures baseline); src/buildsuites/_build/ (untracked sources/outputs via existing globs); bin/tools/ (pinned zig as consumed); PUNK_FOSSIL_STORE / ~/.punkshell/fossils (hermetic clone store shared with suite_tcl90) Goal: a tracked suite_tcl86 buildsuite builds a Tcl 8.6 windows runtime from fossil core-8-6-branch sources using the pinned zig toolchain only (zig-only build policy; msys/mingw and MS toolchains remain test/validation-only), together with the core binary companions punkshell's Tcl 8 targets need - an 8.6-compatible thread branch and tclvfs - and gates the result against the 8.6 core testsuite via parsed all.tcl totals against a tracked, dispositioned expected-failure baseline, mirroring the suite_tcl90 gate mechanism. Acceptance: from the pinned zig and fetched core-8-6-branch sources (hermetic clone store, no MS toolchain) the suite produces a working tclsh86 executable and tcl86 dll with an installed lib tree the shell resolves without external Tcl installations (TCLLIBPATH/TCL_LIBRARY unset in all suite child invocations); an 8.6-compatible thread package and tclvfs build and load in that shell (versions recorded); suite.tcl test runs the 8.6 core testsuite, parses totals (exit codes not trusted), and gates against a tracked expected_test_failures baseline with every entry dispositioned with a reason - a full-run PASS deterministic across two consecutive runs is recorded in this file; an interactive-smoke record (script execution, package require checks) is captured here.
Context
Follow-on arc to G-096/G-098 (suite_tcl90, achieved 2026-07-20), per user direction 2026-07-20: "we need a similar set of goals around building for core-8-6-branch".
8.6 remains punkshell's real Tcl 8 target (punk86-class kits; 8.7 is unreleased dev convenience only). Today the 8.6 kits ride on prebuilt third-party runtimes (tclkit86bi.exe, tclkit-win64-dyn.exe) - a provenance and rebuildability gap this arc ultimately closes.
Known differences from suite_tcl90 to expect (assessments to verify at activation):
- NO zipfs in 8.6: no szip-style self-contained runtime is possible. This suite delivers exe + dll + on-disk lib tree only. Kit containment (metakit/cookfs/zipvfs candidates) is deliberately OUT of scope - see G-101.
- thread: trunk (3.x) targets Tcl 9; 8.6 pairs with the thread 2.8 branch - exact branch/tag selection to verify and pin.
- Source-tree/build differences vs the 9.0.5 recipe: 8.6's bundled zlib/libtommath arrangements differ; no tclUuid.h; manifest/rc generation to re-derive from 8.6's win/makefile.vc; TCL_BROKEN_MAINARGS-era entry-point handling differs from the mingw-unicode-entry work done for 9.0.5. Helper modules (build_zlib, build_libtommath, wrapfiletofile) reusable where the trees align - assess rather than assume.
- Test gate: a separate 8.6 expected_test_failures baseline (failure census unknown until the first full run; the 9.0.5 census does not transfer). Machine traits already dispositioned for 9.0.5 (OS username vs profile dir, admin shares) will likely reappear under their 8.6 test names.
- 8.6 has no tcl::process: runtests -jobs child handling falls back to blocking execs (documented convoy behaviour) - the core-test gate runs via suite.tcl, not runtests, so this only affects later punkshell-suite work (G-100).
- Shared scaffolding: fossil_source/clone-store/env-hygiene conventions exist in suite_tcl90/suite.tcl. Factor shared parts out only when this second consumer makes the right shape obvious - avoid premature generalization; duplication with a note is acceptable at first.
SEQUENCING (2026-07-20 discussion): drafted as proposed while suite_tcl90 matures - recommendation is to complete G-096's remaining items (TCLSH_PIPEREPL patch rebase + behaviour matrix, punk-getzig per-version fetch) and run the punk905_beta interactive trial through to promotion before activating this goal, so the shared suite scaffolding settles before it is forked. Also weigh G-102 (zig-driver hybrid bootstrap, achieved 2026-07-21 - the driver shape is now SETTLED: pipeline as zig recipe steps, zon-pinned + fossil-checkout source flows converging on one staged invocation): its natural slot was before or alongside this goal so suite_tcl86 is born onto the chosen driver shape rather than ported later.
Notes
- 2026-07-21 (user): SEQUENCING CONFIRMED - G-097 (achieved 2026-07-21) then G-103 (achieved 2026-07-22 - see goals/archive/G-103-runtime-kit-family.md) precede this arc - BOTH LANDED, the arc is unblocked; the suite_tcl86 fork is taken after the kit-family assembly steps exist in suite_tcl90 so the 8.6 suite is born expressing family products (and G-101 inherits a concrete payload contract).
- G-106 (archived) recorded a verification item for this arc's twapi-less 8.6 runtimes: the powershell console-mode fallback's disableraw-via-server path (the branch runtimes without -inputmode rely on to restore cooked mode) is coded but only tcl9-verified - run the G-106 recipe against a suite-built 8.6 runtime when one exists. See goals/archive/G-106-powershell-consolemode-fallback.md (Notes).
- G-104 relationship (recorded 2026-07-24; G-104 achieved 2026-07-25 - see goals/archive/G-104-maketcl-buildsuite-surface.md): the list/info/build surface and the sources.config self-description contract (description/product/doc/zigpin records, parsed by both suite.tcl and make.tcl) are live. suite_tcl86 must be BORN satisfying the contract (its sources.config carries the records from the first commit, so it lists and describes itself with no make.tcl edits) and its builds run via 'make.tcl buildsuite build suite_tcl86 ?driver-args?'.
- G-105 relationship: G-105's cross-target parameterization (zig -target) is inherited by this suite when it lands - the suite.tcl/recipe shape should not preclude a target dimension (per-target out prefixes, no per-target tree copies).
- Related: G-108 (debug buildsuite tier) - sibling suite-arc goal, queued behind this arc per user sequencing 2026-07-25; its -dbg/tcl::test debug-variant pattern is suite_tcl90-scoped, but the recipe shape this suite derives should not preclude a future 8.6 debug tier (recorded at the G-104 archive re-bridge - the pair's former bridges were all archived goals).
- G-005 relationship: G-005 owns the zig-build-of-binary-dependencies direction for the normal project build (vendored extensions, make.tcl-integrated); this suite is the arm's-length runtime-factory shape that direction took for Tcl cores. The two zig surfaces share the pinned-zig / zig-only toolchain policy; G-116's extension-build pattern is the living edge of G-005's expansion list.