New agent-maintainable scriptlib/developer/ area (recorded in root
AGENTS.md ownership notes). tkconsole_demo.tcl wires a Tk text widget as a
live ::opunk::TkConsole and runs an interactive repl against it, with a
layer-by-layer commented walkthrough of the mechanics: voo virtual
dispatch, the reflected-channel/input-pipe wiring, repl::init -console
routing and the junction-stack output diversion, and the vwait/Tk event
loop interplay. punk::args-documented options (--help renders the usage
table; the definition is registered for 'i developer::tkconsole_demo'):
-columns/-rows/-font/-title, -demo (auto-typed session via feed, including
a window-resize step showing size queries tracking actual dimensions) and
-autoclose (exercises the <Destroy> -> teardown -> eof path). Includes a
demo-installed code-interp bridge so in-session punk::console::get_size
reports the tk console's current size - documented as a hand-rolled
preview of G-008 scoped console state.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
Adds src/tests/shell/testsuites/punkexe/scriptexec.test (12 tests, all
pass) covering app-punkscript / the script subcommand (G-015): piped
execution and honest exit codes, error->exit 1, exitcode propagation,
stdin result echo, default-env dev alias present without boilerplate,
file-form argv passing, the lib:<name> scriptlib mechanism (subpath,
extensionless, bare-arg reclassification, not-found location listing),
and the tclsh-matching Tk main-loop behaviour (0.4.1): a serviced
after-callback runs and exits, a no-exit GUI script stays alive, an
errored GUI script exits promptly without hanging.
Reuses the shellexit.test built-exe harness pattern (pipe stdin,
half-close for EOF, timeout+force-kill) so runs are hang-proof; Tk cases
gated by an auto-detected punktk constraint (probes whether the kit loads
Tk). Full shell suite: 19 pass / 2 skip (console-only punkgoals) / 0 fail.
lib:/Tk cases resolve committed fixtures under scriptlib/_punktest/ - a
lib:-resolvable fixture cannot live in a tcltest temp dir since resolution
only searches scriptlib locations relative to the exe. The subfolder is
test-owned (README + do-not-edit fixture headers); root AGENTS.md carves
it out as the one agent-manageable exception to scriptlib being
user-only. No project version bump - tests/docs/fixtures only, no shipped
shell behaviour change.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
app-punkscript accepts lib:<name> (with or without .tcl - extensionless
appends it) as the shell subcommand does: `punkexe script lib:hello` or
bare `punkexe lib:hello` via reclassification. The prefix always wins; a
literal path beginning lib: (pathological - colon is illegal in Windows
filenames) is reachable via ./lib:... Not-found errors list every
searched location; only .tcl runs via the script subcommand.
Resolution policy is factored into punk::path::scriptlib_resolve
(PUNKARGS-documented) rather than copied inline: kit-internal
app/scriptlib first and deliberately not externally overridable, then
scriptlib dirs relative to the executable - the same policy
app-punkshell encodes inline (todo noted: refactor the shell path onto
the shared proc). Share definitions via modules, not launcher control
flow.
Verified on both generations (punk902z, punksys): lib:hello
extensionless and explicit, bare-arg reclassification, not-found
candidate listing (bin/scriptlib then <root>/scriptlib for a bin/ exe).
Project version 0.4.0 (backward-compatible behaviour addition).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
- Create scriptlib/tests/mime.tcl with 44 test cases covering:
* mime::finalize with all subordinates modes (all, dynamic, none)
* mime::setheader with new keys and different modes
* mime::encodingasciiP with various character types
* mime::qp_decode with encoded characters and soft newlines
* mime::parseaddress with complex formats (quoted, routes, groups)
* mime::initialize with different content types
* mime::getproperty with all properties
* mime::copymessage with different content types
* mime::buildmessage functionality
- Update mime-1.7.1.tm to mark all 15 previously untested code paths as TESTED
- All 44 tests pass successfully
- Resolves all TODO comments related to test coverage in MIME module