Tree:
0c7168a178
master
v0.1a
${ noResults }
25 Commits (0c7168a1784ec534f42c4869f0573d93aa8fb11d)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
0c7168a178 |
ns tests: nsprimitives.test - name/path primitive + nseval-variant characterization (hygiene-pass pin gap closed)
20 pins for the previously near-unpinned punk::ns primitive region: nsparts/nsprefix/nstail/nsjoin/nsjoinall string behaviour incl weird colon-run (:::) splitting, trailing-colon parse ambiguity, round-trip exceptions; divergence pins proving nsparts1/nsprefix1/nsprefix_orig/ nstail1/nstail_orig are not drop-in twins (safe-deletion evidence); nseval create-on-eval + evaluator caching and the native-vs-punk p:::x resolution divergence; nseval_ifexists/nsexists/nschildren/nstree_raw on genuinely weird namespaces; globmatchns */**/? semantics (stale "should be fixed" comment above nsglob_as_re noted - behaviour fixed); nspath_to_absolute/nspath_here_absolute caller resolution. Warts recorded for the pass: nsjoinall error message says "nsjoin:". Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
2b46e2d86a |
shell tests: E3 piped-session proof of n/ namespace continuity and subshell carry-over (shellnavns.test)
New shell/testsuites/punkexe/shellnavns.test - one hang-proof punk_run piped session against the built executable in src launch mode (dev modules, so current punk::repl/nav source is exercised without a rebuild): PROVEN end-to-end: - n/ sets ::punk::nav::ns::ns_current in the running shell - the current namespace continues into `subshell punk` and back out, and the 0.5.2 stray-namespace seeding fix holds live (no phantom ns_current namespace in the subshell context) - navigation inside the subshell takes effect; the session exits cleanly (exitcode 0, no timeout, exit unwinds subshell -> parent -> terminate) FINDINGS from the E3 probes (pinned in the test with markers): - the FIRST subshell evaluates in the SAME code interp as the parent shell - the "first subshell asymmetry" already TODO-documented in repl::init. Continuity therefore manifests via shared state at shell level (SHARED marker: a variable set in the subshell is visible to the parent after exit, and the parent adopts the subshell''s final namespace). The repl::start seeding template - the carry-over mechanism for genuinely separate code interps - is proven at module level in punk/repl nscurrent.test. A G-002-style isolated subshell would flip these pins. - KNOWN GAP: piped-session submissions evaluate at :: even after n/ sets ns_current - the inscope application proven interactively and at module level does not take effect for subsequent piped submissions in this spawn shape. Root cause undetermined (piped-path evaluation vs kit/codethread interplay); flagged for investigation alongside G-038 session-context work. Verified: shell/** suite 42 total / 40 passed / 0 failed (2 gated skips) under Tcl 9.0.3. AGENTS updated (shell contracts bullet; punk/repl module index E3 reference). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
50e4c60649 |
n/ display+navigation characterization (nslist/navns/nscurrent tests); punk::repl 0.5.2 stray-namespace seeding fix
Groundwork requested for the future rework of n/ n// n/// output to punk tables with terminal-width responsiveness: the underlying display elements and navigation/retention semantics are now pinned so only deliberately REWORK-flagged pins flip when the layout changes. - punk/ns nslist.test (11): tier A pins get_ns_dicts classification buckets (the machine contract: children/packagetails/packageprefixes per the package-names derivation, commands/exported/imported/aliases/procs/ ensembles/oo/coroutines/usageinfo incl alias-target doc resolution and its update_definitions dependence, alias edge cases, native via builtin ns); tier B pins per-element marking layout-agnostically (underline/underdouble/ underdotted package styles, type tag colours, exported green / imported -I under overtype SGR canonicalization, the punkargs doc icon); tier C pins the CURRENT hardcoded 2-col/4-col layout and nspath subtables, explicitly flagged to flip with the rework; KNOWN QUIRK pinned: bare nslist without -types errors with a malformed message (literal dollar-known_types). Findings recorded: the red-strike/masked alias display branches appear unreachable from current bucket derivation. - punk/nav/ns navns.test (6, new suite dir): ns/ navigation state machine (absolute/relative/glob-no-nav/failed-nav preservation/quad-colon normalization), v-form content selection, ensemble annotation, and the ::punk::nav::ns::ns_current variable contract. - punk/repl nscurrent.test (4): repl retention proven against a REAL codethread (repl::init, synchronous runscript sends): inscope evaluation, retention across submissions, n/ navigation retained, auto-create-with- notice for a missing current namespace. - punk::repl 0.5.2 fix: repl::start''s codethread seeding template namespace-eval''d the full ns_current VARIABLE name, creating a stray namespace of that name in every code interp (phantom child in n/ listings of the nav namespace). Now ensures only the parent ::punk::nav::ns. Subshell namespace carry-over semantics unchanged; pinned behaviourally (mirrored template) plus a source-text guard, pending the planned end-to-end piped subshell test (E3) at the shell level. Verified: punk/ns 80/80, punk/nav 6/6, punk/repl 7/7 under Tcl 9.0.3; nslist/navns/nscurrent green under 8.7. Console queries mocked throughout (the render path consults get_size/get_tabstops). Project 0.12.33 + CHANGELOG; tests AGENTS.md index updated. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
e68cc1c223 |
punk::lib 0.5.0: has_tclbug_nestedswitch_tracelines check (behavioural probe of tktview 5d5b1052280c976ea3d4)
New check pair in punk::lib::check, in the established style (G-076
console_deadspin exemplar: pure facts-in/verdict-out classifier
tclbug_nestedswitch_tracelines_signature + has_tclbug_* proc returning the
standard buginfo dict {bug bugref description level}, auto-surfaced through
the help tcl warning report via the info procs enumeration).
Unlike the version-gated checks, this one is a LIVE behavioural probe (safe
and cheap - no console interaction): a dynamically-defined proc with a
nested 4-word switch is enterstep-traced for inner arm 1 (affected split-
list index 1 - reports line 3) and the default arm (index 5, beyond the
command word count - reports line 2 correctly), matched against the
characterized wrong/right signature. Detection therefore flips
automatically on a Tcl runtime containing the upstream fix - no fixed_in
version variable needed. Probe layout note: a 2-arm probe would put the
default body at affected index 3 and hide the signature (both arms
mismark) - the middle arm exists to push default to safe index 5 (this
initially bit the probe itself, confirming the law once more).
Followup-when-fixed documented in the proc: re-verify with
scriptlib/developer/tcl_switch_traceline_repro.tcl, flip the
ns/cmdtrace.test GAP pins and fixed-canary, update the punk::ns::cmdtrace
argdoc caveat, note the fixed-in version. New canary test
cmdtrace_upstream_bug_check_canary asserts the check still reports the bug
- on a fixed Tcl it fails first and points at that workflow.
Verified: punk/ns 69/69 and punk/lib 37/37 under Tcl 9.0.3; cmdtrace.test
6/6 under 8.7; all has_tclbug_*/has_libbug_* procs exercised help-tcl style
without error; probe self-cleans (no temp proc/var residue).
punk::lib buildversion 0.4.3 -> 0.5.0 (new API procs = minor); project
0.12.32 + CHANGELOG; tests AGENTS.md index updated.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
2 days ago |
|
|
cabde42e85 |
punk::ns 0.6.0: cmdtrace -pause flag; nested-switch traceline mismark characterized as upstream (tktview 5d5b1052280c976ea3d4)
cmdtrace gains -pause <bool> (default 1, existing interactive behaviour unchanged): -pause 0 bypasses the "paused - hit enter key to continue" askuser in _cmdtrace_leave so cmdtrace runs unattended and the marked-up traced-body report (return value) can be captured by scripts and tests. Line-mismark investigation (all punk-free raw enterstep probes, results byte-identical on Tcl 8.6.17 / 8.7a6 / 9.0.3 - conclusively upstream): - with the ::switch argdoc available (punk::args::moduledoc::tclcore), cmdtrace marks flat single-block switches and 2-word-form nested switches correctly for EVERY arm; the residual mismarks match the raw trace data - empirical law, predictive across 4 command shapes x 6 arms and deeper nestings: an arm body at index j of the split pattern/body list reports container-relative lines (shift = switch command line within its containing script - 1) exactly when j lands on a LITERAL word of the switch command (options, --, or the block); dynamic words and j beyond the command word count fall back to correct arm-relative attribution. Position-based, not call-order based. Explains the ticket observation that the affected-arm count "varies based on switch options". - suspected machinery: Tcl_SwitchObjCmd passes split-list index j as the TclNREvalObjEx word; TclInitCompileEnv adopts ctx line[word] when the index happens to be in range of a per-word array describing the switch command itself (the splitObjs munging looks intended to prevent this) Artifacts: - new tests ns/cmdtrace.test (5): -pause 0 smoke + error-call count, flat-switch and 2-word-nested correct-mark guards, upstream mismark GAP pins (gated on have_tclcoredocs - cmdtrace arm-offset correction parses supplied switch commands against the ::switch argdoc) - scriptlib/developer/tcl_switch_traceline_repro.tcl: standalone pure-Tcl repro + findings write-up, suitable as an attachment/addition to the upstream ticket - cmdtrace argdoc caveat updated: cites the ticket and the characterized pattern (was "possibly an unreported bug") Verified: punk/ns suite 68/68 under Tcl 9.0.3; cmdtrace.test 5/5 under 8.7. punk::ns buildversion 0.5.0 -> 0.6.0 (new flag = minor); project 0.12.31 + CHANGELOG; tests AGENTS.md index updated. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
765d24b302 |
tests: corp/grepstr/untabify characterization - punk::ns hygiene-pass precursor coverage
New punk/ansi suites and extended punk/ns corp.test, characterizing the corp -> grepstr -> untabify tab-handling interaction and the standalone behaviours. All console-query paths are mocked (the overtype renderline.test get_tabstops pattern, extended to get_size + punk::console::tabwidth): the -untabify none / -stops terminal / -stops <int> paths consult punk::console::get_tabstops / get_size which emit live terminal queries that block or error in headless/piped environments - mocking is the answer to probing that behaviour deterministically in the test harness. - ansi/untabify.test (10): -stops 8/int/list/terminal(mocked), -with spaces/unicode(U+21E5 + U+00A0)/custom pair, multiline, usage errors, and the EXPERIMENTAL -plastic elastic-tabstop mode: basic expansion, the cross-line column-alignment property, -with composition - pinned as interim behaviour (hardcoded 8-multiple stops marked temp in source) and deliberately retained for possible future repl editbuf use. - ansi/grepstr.test (9): return modes incl summarydict (linemap pinned always-present; -help claims -n-only - reconciliation deferred to the hygiene pass), exact highlight SGR wrapping, -n numbering with * match counts, invert + empty-highlight strip, -C context with break indicators, capture groups, and tab handling: warns once per call on stderr, a simple single-pass tab line survives with correct highlights. - ns/corp.test (+6): basic-highlight ansistrip equivalence with -syntax none, -n numbering, -untabify spaces exact tab-free expansion + proper 4-element -syntax none list, -untabify unicode markers, the KNOWN DEFICIENCY pin for default -untabify none on a tabbed body (5 grepstr warnings; brace overlays mangle tabbed lines - leaked/shifted close-braces pinned exactly under mocked tabstops; flip deliberately if tab handling is fixed or corp moves off grepstr), and a ::tcl::CopyDirectory -untabify spaces smoke test (tab-free, warning-free, constraint-guarded). src/tests/modules/AGENTS.md punk/ansi + punk/ns index entries updated. Verified: punk/ansi 63/63 and punk/ns 63/63 under Tcl 9.0.3; the three new/extended files green under Tcl 8.7 (10/10, 9/9, 13/13). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
a21315a109 |
punk::args: -parsekey characterization tests; goals G-083/G-084 (argument relations, parsekey completeness)
parsekey coverage review outcome: - tests/args/parsekey.test: pin mash-path last-wins ordering, prefix-abbreviation keying and @opts -any passthrough; GAP pins for last-defined-member default precedence, cross-member -multiple value loss, parsekey/optname collision conflation, and values/leaders parsekey breakage (abort/ignore/reject) - new tests/dev/parsekey-knownbugs.test: desired-behaviour pins disabled behind punkargsKnownBug (value/leader key renaming, cross-member accumulation in received order) - GOALS.md + detail files: G-083 argument relations (per-arg -conflicts checked against received args, @opts strict mode for shared-parsekey groups, define-time parsekey collision validation, lsearch/clock clicks dogfood); G-084 -parsekey completeness (cross-member -multiple collection, leaders/values support or define-time rejection, defaulted-member precedence documented) - src/tests/modules/AGENTS.md: punk/args suite index updated Verified: full punk/args suite under Tcl 9.0.3 = 221 total / 217 passed / 0 failed / 4 skipped (intended disabled pins); parsekey.test 16/16 under 8.7; goals_lint clean. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
c309ed4782 |
punk::args 0.6.0: small restricted choice sets display as literal alternates in synopses
An argument whose choice pool (-choices plus -choicegroups members, deduplicated) has 1-3 members and -choicerestricted true (the default) now renders those words unitalicised joined by | in synopses - e.g 'after cancel' shows literal cancel, a 3-choice option shows (left|centre|right) - matching the display style of literal()/literalprefix() type-alternates. Larger or unrestricted choice sets keep the italicised argname/<type> display, and an explicit -typesynopsis always takes precedence (textblock::frame -type unchanged). New shared helper punk::args::private::synopsis_choice_literals feeds both synopsis render paths (leaders/values via synopsis_form_arg_display, options inline in synopsis); applies only to single-element -type lists. Superseded commented-out single-choice sketches removed; define doc for -choices documents the rule. tests: synopsis.test 4 -> 13 - characterization coverage for literal/literalprefix/stringstartswith/stringendswith type-alternates, option alternate parenthesization, multi-element clause display (?type? members, argname tail-word hints), -typesynopsis value-element lists and option passthrough incl documenter ANSI, plus the new choice-literal rule (leader/option/value positions, choicegroups counting, >3 and unrestricted fallbacks, -typesynopsis precedence). rendering.test choicelabel fixtures padded to 4 choices so markercol keeps matching the choices cell rather than the now-literal synopsis line. Known residue (deliberate): option-path -typesynopsis ?-trim edge cases remain (todo comments at the render site) - resolve-time rejection deferred; any future normalization surgery belongs to punk::ansi::ansistring/opunk::Str. project 0.12.0 Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 days ago |
|
|
d35e055efc |
punk::libunknown: isolate pkgIndex.tcl sourcing - stop clobbering global 'dir'
zipfs_tclPkgUnknown previously declared 'global dir' and executed pkgIndex.tcl scripts via 'namespace eval ::' - the pkgIndex $dir contract was met by writing the global namespace's dir variable, silently overwriting any user global named 'dir' whenever a package require fell through to the pkg unknown handler (observed misdirecting a file write into the user's Tcl installation during test development), and each index's stray unqualified variables (ver, pkg, script, _CawtSubDirs, ...) leaked into ::. Index scripts now execute in a source_pkgindex proc frame: $dir is a formal parameter and auto_path/env are global links - exactly the environment stock tclPkgUnknown documents (its indexes see dir as the handler's proc-local plus 'global auto_path env'), without stock's incidental exposure of all its other proc locals. tcl::Pkg::source uplevels into the caller's frame, so the scheme works unchanged for the 8.6 pre-tip459 fallback. The legacy non-epoch branch already sourced in the handler frame and simply gains stock parity from the 'global dir' removal. Reviewed against tcllib 2.0's vendored index behaviours (all compatible): qualified '$dir ni $::auto_path'/'lappend ::auto_path' extension in the top-level index, its own apply-scoped subindex sweep (the same isolation idiom), vsatisfies guards with early return, 'package provide' during index sourcing (try/pkgIndex.tcl on 9+), and critcl-generated ifneeded strings (md5c, tcllibc) whose proc definitions run at require time, not source time. One deliberate divergence from stock: each index file gets its own frame, so unqualified variables no longer persist between index files within one sweep (stock shares its handler frame across the sweep) - nothing in tcllib relies on that. discovery.test: the GAP pin flips to libunknown_pkgunknown_preserves_global_dir, plus new pins for the index contract - $dir-based ifneeded/source works, unqualified 'lappend auto_path' extension reaches the real ::auto_path, and stray index-script sets don't leak to ::. Verified live in punk902z src: ::dir no longer set at startup, user dir global survives package activity, tcllib md5/struct::set/json load through the new frame, lib.search deep discovery unaffected. Remaining startup globals def/pkg/ver come from punkshell's own boot code (punk_main.tcl foreach loops), not the handler. punkshell 0.10.1. punk::libunknown remains manually versioned at 0.1; vfs artifact synced, bootsupport copy untouched as before. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
0c243a9ba9 |
dev lib.search: deep module discovery by default; -refresh = genuine re-scan
punk::libunknown gains register_all_tm: walks every tcl:™️:list path
recursively and registers ifneeded scripts for .tm modules at every
namespace depth (the tm unknown handler only registers siblings at the
requested depth, leaving never-requested subfolders like test::* invisible
to 'package names'). First registration wins - parity with the handler and
the shadowing pins. Reuses/populates the per-epoch directory index cache
(zipfs whole-tree listing; per-dir globs for filesystem paths; #modpod-*,
#tarjar-* and _build skipped) and runs at most once per tm epoch per
interp - the guard is the interp-local tm_fullscan variable, deliberately
not in the shareable epoch dict since ifneeded registrations are
interp-local.
punk::mix::commandset::loadedlib 0.2.0: search runs register_all_tm plus
the auto_path pkgIndex sweep by default when punk::libunknown is active,
so 'dev lib.search test' now shows deep modules without -refresh.
-refresh is repurposed to mean a genuine filesystem re-scan: package epoch
incr (invalidating the scan caches) then rediscovery - picking up .tm
files added/removed on disk. Without punk::libunknown (or with an older
copy lacking register_all_tm) -refresh falls back to the previous
dummy-require deep walk. Dependency fixes: highlight ansi computed only
when -highlight 1 via qualified punk::ansi with inline require (previously
relied on the shell-global a+ alias unconditionally and errored in bare
interps), inline requires for punk::path (fallback walk) and textblock
(table output).
New test suites (green under tclsh90 and tclsh87):
- modules/punk/libunknown/testsuites/discovery/discovery.test: lazy-depth
sibling registration, register_all_tm all-depths/cached-per-epoch/
head-wins-parity, package epoch shape and trace-driven increments,
epoch-cache short-circuit + incr recipe, and a GAP pin of
zipfs_tclPkgUnknown clobbering a user global 'dir' variable (stock
tclPkgUnknown keeps dir proc-local; fix candidate).
- modules/punk/mix/testsuites/loadedlib/libsearch.test: search match
semantics, default deep discovery, -refresh re-scan contract, highlight
without shell-global ansi aliases.
Both suites source the source-tree punk::libunknown directly by path:
'package require' would tie-break the same-version bootsupport copy by tm
path order (testinterp order favours bootsupport; child-interp
'tm::add {*}list' reverses precedence).
Verified live in 'punk902z src'. Build artifacts synced via make.tcl
packages + vfscommonupdate (loadedlib-0.2.0.tm, libunknown-0.1.tm).
Note: src/bootsupport copy of punk::libunknown intentionally untouched -
becomes stale until the next 'make.tcl bootsupport' sync; loadedlib
degrades gracefully against it. punk::libunknown remains manually
versioned at 0.1.
punkshell 0.10.0 (see CHANGELOG.md; also records the 0.9.1 doc-only
-refresh help rewrite).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
5 days ago |
|
|
aec77ca0d1 |
G-001 increment 1: pluggable ::opunk::Console backends - test double, ssh-channel, tk-widget (punkshell 0.9.0)
- three new backend modules under src/modules/opunk/console/, base ::opunk::Console and punk::console UNCHANGED (the G-001 acceptance constraint - verified diff-clean): * opunk::console::test / ::opunk::TestConsole - deterministic channel-pair test double: fixed size via -columns/-rows, is_console_or_tty/can_respond 1 (settled value wins), at_eof = plain chan eof with NO probe (pending bytes never consumed - pinned). The console seam identified by the G-044 repl characterization work * opunk::console::ssh / ::opunk::SshConsole - socket-carried terminal sessions: construction-time capability (detection is the wrong tool - per goal detail), chan-eof without byte-consuming probes, size via the registered ANSI size-query provider over the connection. Flagship test: a scripted remote terminal answers CSI 6n over a socket pair and size resolves 100x30 through punk::console machinery querying the socket * opunk::console::tk / ::opunk::TkConsole - Tk text widget as terminal: widget path in the inherited in/out slots (documented non-channel reuse), terminal_class tk-text, size from widget char dims, at_eof via backend marker (opunk::console::tk::set_eof) or widget destruction; no Tk require at module load. Verified live under punk91 src (the tk-loading experiment kit) - voo -extends subclassing pattern recorded in opunk/AGENTS.md: children inherit public accessors + field INDEX variables (not parent-private my.* accessors) - constructors initialise inherited private fields via index vars, method bodies use parent public accessor methods; virtual dispatch via the slot-0 tag needs no base changes - tests: modules/opunk/console backends.test (8 tests: dispatch, spec_resolve acceptance of subclass values, probe-free eof, settled-capability precedence, ssh capability/eof/size-over-socket/settled-0-no-emission, tk gated behind env PUNK_TEST_TK=1) - 7 green + tk skip on tcl 9.0.3 and 8.7; tk case verified standalone under punk91 - goal detail records progress + remaining work (repl -console launch wiring, output-channel parameterization, interactive acceptance verification); goal stays active Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
4bb7b3d68f |
G-054 achieved: tclcore string is class choices harvested from the running interpreter (tclcore moduledoc 0.2.0, punkshell 0.8.2)
- the ::tcl::string::is definition harvests its class set at define time from the bad-class error message of a deliberately invalid probe (safe, side-effect-free) - accept/reject parity with the loading interpreter by construction: 8.6.13 = 21 classes (no dict - the previous static 9.0 list wrongly ACCEPTED string is dict there), 8.7a6 = 23 (+dict +unicode), 9.0.3 = 22 (unicode removed). Fallback to the 9.0 set if the message format ever changes - hand-written man-page descriptions (kept verbatim, tstr-processed as before so the A_WARN highlights are unchanged) apply only to classes the runtime accepts; accepted-but-undescribed future classes get a generic label; static version notes added to dict (not in 8.6) and the new unicode entry (unreleased 8.7 only - removed in tcl 9). The per-class virtual docids (::tcl::string::is <class>) follow the harvested set automatically - new tclcoreparity.test (4 tests, gated on have_tclcoredocs): choices equal the live-harvested set and every documented choice is really accepted; per-class docids exist for every class; error-vs-ok outcome agrees between real string is and parse_status across the 23-shape probe matrix (missing args, trailing flag-like str, option/class prefixes + ambiguity, unknown option/class, -failindex var consumption, per-version dict/unicode presence, divergent-classification shapes); version-note labels conditional on presence. Expectations derived from the LIVE interpreter, never version arithmetic - green on 9.0.3, 8.7a6 and (via a direct tcltest driver, since runtests infrastructure does not run under the plain 8.6 kit) 8.6.13 - full punk/args + punk/ns trees green (219 pass + 1 pre-existing skip) incl the have_tclcoredocs cmdhelp pins Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
8c65fe9d6f |
repl pre-refactor: characterize command-completeness engine + record preserve-list and testability findings
- new commandcomplete.test (6 tests, green 9.0.3 + 8.7): punk::lib::system::incomplete pure-function characterization - the info-complete quoting quirk (a quoted word with unbalanced braces e.g set x "{*}{" is complete standalone but needs extra closers inside a proc body; the pending-opener stack { " { " shrinks per typed closer), single openers, tabs in open braces, escapes, and an incomplete<->info-complete parity property over a case battery
- goals/G-044 detail: the user-specified preserve-list any repl refactor must honour (info-complete parity + quirk, closing-prompt hints incl the accepted single-candidate limitation pinned-not-fixed, raw-mode colour staging in-progress vs submitted, literal tab acceptance with raw-mode marker edit smarts, dim space dots display-only never leaking into submitted strings/history, up/down navigation of MULTILINE editbuf history with recalled entries editable) + testability findings: class_editbuf is console-coupled at its core (add_chunk renders via overtype::renderline against live terminal metrics - cursor-position size probing, DECRQPSR tabstops) so items 3-6 are not unit-characterizable until a console seam exists - G-001 (pluggable console backends / ::opunk::Console test double) is the enabling refactor, not just a feature goal
- goals/G-020 detail: repl interactive-behaviour verification recorded as a driving use case (near-term windows harness: keystroke injection + capture) pending the durable pseudoconsole expect-alternative
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
5 days ago |
|
|
3a5a68ec9b |
G-059 achieved: WSL capability probing + native-filesystem staging for unix-side tests from windows
- new src/tests/testsupport/wslprobe.tcl (::punktest::wsl): memoized capability probe for the wsllinux constraint - default distro launches and unames as Linux, tools present (bash/mktemp/wslpath + sha1 tool), native tempdir file round trip; any failure -> skip with reason, so wsl.exe-present-but-unusable installs cannot false-positive. Staging helpers (staging_create/copy_in/run_in/cleanup) enforce the design: execution on the distro NATIVE filesystem only, shared /mnt used for one-way copy-in/out, the windows checkout never operated on from inside WSL (DrvFs slowness + cross-boundary stat differences that make git re-hash its index and fossil see phantom changes). Probe uses wsl -e invocations only (wsl --status/-l emit UTF-16) - multishell.test: scriptwrap_multishell_exec_wsl_sh - the polyglot sh payload produces its marker under the distro bash from native staging (the direct isunix twin still skips on windows) - new shell/testsuites/binscripts/runtimebash_wsl.test (8 tests): runtime.bash first-ever execution on real unix - multi-candidate run errors listing candidates, use/list/run round trip with argument passing, PUNK_ACTIVE_RUNTIME override, unknown/unselectable use errors, stale-active guidance, single-candidate fallback, offline list -remote (crafted cached sha1sums.txt + PUNKBIN_URL forced fetch failure), and the checkout-untouched guard (git status --porcelain identical before/after per acceptance) - green on tcl 9.0.3 + 8.7 against Ubuntu-24.04/WSL2; suites skip cleanly when the probe fails; enablement/limitations in src/tests/AGENTS.md (known limitation: a present-but-HANGING wsl can stall the probe) - GOALS.md G-059 flipped to achieved 2026-07-11; detail file records the outcome incl the UTF-16 discovery and the 512-byte label regression this work surfaced (caught by the guardrail suite as designed) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
b11f3e5946 |
tests + guidance for the MULTISHELL polyglot build machinery (scriptwrap)
- new src/tests/modules/punk/mix/testsuites/scriptwrap/multishell.test (9 tests, green on tcl 9.0.3 + 8.7, unix exec case constraint-gated): scriptset wrap via the module-provided punk.multishell.cmd template (payloads + _wrap.toml fixture) - output produced, MULTISHELL magic line, payloads embedded verbatim, configured win32 nextshell present, LF-only endings, byte-identical re-wrap determinism; checkfile 512-byte label/boundary validation reports no label location errors for a fresh wrap AND for the committed bin/runtime.cmd; the runtime scriptset ROUND-TRIP pin - re-wrapping src/scriptapps runtime.ps1+runtime.bash+runtime_wrap.toml reproduces bin/runtime.cmd byte for byte (verified identical before pinning), so hand-edits to the output or unregenerated payload changes both fail; execution smoke - cmd.exe runs the polyglot and dispatches the powershell payload (windows), sh payload execution gated to unix (on windows the shell layer deliberately relaunches via the win32 nextshell) - guidance strengthened so "fix bin/<name>.cmd" routes to sources: root AGENTS.md bin/ index entry now states the .cmd polyglots are scriptwrap-generated from src/scriptapps; bin/AGENTS.md gains a "Generated polyglot .cmd scripts - never edit in place" section with the 4-step fix workflow (edit payloads/toml, re-wrap with multishell -askme 0, heed checkfile ERRORs, commit source + regenerated output together); src/scriptapps/AGENTS.md documents the scriptset->bin/*.cmd relationship and regeneration command; tests index updated - context: the polyglot technique is deliberately maintained despite fragility (user direction 2026-07-10) until hiding techniques close in the underlying languages - these pins are the guardrails Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
d3d81c1c39 |
G-058 achieved: boot honours statically-linked runtime packages (punk::lib 0.4.0, punk::repl 0.3.0, punk::packagepreference 0.2.0, shellthread 1.7.0)
- punk_main.tcl captures the runtime static baseline at kit boot: empty-filename [info loaded] prefixes probe-loaded in a throwaway interp (configurable denylist tk*/vfs/mk4tcl/vlerq/tdbc* for side-effecting/composite inits), recording only packages a load actually PROVIDES (diff on provides, not package names - probe loads can trigger index scans) into ::punkboot::static_packages/static_prefixes; the boot interp is seeded with ifneeded {load {} <prefix>} mappings
- punk::lib interp_sync_package_paths/snapshot_package_paths propagate the baseline and seed fabricated interps/threads; punk::repl codethread init (new %staticprefixes%/%staticpackages% scriptmap) and shellthread worker init do the same - the repl code interp on a static runtime resolves Thread again (punk91 = tclsfe-x64 + punk9win.vfs failed with "can't find package Thread"; the appended vfs replaces the stub's //zipfs:/app mount taking its static pkgIndex files with it, and the tclsfe PostInit hook seeds per-interp auto_path only)
- punk::packagepreference static-vs-bundled policy: requiring a baseline package ensures the static mapping and triggers the package unknown scan BEFORE resolution so bundled copies register and the highest version wins (newer bundled reachable, static not masked by older bundled); static registrations excluded from the loaded-shared-object same-version pinning
- composite statics defer correctly: static twapi provides nothing under the probe (script layer lived in the replaced stub zip) so the bundled complete twapi is the resolution; punk91 vfs/vfs::zip warning re-diagnosed as kit content (tclsfe bundles no tclvfs) - recorded in the goal detail, not a seeding defect
- tests: staticseed.test (4) + staticpolicy.test (4) un-gated simulated-baseline units (green 9.0.3 + 8.7); staticruntime.test (4) kit integration behind the capability-probed statickitavailable constraint (probes ::punkboot baseline incl Thread; env PUNK_STATICKIT_TEST_EXE override, default bin/punk91.exe) - 4/4 against the rebuilt punk91; punk902z/full shell tree/full source-tree suite baselines unchanged (exec-14.3 only)
- verification runtime tclsfe-x64.exe pinned in the punkbin artifact repo (separate repo, commit b2dbbe6) with sha1sums + new AGENTS.md scaffolding
- punkshell 0.6.0: CHANGELOG entry; AGENTS updates (src/vfs capture contract, tests indexes incl new punk/lib + punk/packagepreference entries, shell staticruntime contract)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
5 days ago |
|
|
ce2ba184cb |
punk::args 0.5.0 + punk::ns 0.2.0: G-049 parse-status data model + machine-parsable cmdhelp returns
- new punk::args::parse_status: documented status structure from a parse attempt (overall ok / status valid|invalid|incomplete / scheme / message / errorcode minus -argspecs / failureclass / badarg / form / receivednames + per-argument argstatus with class, status ok|bad|unparsed, received count/positions, value-in-effect incl -default fill); validation failures reported in the structure, not raised
- arg_error -parsestatus: both renderers derive goodarg/badarg row marking and choice value-in-effect highlighting from the structure (transient goodargs/badarg locals replaced; built internally from -badarg/-parsedargs when not supplied)
- per-render scheme colour resolution: documented -scheme choice value 'nocolour' now takes effect and scheme renders no longer mutate the shared arg_error_CLR array (strike-only goodarg leak fixed)
- parse: new -caller option overriding the %caller% frame-walk substitution (included in parse cache key); get_dict missingrequiredvalue/missingrequiredleader now carry -badarg (type/allocation failures get badarg marking, not just choice violations)
- punk::ns::cmdhelp: -return dict {origin docid cmdtype args_remaining parsestatus}; advisory parse via parse_status on both alias and main paths; explicit -scheme honoured on the parse-failure render; failure messages name the queried command instead of leaking the internal parse source line at top call depth
- tests: parsestatus.test new (12); usagemarking.test G-049 GAP pins flipped + -parsestatus parity/badarg render tests (17); cmdhelp.test G-049 GAP pins flipped + cmdhelp_return_dict_* (25); punk/args + punk/ns trees green on Tcl 9.0.3 and 8.7; full source-tree suite baseline unchanged (exec-14.3 only)
- punkshell 0.5.0: CHANGELOG entry; src/tests/modules/AGENTS.md test-index blurbs updated
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
6 days ago |
|
|
fe85dfadd0 |
punk::ansi 0.1.2: PUNKARGS argdoc coverage for codetype/sequence_type/ta/ansistring + characterization tests
- 34 documentation-only PUNKARGS blocks added: punk::ansi::codetype (is_sgr_reset, has_sgr_leadingreset, is_cursor_move_in_line, has_all_effective, get_effective_types, is_gx/is_gx_open/is_gx_close, sgr_merge), punk::ansi::sequence_type (is_Fe7/is_Fe/is_Fe8, is_Fp, is_Fs, is_nF, is_3Fp, is_code7/is_code8/is_code, classify), punk::ansi::ta (detect_in_list, detectcode, detectcode_in_list, detect_g0, detect_open, detect_st_open, detect_csi, detect_sgr, split_at_codes, split_codes, split_codes_single, get_codes_single) and punk::ansi::ansistring (VIEW, COUNT, length, trimleft/trimright/trim, INDEX, INDEXCHAR, RANGE, INSERT, INDEXABSOLUTE, INDEXCOLUMNS, COLUMNINDEX). - ::punk::ansi::sequence_type added to the punk::args::register NAMESPACES list - the escape-form classifiers live there (a separate namespace from codetype) and were previously undiscoverable by the doc system. - New characterization suites: ta.test (12 tests - detect vs detectcode lone-CSI distinction, split_codes/split_codes_single/split_at_codes shapes and join round-trip, length/extract), codetype.test (11 tests - reset/leading-reset semantics, effective-state queries incl. bold-via-intensity, sgr_merge, sequence_type classify taxonomy); ansistring.test extended 1 -> 12 tests (INDEX/INDEXCODE/INDEXCHAR/RANGE/INSERT grapheme indexing with merged SGR-prefix tracking incl. end+1 state-after-string, INDEXCOLUMNS/COLUMNINDEX double-wide column mapping via a CJK fixture, INDEXABSOLUTE resolution, styled-whitespace trim, VIEW control-picture substitution). - Tests use literal escape strings (not a+) so results are independent of the punk::console colour state. Origin notes added to the usage-marking suites' local SGR helpers pointing at these canonical mechanisms and their coverage. - src/tests/modules/AGENTS.md child DOX index: entries added for the punk/ansi, punk/args and punk/ns suites (GAP-pin/goal mapping documented). - Verified: 44/44 ansi suite and the full ansi+args+ns sweep (232 passed, 1 pre-existing skip) on Tcl 9.0.3 and 8.7; make.tcl modules clean. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
5d25e2d972 |
shadowing pin-tests for tm tie-break rules; goal G-035 mixed-provision
New suite src/tests/modules/punk/libunknown/testsuites/shadowing/ (7 tests, all pass) pins the .tm same-version shadowing rules verified experimentally 2026-07-06/07: tcl:™️:add PREPENDS each argument (last arg ends at the head of tcl:™️:list); the head of tcl:™️:list wins exact-version ties (single and separate add calls); a higher version wins from any position (order only arbitrates exact ties); and punk::libunknown preserves all of it (scanner parity). Shipped behaviour depends on these rules - the runtests testinterp tm ordering (bootsupport over vendormodules) and punk_main''s package-mode block precedence that G-033''s proj:/kit-first design builds on - so a Tcl or libunknown change that shifts the tie-break now goes red here instead of silently mis-resolving. Goal G-035 (proposed): characterise mixed .tm / pkgIndex.tcl provision of the same package - same or differing versions, under standard package unknown, punk::libunknown and punk::packagepreference, across scan-trigger orderings, forget/re-require crossing forms, and 8.6/9. Converts the standing informal rule ("avoid mixing provision forms for one package - unexpected behaviour even with libunknown''s improvements") from folklore into either substantiated AGENTS.md guidance with named failure modes, or retirement if mixing proves predictable. Discovery work, so goal-specified rather than written now; extends the shadowing suite when implemented. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
330ae00de3 |
G-022 fossil rename goal + move/rename characterization tests; fix shellrun
Goal G-022: scriptable safe fossil move/rename in dev repo (all checkouts repointed, no phantom central config-db entries, no dangling old repo db, project-name renamable with project-code preserved), then rename this project fossil repo shellspy -> punkshell through that mechanism via a G-015 piped script call. New tests src/tests/modules/punk/mix/testsuites/repo/fossilmove.test pin current behaviour in a FOSSIL_HOME-isolated sandbox with an isolation guard: the file-copy + fossil test-move-repository sequence repoints the checkout but leaves the old db file on disk, a phantom repo: entry in the central config-db, and a stale ckout: back-reference; file moves never touch project-name. GAP-marked tests flip when G-022 lands. shellrun 0.1.4: add missing package require punk::args - the 0.1.3 migration left run/runout/runerr/runx calling punk::args::parse without requiring it, which broke shellrun in bare interps and made every src/tests/runtests.tcl run fail at test-file invocation. Full suite now back to baseline (523 tests: 508 pass, 14 skip, exec-14.3 known failure). Project version 0.2.4 (changelog entry for the shellrun fix). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
ed7ed009b4 |
superseded-module pruning with punkcheck DELETE events + virtual version sources
Resolves the build-maintenance TODO: built module trees no longer accumulate superseded intermediate versions, and .punkcheck state stays consistent because every deletion is recorded through punkcheck's event mechanism. punkcheck (0.3.0): - installsource_add_virtual + installevent method targetset_addsource_virtual: 'virtual' named-value SOURCE records (-type virtual -path virtual:<id> -value <v>) compared by stored value, participating in targetset_source_changes. Needed because successive module versions are built from the same physical source files - the recorded virtual module_name/module_version identify which product of the source fileset a target is, at install and delete time. punk::mix::cli (0.5.0): - lib::prune_superseded_target_modules: deletes lower-version .tm siblings only when records prove the same module line (virtual module_name match, or legacy fallback: recorded sources share the keep-version's source folder(s) and name prefix). Unrecorded files are never deleted - reported to stderr instead. - lib::prune_sourcevanished_targets: mirror-prune of recorded targets whose recorded source files no longer exist (layout bootsupport copies, vendormodule copies) - intentional multi-version vendoring is preserved. - build_modules_from_source_to_base prunes after each module install/skip and records virtual module identity sources on installs. make.tcl: - bootsupport: non-glob include_modules.config entries track only the latest version - superseded recorded snapshot versions pruned; project-layout copies mirror-pruned; virtual identity recorded on snapshot installs. Calls guarded (info commands) so a stale bootsupport snapshot degrades to a warning and the two-pass modules+bootsupport bootstrap self-heals. - vendormodule copies in root modules*/ mirror-pruned after install. docs/config: - include_modules.config headers now document the entry format (non-glob = latest-only + prune; glob chars = keep all matches; unrecorded never pruned) - src/AGENTS.md TODO replaced with the durable prune contract; src/bootsupport/AGENTS.md + src/tests/modules/AGENTS.md updated tests: src/tests/modules/punk/mix/testsuites/cli/prune.test (19 tests) covering virtual source recording/comparison and prune identity/safety rules. Suites: punkcheck 64/64, full suite under Tcl 9.0.3 green except pre-existing exec-14.3. payload sync: bootsupport snapshots, project layouts and _vfscommon.vfs pruned of superseded intermediates (~570k lines of stale .tm copies removed). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
df78ff9bb5 |
make.tcl bootstrapping fix, punkcheck refactor and tests
|
2 weeks ago |
|
|
0455efd614 |
startup behaviour,punk::path fixes, AGENTS guidance
|
2 weeks ago |
|
|
43e9aee128 |
cleaner src/tests/runtests.tcl output for agents based on new -report option etc
|
2 weeks ago |
|
|
7fd42ff68c |
src/tests framework
|
2 weeks ago |