Notes-only on the goal; the new tracked material is the sdx patch capture.
G-101 gains four sections and an extended Scope line naming the surveyed trees
and bin/sdx.kit: a reference-material inventory giving the metakit boot chain in
reading order with file:line anchors (kbskit kitInit.c pre-init -> boot.tcl raw
mk::select bootstrap -> setupvfs.tcl -> mk4tcl.cpp Mk4tcl_Init, with KitCreator's
storage-switch variant as the comparison reference for scoping cookfs/zipvfs);
sdx provenance; the self-mount shadowing gotcha; and metakit-under-Tcl-9
feasibility. Two findings bear on the container choice: 8.6's core zlib cannot do
mk4vfs streaming (kbskit boot.tcl states it - forces whole-blob decompression,
relevant to a battery-carrying kit), and TEMP_REFERENCE/metakit is UNPATCHED
upstream while KitCreator carries eight 8.x-era fixes.
Self-mount shadowing verified live rather than inferred: inside a running tclkit
[file type [info nameofexecutable]] is 'directory', so a kit cannot read or copy
itself as a file and cannot be handed to sdx as -runtime (wrap.tcl LoadHeader is a
plain file read). make.tcl:4995-5005 already works around this with _BUILDCOPY;
recorded as a requirement to preserve. Container-agnostic - zipfs has the same
shape via its /app anchor.
src/buildsuites/suite_tcl86/patches/ captures the bin/sdx.kit delta into tracked
form. bin/sdx.kit is tracked and is what make.tcl resolves for the 'kit' wrap
path, but it is NOT stock sdx: unwrapping it and stock 2011-03-17 sdx gives 64
identical files except lib/app-sdx/wrap.tcl, whose entire difference is a
two-line binary-mode read of tclkit.inf before stringfileinfo patches the PE
version resource. That evidence previously existed only in gitignored scratch/
and TEMP_REFERENCE/ copies - one git clean from gone. Stock baseline, patched
file and diff are all byte-exact (hashes in the README); the patch round-trips to
the patched file byte for byte under 'patch --binary'. The stock baseline is kept
in full because upstream (svn://svn.equi4.com/sdx/trunk) no longer exists. Both
.tcl files are CRLF and must stay CRLF - vendored fidelity artifacts, exempt from
the repo's LF-on-edit preference.
Scope-limiting facts recorded rather than assumed: the patched path is DORMANT
for present builds (fires only with -runtime + a .exe runtime + a tclkit.inf in
the source .vfs, and no tclkit.inf exists in this repo), and the fix itself is
UNVERIFIED - plausible as a CRLF-corruption fix but no reproducer was recorded
with it. Confirming or retiring it is part of this goal's characterization work,
alongside the bootstrap circularity noted in the goal (sdx.kit is itself a metakit
starkit, so wrapping a suite-built 8.6 runtime currently needs a prebuilt
third-party tclkit of exactly the kind G-101 exists to replace).
Of the two proposed acceptance riders, this commit discharges the first (capture
the patch before any sdx rebuild). The second stands: the end-to-end demonstration
must wrap a SEPARATE COPY of the runtime so the shadowing path is exercised rather
than accidentally avoided.
A back-pointer to these findings was added to TEMP_REFERENCE/AGENTS.md so the
survey is not repeated; that tree is VCS-ignored, so it is not part of this commit.
Claude-Session: https://claude.ai/code/session_014UkdFjhuEdfCNDp4f8V6Xe
Assisted-by: harness=claude; primary-model=claude-opus-5[1m]; api-location=anthropic.com