Tree:
99af43c8be
master
v0.1a
${ noResults }
42 Commits (99af43c8be221f42e7c12f4ed16173741a2127da)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
99af43c8be |
goals: G-062 achieved archival + archive-loss prevention (sweep rules, backlink markers, goals_lint)
Finalises the G-062 achieved flip staged by the prior session (punkshell 0.12.1): LICENSE.txt (BSD-2-Clause, Julian Marcel Noble 2023-2026) at the repo root, README/punkproject.toml/AGENTS.md license declarations, index record to GOALS-archive.md and detail file to goals/archive/. Archive-loss prevention, from the G-015 incident (its achieved-status verification parenthetical was silently dropped by the 2026-07-11 two-tier restructure's Status-line normalisation; the text is restored to the G-015 archive file's Notes with provenance): - root AGENTS.md 'Doc Restructures': deleted-line conservation check before committing bulk doc migrations, structured-field-normalisation hazard (relocate prose to body sections first), moves separated from edits - goals/AGENTS.md: lintable header field grammar (one line per field, bare Status values), flip-time verification evidence recorded in the body, the archive move content-identical, and a new archive-time reference sweep: pending-tense mentions of the archived goal updated in the live tier, and actionable archived notes pointed to from the affected live goal's Notes - GOALS.md maintenance rules: achieved-flip clause extended to require the evidence write-up and the reference sweep Retroactive reference sweep over all 12 archived goals (25 live detail files): pending-tense fixes (G-002 G-008 G-013 G-016 G-017 G-021 G-022 G-031 G-042 G-044 G-050 - G-017's Goal/Acceptance annotated as gate-satisfied, contract meaning unchanged), forward pointers pushed from archived notes (G-062 license-seeding follow-on -> G-012/G-027, G-037 vendorlib/vfs drift semantics -> G-024, G-058 static-baseline mechanism -> G-005), and one 'Archived-goal references' Notes bullet per remaining referencing file so every live mention of an archived goal is resolvable without consulting the archive index. scriptlib/developer/goals_lint.tcl (new, plain tclsh): validates detail-file header grammar, strict status values in both tiers, orphan rules in both directions, Status/Scope mirror consistency, plus an informational (never fatal) warning for live files referencing an archived goal with no achieved/archive marker - baseline now zero warnings. Root AGENTS.md scriptlib/developer ownership note widened to cover developer utilities. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
3 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 |
3 days ago |
|
|
3d14721d42 |
goals: G-001 achieved 2026-07-11 - archive entry + detail; project 0.11.0
Acceptance verified (consolebackends.test child-process drivers): repls run interactively through ssh-socket and tk-widget ::opunk::Console subclasses with size/at_eof/can_respond answered by the overrides, base class and punk::console unchanged. Detail file records increment 2 and the non-gating residue (per-run output batching, punk/0-only junction wiring, raw-mode untested on foreign consoles, process-global console state -> G-008). Project version 0.10.3 -> 0.11.0 with changelog entry (new user-visible shell capability: repl::init -console). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
3 days ago |
|
|
1fa2988a3f |
make.tcl: dirty-src provenance gate for build/promotion commands (G-026 direction)
Build/promotion commands (project packages modules libs vfs vfslibs bin bootsupport vfscommonupdate) now warn when src/ has uncommitted fossil/git changes - artifacts built from dirty src have no committed provenance. Warn-only by default; new -dirty-abort flag makes the check aborting. With '<builtexe> src' available for evaluating uncommitted source directly, building is the promotion step this treats it as. - punkboot::utils 0.2.0: vcs_dirty_warnings gains optional scope arg so only changes under a subpath (src) count; unscoped vendorupdate call unchanged. - Warnings print with a plain column-0 PROVENANCE-WARNING: token (greppable in redirected output) + ANSI colour, shared with vendorupdate's dirty source-project check, and are recapped at end-of-run via a wrapped ::exit so they survive scrolling chatty build output. - Interactive terminal runs (stdin -inputmode probe, tcl 8.7+/9) get a 3s ctrl-c grace countdown before a dirty build proceeds; piped/agent/CI runs pay no delay. - 'make.tcl check' reports src provenance status and what the build commands would do. - Guarded require: stale/missing punkboot::utils snapshot degrades the check to a skip notice, but -dirty-abort then aborts rather than silently losing the requested strictness. Project 0.10.2 -> 0.10.3. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 days ago |
|
|
3970b8e695 |
punk::libunknown 0.1 -> 0.2.0: adopt major.minor.patch + manual-versioning guidance
Verified nothing depends on the old version or filename before renaming: all 'package require punk::libunknown' sites are unversioned; punk_main.tcl and punk::repl locate the module by globbing libunknown-*.tm and picking the highest by vcompare (so the renamed dev copy now also outversions the stale bootsupport and project.vfs 0.1 copies deterministically, instead of relying on tm path order for a same-version tie); bootsupport's include_modules.config lists it by name only. The 0.2.0 number retroactively versions the two changes shipped against the 0.1 filename earlier today (register_all_tm deep discovery - a minor API addition - and the source_pkgindex sourcing-scope fix). A version-history comment block in the module header now substitutes for the buildversion.txt changelog other modules carry. src/modules/AGENTS.md: the punk::libunknown exception bullets now spell out the manual-versioning mechanics for agents - same Patch/Minor/Major bump rules as buildversion-tracked modules, executed as a file rename plus Meta line, manpage_begin, provide-block and version-history updates, with a check for exact-version/filename dependents before any first bump. discovery.test/libsearch.test: the source-tree libunknown locator now picks the highest libunknown-*.tm by vcompare instead of plain lsort (robust to future version bumps). Verified live in punk902z src: package provide reports 0.2.0, register_all_tm present, lib.search deep discovery intact. Suites green under tclsh90 and tclsh87. Build artifacts synced (root modules/ and _vfscommon.vfs carry only libunknown-0.2.0.tm). punkshell 0.10.2. Stale 0.1 copies remain in src/bootsupport/modules (pending 'make.tcl bootsupport') and src/vfs/project.vfs (pending layout maintenance) - both now cleanly outversioned at runtime. 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 |
4 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
|
4 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 |
4 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 |
4 days ago |
|
|
0d87850873 |
CHANGELOG: repair control-character mangling in the 0.8.1 entry
The 0.8.1 entry was written via a PowerShell interpolated string in which backtick-r and backtick-f in `runtime.cmd`/`fetch` were interpreted as CR/FF control characters. Text now reads correctly with intended markdown backticks. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 days ago |
|
|
f8793b308a |
runtime.cmd (ps1): cached sha1sums fallback backported to list -remote (punkshell 0.8.1)
- list -remote against an unreachable artifact server now warns and compares using the previously fetched sha1sums.txt instead of dying on an unhandled Invoke-WebRequest error (parity with the bash payload); no cached copy -> clear error + return - the fetch path always fell through silently to a cached sha1sums.txt on download failure - it now announces "proceeding with cached copy" (behaviour unchanged, messaging explicit) - fixed latent undefined-variable bug: the list -remote branch created the runtime folder with $container (only defined in the fetch branch) - now $archfolder - bin/runtime.cmd regenerated (checkfile clean, roundtrip pin green 9 pass + 1 skip); verified live: unreachable PUNKBIN_URL -> cached-fallback table renders (tclsfe-x64 "Same version" against the punkbin pin), normal fetch path unchanged Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 days ago |
|
|
e6be532938 |
runtime.cmd: list -remote for the unix payload + PUNKBIN_URL override (punkshell 0.8.0)
- bash/zsh payload gains list -remote parity with the powershell payload: local-vs-server sha1 comparison table (Same version / UPDATE AVAILABLE / not listed on server, plus remote-only entries), falling back to a cached sha1sums.txt with a warning when the server is unreachable (the powershell version has no cached fallback - candidate backport) - both payloads: artifact server base url overridable via PUNKBIN_URL (mirrors/testing - also what makes the new feature testable offline) - first real catch for the 512-byte label guard: the payload growth pushed the template's :exit_multishell target label across a boundary from its callsite (checkfile ERROR at wrap time); fixed with a documented byte-alignment spacer comment at the end of runtime.bash, and the resize-the-spacer workflow recorded in bin/AGENTS.md - bin/runtime.cmd regenerated via scriptwrap (roundtrip pin green; multishell suite 9 pass + 1 skip on 9.0.3 and 8.7); runtime.bash syntax-checked under bash and zsh; windows list/use/run sanity re-verified Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 days ago |
|
|
7f32862d2f |
runtime.cmd: active-runtime selection (use subcommand + active.toml), bash checksum parity, scriptset moved to src/scriptapps/bin (punkshell 0.7.0)
- run no longer launches the last runtime alphabetically: resolution is PUNK_ACTIVE_RUNTIME env override -> bin/runtime/<platform>/active.toml (constrained single-key toml, written by the new 'use <name>' subcommand, marked with * in list, covered by the existing bin/* VCS ignores) -> sole installed candidate -> error listing candidates. First fetch sets active only when none recorded; later fetches never steal it. Stale active (file removed) reported with reselect guidance. - bash/zsh payload fetch reaches checksum parity with the powershell payload: fetches sha1sums.txt, locates the stored hash, skips when the local copy matches, downloads to .tmp and installs only on sha1 match; sha1 tool detection (sha1sum/shasum/sha1/openssl) with refusal of unverified downloads when none present; optional runtime-name argument added (fetch <name>) - fixes: powershell "stored hash from sha1sums.txt" printed an undefined variable ($storedhash -> $stored_sha1); bash MSYS branch invalid assignment (interp = ...); candidate listings for run/list/use exclude .tmp leftovers and non-runtime files (a stray .txt could previously be selected by run) - runtime scriptset sources relocated to src/scriptapps/bin (proper home alongside getzig.*); bin/runtime.cmd regenerated via scriptwrap from the new location - roundtrip test path updated, suite green on 9.0.3 (8 pass + unix-gated skip), runtime.bash syntax-checked under bash and zsh - verified live on windows: multiple-runtimes-no-active errors with candidates (previously silently launched tksfe-twapi-x64), use/list/run against tclsfe-x64 and env override to tclsh902z, fetch no-steal + first-fetch auto-set, checksum-match no-download path - docs: bin/AGENTS.md documents the fetch/use/run contract and updated generated-polyglot workflow paths; src/scriptapps/AGENTS.md scriptset-home wording updated Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 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
|
4 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
|
5 days ago |
|
|
02da46eb74 |
punk::args 0.4.2 + punk::ns 0.1.4: G-046 achieved - deferred display-field expansion, rendering/value-shape fixes
Argument resolution no longer tstr-expands display-only content (-help on @cmd/@examples/argument records, @formdisplay bodies): ${...} there is masked with inert tokens (spec key DISPLAY_DEFERRED) and expanded at display time via private::expand_display_fields (hooks in arg_error/eg/resolved_def/@default copyfrom; separate display cache for non-dynamic defs; @dynamic re-expands per render preserving provider refresh; reentrancy guard substitutes raw sources when expansion of the same id re-enters). First parse of heavily documented commands drops accordingly (punk::ansi::mark_columns first call ~4.3s -> ~12ms; tclcore ::lseq resolve ~184ms -> ~2ms) and -help content that calls punk::args-parsing commands - including against its own definition id - resolves cleanly instead of stalling or looping. -choicelabels stays eager (punk::ns reads it from parse specs in the subcommand walk). Record splitter factored to private::split_definition_records. Also per G-046 acceptance: - @dynamic multiline -help substitutions align at the insertion column (rendering_atdynamic_multiline_help_insertion GAP flipped) - prefix/alias choice normalization keeps single-element-clause values plain-string ({\Deleted} list-wrap shape bug; choicegroups_imap_prefix_shape GAP flipped) - -return string renderer aligns cmd-help continuations under the Description: label (characterization updated) and its Example: line shows the example, not the doc url - punk::ns cmdhelp shows plain info-scheme usage when no argument words are supplied for a leader/value-requiring definition ('i string is', 'i punk::args::define') - advisory parse runs -errorstyle minimal so the discarded error no longer renders a second usage table (timing parity with pre-change: ~5.3s/4.1s on punk91 src) Tests: deferredhelp.test (new); suites green on tcl903 + tcl87; full source-tree run baseline-clean (exec-14.3 only). GOALS.md: G-046 -> achieved 2026-07-10 (activated this session at user direction); design + verification evidence in the detail file. Project 0.4.15. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
383e4e5057 |
punk::args 0.4.1: ensemble autodef loads lazily-registered subcommand argdocs before id_exists checks
First 'i <ensemble>' in a fresh shell (e.g 'i ansistring') rendered the autogenerated ensemble help without subcommand-help markers/choicelabels: ensemble_subcommands_definition tested punk::args::id_exists against argdocs whose registered namespace (::punk::args::register::NAMESPACES) had not yet been lazily loaded - the punk::ns doc-lookup entry path only loads the ensemble command's parent namespace. The generator now runs update_definitions for the namespaces its id checks could resolve in. Self-healed on later calls (autodef regenerates per 'i' invocation), which is why the defect went unnoticed; no prior test pinned the load ordering. Tests: punk/args ensembledef.test (new), punk/ns cmdhelp.test cmdhelp_ensemble_lazy_registered_argdocs. Project 0.4.14. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
5 days ago |
|
|
52dab2457d |
punk::args 0.4.0: internals to private ns, dev-test procs culled, full PUNKARGS coverage; project 0.4.13
Pre-G-046 tidy-up of punk::args:
- deleted dead developer procs define2, parseXXX and the unused ::punk::args::TEST definition
- Get_caller diagnostics renamed __test_get_dict/__test_get_by_id/__test_callers (+ __test1 id)
and lib tstr demo renamed __tstr_test_one - unexported (punk::args::lib now exports {[a-z]*})
- new internal namespace punk::args::private (namespace path punk::args + lib + system):
_get_dict_can_assign_value, _split_type_expression, _check_clausecolumn,
_synopsis_form_arg_display, _argerror_load_colours and lib::_parse_tstr_parts moved there
with underscore prefixes dropped; argerror_load_colours reaches arg_error_CLR* state via upvar
- PUNKARGS definitions added for every remaining exported command (main ns incl. get_dict and
choiceword_match; lib utilities; helpers and argdocbase B/N/I/NI); resolve's empty -help filled;
punk::args::argdocbase added to registered definition namespaces
- tests: punk/args suite 127 pass + 1 known skip, punk/ns suite 28/28 (tcl87)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
5 days ago |
|
|
87eafd63b0 |
Tcl 9.1 compat: punk::lib 0.3.1, punk::args 0.3.2 - lseq TIP 746, safe-interp disassemble; project 0.4.12
TIP 746 (Tcl 9.1) removed lseq's expr-operand behaviour. punk::lib::range (lseq branch) now normalizes int[+-]int offsets via offset_expr so callers like `range 0 [llength $list]-1` keep working (punk::ansi::grepstr broke under 9.1b0, taking example-block highlighting and the punk::args examples.test with it). The lseq branch is also aligned with the tcl8 fallback contract: default 'by' now infers direction (descending ranges previously returned empty under tcl9) and 'by 0' returns empty (Tcl 9.1 lseq changed by-0 to return one element). Direct lseq expression operands expr-wrapped: punk::lib lzipn_tcl9b/c, cols, cols2; punk::args zero_based_posns. check::has_tclbug_safeinterp_compile falls back to interp invokehidden tcl:unsupported:disassemble - Tcl 9.1 safe interps hide tcl::unsupported::*. New modules/punk/lib range.test pins the range contract on 9.0 and 9.1; core tests AGENTS.md documents native-tclsh vs punk-exe exec.test baselines. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
4541944928 |
punk::args rendering/quoting/choicegroups/examples characterization suite; helpers::example [a] fix
Tests-first coverage pass (user-directed) before any changes to the definition-parsing/indentation machinery. punk/args suite: 128 tests, 15 files. - rendering.test (15): nesting independence (plain + tstr definitions render identically regardless of source-block indentation), relative-indent preservation (2-space help and 1-space choicelabel conventions, single and multiline - preservation, not enforcement), -unindentedfields (arg -help works left-margin; @cmd accepts-but-ignores it - GAP pinned), constructed (string-built) definition absolute-indent characterization ('constructed' to avoid confusion with the @dynamic directive), multiline ${[cmd]}/${$var}/ resolved_def insertions (aligned at insertion column, nesting-independent), and @dynamic ${$DYN_X} double substitution: stable across repeated resolutions, provider refresh honoured in help text, choice display and parse acceptance, textblock::frame-style art choicelabels byte-aligned - but multiline -help insertions land lines 2+ at insertion-4 (GAP pinned: the second-round subst path lacks paramindent re-alignment) - choicegroups.test (5): group/-choices union parsing, cross-group prefixes, duplicate-entry dedup, per-group titled choice tables (the punk::imap4 multi-table display), imap4-style {\Deleted}/{$MDNSent} values with labels incl. through tstr-bearing blocks; GAP pinned: prefix-normalization list-quotes special-character choices (exact '\Deleted' stores the plain string, prefix '\De' stores a one-element list) - value shape depends on input style - defquoting.test (3): container quoting rules pinned - braced values fully literal ($, [], two-char \n, bare backslashes), quoted values get Tcl backslash semantics (\n -> newline, \ -> \) with $/[] still literal, and \$\{...\} renders a literal ${...} in tstr-processed blocks - examples.test (6): helpers::example box/title/-tstr toggle (no-dedent direct-call contract pinned), ${[example ...]} insertion into @cmd help (bars at insertion column, content +2, automatic 'Example: eg <id>' row), @examples -> punk::args::eg with #<nodisplay>/@#<nodisplay> stripping (ANSI-tolerant), strip_nodisplay_lines unit, live tclcore ::lseq smoke - punk::args 0.3.1: helpers::example -title path called bare [a] (resolvable only where a punk shell's global alias exists - errored under plain tclsh); now punk::ansi::a. Found by examples.test in the runtests environment. - investigated punk::ansi::mark_columns first-call slowness (3.94s first, 60us after): argdoc -help calls a proc that calls mark_columns, whose parse resolves the same still-resolving definition - hazard already documented in-source with candidate fixes; recorded in CHANGELOG for goal consideration, deliberately not patched - project 0.4.11 (CHANGELOG entry) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
850b7f23cc |
G-040 achieved: punk::args -choicealiases with shared choiceword_match resolver; doc-lookup parity; punk::help topic collapse
Activated and completed under user direction (2026-07-08). Aliases for choice
values are now first-class: accepted at parse, normalized to their canonical
choice in results, folded into the canonical entry in usage display, and
resolved identically by the punk::ns doc-lookup walk.
- punk::args 0.3.0:
* -choicealiases {alias canonical ...} on argument lines; dict shape
validated in the option switch, alias->existing-choice and no-collision
cross-validated after spec merge (surfaces at resolve time - define is
lazy)
* the choice-word matching chain extracted from get_dict into the shared
resolver punk::args::choiceword_match {word nocase allchoices
choicealiases choiceprefix denylist reservelist} -> {matched exact
canonical}; get_dict delegates to it (writeback/lset logic stays at the
call site) - one implementation for parser and doc walk
* exact aliases match under any -choiceprefix/-nocase setting; alias names
join the prefix-calculation pool when -choiceprefix is true; deny applies
to the matched NAME (denied alias requires the full alias; a canonical
reached via its alias is exempt from the canonical's own deny entry)
* display: aliases fold into the canonical entry as an '(alias: x)' /
'(aliases: x|y)' label note (single convergence point covers all render
paths); alias names join the display prefix calculation so highlighted
minimal prefixes stay truthful
* define doc gains the -choicealiases section
- punk::ns 0.1.2: cmd_traverse resolves subcommand words via choiceword_match
- -choiceprefixdenylist/-choiceprefixreservelist now honoured in doc lookup
(the two pinned parity GAP tests flipped to agreement), aliases normalize
before choiceinfo lookup, -nocase honoured in the walk
- punk 0.2.3: punk::help adopts the feature - 'i help' lists one entry per
registered topic (topics+help, tcl, env+environment, console+term|terminal);
topic words accept aliases and unique prefixes with the user-decided
minimum-prefix policy recorded in ::punk::helptopic: denylist {help}
(h/he/hel stay command words), reservelist {c to tc} (fall through to
command lookup; e/en and te/ter fall through naturally as ambiguous).
Argless 'help' output byte-identical to the strict-80 baseline.
- tests: choices.test +5 (alias exact/prefix normalization, noprefix exact-
only, nocase, the punk::help policy matrix, resolve-time validation);
cmdflow.test parity tests flipped from GAP to agreement + alias-traverse and
display-fold assertions (+flowaliased fixture)
- suites: punk/args 98 pass + 1 skip, punk/ns 28 pass, punk/lib 21 pass
- G-040 flipped active -> achieved 2026-07-08; detail file records
implementation and verification
- project 0.4.10 (CHANGELOG entry)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
6 days ago |
|
|
4b591e4e36 |
punk 0.2.2: fold help argdoc texts, narrow 'i help' tables (doc-only)
From interactive review of the help restructure: 'i help' / 'i help <topic>'
usage tables rendered ~160 columns wide. Only the argless 'help' overview is
strictly 80-column - but the rest should stay reasonable, and the usage tables
do not yet wrap to terminal width, so punk::args source line lengths directly
set table width.
- helptopic argdoc help texts manually folded at ~70 columns ('help tcl' was
the worst offender at ~230 chars on one line)
- generated ::punk::help/::punk::help_chunks definitions: basehelp/topichelp/
chunks-note folded; topic choice grid rendered with -choicecolumns 2 (the
largest width contributor)
- dynamically built definitions don't get the file-sourced indentation
normalization - topichelp's continuation over-indented, fixed with an
explicit \n join
- results: i help 68 cols, per-topic 61-65; argless 'help' output byte-
identical to the strict-80 baseline; punk/ns 26 and punk/args 93+1 suites
pass
- future improvement noted in CHANGELOG: automated (potentially language-
dependent) wrapping of help text to available width, e.g. via tcllib's
text-adjust facilities
- project 0.4.9 (CHANGELOG entry)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
7 days ago |
|
|
0505397590 |
G-037 achieved: make.tcl vfslibs propagates vendorlib packages into kit vfs lib_tcl trees; 8.6 kits to tcludp 1.0.13
New 'make.tcl vfslibs' step (also run inside 'make.tcl project' before kit vfs assembly): propagates declared vendored platform-library packages into kit vfs lib_tcl<N> trees, ending the hand-copying that let kits ship a known-buggy tcludp through three make invocations (the G-036/G-037 motivating case). - declaration: src/runtime/vendorlib_vfs.toml, parsed with bootsupport tomlish (no ad-hoc parsing; G-024's mapvfs toml conversion NOT required first - this file is recorded as a candidate for absorption into it). [install.<name>] entries: source (relative to src/), targets (kit vfs lib folders relative to src/vfs/), optional supersedes (folder names removed from each target before install - explicit, no silent mixed-version provision per G-035 concerns). - participation is per-package per-kit; authority is the declaration - nothing syncs undeclared, so the known vendorlib/kit twapi drift is deliberately untouched (resolves the direction/authority design question). - punkcheck provenance at src/vfs/.punkcheck (gitignored, outside kit payloads); skip-if-unchanged proven (rerun: 0 copied, 9 skipped per target); malformed/unresolvable entries fail the build naming the entry (exit 3). - 8.6 kits upgraded (the G-036 loose-end decision, recorded): tcludp 1.0.13 is dual-generation (pkgIndex selects tcl9udp1013.dll on 9+, udp1013t.dll on 8.5+) so the single vendorlib_tcl9 source serves punk8win.vfs/lib_tcl8; superseded udp1.0.12 removed. - verified on rebuilt kits: punksys/punkbi (8.6.13) and punk902z (9.0.2) all report package require udp == 1.0.13 loading the generation-appropriate dll from their vfs; no udp1.0.12 remains under src/vfs; punksys piped-shell exit smoke clean. - G-037 flipped proposed -> achieved 2026-07-08 under user direction (no intermediate active stop). - includes project-build byproducts via established channels: bootsupport snapshots refreshed to punk-0.2.1 / punk::lib-0.3.0 (from today's version bumps) and make.tcl synced into layout copies. - project 0.4.8 (CHANGELOG entry) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
48dccbe8c1 |
G-036 achieved: tcludp thread-exit bug detection (punk::lib 0.3.0 has_libbug_udp_threadexit, surfaced via 'help tcl')
Completes G-036's remaining acceptance item - version-based detection of the vulnerable combination (tcludp < 1.0.13 on Tcl 9 Windows: the per-thread exit handler closes the process-global sockListLock/waitForSock events, silently freezing every other udp-using thread's event loop after any udp-loaded thread exits; root-caused and fixed-by-upgrade in 0.4.3). - punk::lib 0.3.0: has_libbug_udp_threadexit gathers live facts (loaded udp version, else best available registered version discovered without loading the binary via an unsatisfiable package require triggering the index scan) and delegates the verdict to the pure classifier libbug_udp_threadexit_applies (facts in, verdict out - testable). has_libbug_* is the new check family for bundled/vendored library bugs; buginfo dicts may carry a full 'url' reference key for non tcl-core trackers. - punk 0.2.1: 'help tcl' scans has_libbug_* alongside has_tclbug_*, renders the url key when present, and no longer errors on a triggered check carrying a reference without a description (latent unset-indent fix). - new checkbugs.test: classifier combination matrix, live-check dict shape and classifier consistency, and a buginfo-contract test across all existing check procs. - verified: current kit (udp 1.0.13) reports bug=0 with no warning; a simulated triggered has_libbug_* check renders description + url in the help tcl warning block. Suites: punk/lib 21 pass, punk/ns 26 pass. - G-036 flipped to achieved 2026-07-08 (index acceptance REMAINING annotated DONE; detail file gains the Detection section). Open non-gating decisions recorded in the detail file: punk8win (8.6) kit udp 1.0.12 swap; optional upstream tickets for residual tcludp trunk weaknesses. - project 0.4.7 (CHANGELOG entry) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
93730dfda7 |
punk::ns 0.1.1: silence doc-lookup trace puts; -ensembleparameter characterization tests
- commented out five development trace puts in the doc-lookup machinery:
"PROC auto def"/"ENSEMBLE auto def" (generate_autodef) were emitted on STDOUT
and polluted 'i'/'s' output in script/exec contexts (agent-facing per the
G-015 piped-call pattern); "cmd_traverse - skipping to documented subcommand"
(space-form id path), "---> cmd_traverse ensembleparam" (ensemble -parameters
traversal) and "cmd_traverse 10 ... - review" (fallthrough return) were
stderr noise. No functional change.
- cmdflow.test: 8 new tests characterizing ensemble -parameters handling in the
doc-lookup flow (the punk::netbox::man pattern - leading apicontextid before
the subcommand at every ensemble level):
* generate_autodef models each -parameters entry as a -ensembleparameter 1
leader with @leaders min/max = nparams+1 (single- and two-param fixtures)
* cmd_traverse consumes parameter words and resolves the subcommand's
explicit or autodef docid, re-presenting the parameter in args_remaining
so the subcommand's own leader-based definition (as punk::netbox::man's
explicit defs model the curried parameter) can parse it
* nested sub-ensembles with their own -parameters re-consume the curried
parameter at each level
* punk::args::parse treats -ensembleparameter leaders as ordinary named
leaders; cmdhelp renders a documented subcommand's usage through the
parameter (end-to-end smoke)
- suites: punk/ns 26 pass (was 18), punk/args 93 pass + 1 skip (unchanged)
- project 0.4.6 (CHANGELOG entry)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
7 days ago |
|
|
e624bdc057 |
punk::args 0.2.3: fix @opts -any adhoc option crash; forms + validation test coverage
- fixed "@opts -any 1" (arbitrary/adhoc option passthrough): an option not in
the definition crashed get_dict with "can't read argname" at the name-mapping
stage - adhoc opts now fall back to their raw supplied name, under which
argstate/arg_checks were already populated at scan time (real consumers:
vendored tomlish definitions declare -any 1)
- commented out a debug puts stderr (">>>_get_dict_can_assign_value NOT
alloc_ok...") that fired on every failed clause type assignment (visible on
any multiform parse miss; its happy-path twin was already commented)
- new forms.test (8 tests): @form spec structure (form_names, shared
{a b}-prologue blocks), explicit -form by name/index with cross-form
rejection, multiform synopsis rendering, and GAP pins for G-041 - default
parse is effectively form-0-only, -form rejects the documented list-of-forms
usage, and @form -synopsis overrides are stored in the spec but ignored by
synopsis rendering
- new validation.test (11 tests): -type validation matrix, -range/-minsize/
-maxsize, -nocase choice normalization, option -multiple accumulation,
required-option enforcement, unknown-option rejection vs -any adhoc
passthrough (the bugfix's regression test), -- end-of-options marker,
@values -max enforcement, received-key clause ordinals, solos list, and
default-vs-received distinction
- src/tests/AGENTS.md: note that tcltest compares the -body return value -
bodies ending in a loop must end with an explicit 'set result'
- suites: punk/args 93 pass + 1 skip (was 70+1), punk/ns 18 pass; full
source-tree run 569/581 with only the known exec-14.3 baseline failure
- project 0.4.5 (CHANGELOG entry)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
7 days ago |
|
|
e45fea9b16 |
G-040 proposed (punk::args -choicealiases); choice-flow characterization tests; -choice* doc clarifications
- GOALS.md: G-040 punk::args choice aliasing with parse normalization, display folding, and doc-lookup parity (user-approved); detail file records the prefix/deny/reserve collapse analysis from the punk::help work, the cmd_traverse divergence, the c/to/tc minimum-prefix policy question, and the test-first sequencing - new punk/ns cmdflow.test (10 tests): cmdwhich/cmdinfo/cmd_traverse docid flow - direct, via-alias and subhelp-choiceinfo resolution (exact + unique prefix), unknown-word fallback to parent docid, -choiceprefix 0 exact-only, space-delimited ids, cmdhelp -return string smoke; the parse-vs-doc-walk divergence (deny/reserve lists honoured by punk::args::parse, ignored by the cmd_traverse walk) pinned as GAP tests pending G-040 - choices.test: 4 new unrestricted-mode (-choicerestricted 0) tests - prefix normalization to the canonical choice, unknown/ambiguous passthrough, denylist and reservelist passthrough, and the punk::help collapse recipe (prefix+deny+reserve on a -multiple leader) - punk::args 0.2.2 (doc-only): define doc -choice* fields now state the -choicerestricted 0 passthrough semantics, -choiceprefix result normalization + minimal-prefix display highlighting, denylist behaviour for shorter prefixes in both restricted modes, and the reservelist phantom-entry idiom for per-choice minimum-prefix control - suites: punk/args 74 pass + 1 skip (was 70+1), punk/ns 18 pass (was 8) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
68e45c513d |
punk 0.2.0: help system restructured onto ::punk::helptopic topic registry
- each topic (topics|help, tcl, env|environment, console|term|terminal) is a
handler proc returning {channel text} chunks, with its own punk::args
definition (id ::punk::helptopic::<topic>) so 'i help <topic>' renders
documented usage
- registering a topic (re)generates the ::punk::help / ::punk::help_chunks
definitions, so 'i help' shows a documented topic table that always matches
the registry (previously an autogenerated stub); the registry is the seam
for future subshell-declared topics
- 'help topics' derived from the registry (all aliases listed, fits 80 cols)
- no-arg overview and command-fallthrough output byte-identical to before;
80-column layout preserved; verified on tcl 9 and 8.6 kits via the script
and shell subcommands
- 'help env' degrades to a one-line notice when punk::config is not
initialised (e.g. script contexts) instead of an error stack + exit 1
- shared table_block helper destroys table objects after print (previously
leaked several per help invocation)
- project 0.4.4 (CHANGELOG entry)
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
7 days ago |
|
|
a1b232dc0d |
vendored tcludp 1.0.12 -> 1.0.13 in tcl9 kit vfs folders - G-036 wedge remedy - 0.4.3
tcludp 1.0.13 (user-placed in src/vendorlib_tcl9/win32-x86_64) copied into punk9win.vfs/lib_tcl9 and punk9win_for_tkruntime.vfs/lib_tcl9, udp1.0.12 removed (no mixed-version provision). 1.0.12's Windows per-thread exit handler UDP_ExitProc closed the process-global tcludp synchronization events at every udp-loaded thread exit - the G-036 wedge root cause, fixed upstream in 1.0.13 (UdpThreadExitProc + ExitSockets split). Verified: rebuilt punk902z reports package require udp = 1.0.13; G-036 regression batch under wedge conditions (hidden console, syslog-forced runtag logger, mid-session udp worker death) shows run-2 syslog workers all alive - baseline on 1.0.12 was wedged 4/4. The manual vfs copy was required because make.tcl libs/vfscommonupdate/ project do not propagate vendorlib_tcl<N> platform libraries into kit vfs lib_tcl<N> trees (goal G-037). punk8win.vfs (8.6) still bundles udp 1.0.12 - same code, immunity unexplained, swap pending decision. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
63089c7f43 |
script subcommand: match tclsh Tk main-loop behaviour for GUI scripts - 0.4.1
Root cause: Tk registers a main loop (Tcl_SetMainLoop); tclsh''s Tcl_Main services it after the script, so `tclsh gui.tcl` behaves like wish. The script subcommand sourced-then-exited, so a Tk script''s after-callbacks never ran (scriptlib/tktimer.tcl flashed and died; shell was the workaround). Confirmed: native tclsh tktimer 1 blocks ~1.35s; script did 0.38s. Fix: after the script body (success paths only), if a Tk main loop is registered (info exists ::tk_version && winfo exists .), tkwait window . services the event loop until the main window closes, then exit - the script-level equivalent of Tcl_Main. A script that exits from a callback (tktimer countdown) terminates directly. Console scripts have no main loop and exit at once; a script error exits at once (no hanging window). Verified both generations: tktimer via script now blocks the countdown (punk902z 1.49s, punksys 1.57s - Tk present in both) exit 0; tkhello_exit immediate; tk-script-that-errors exit 1 in 0.37s (no hang); tkhello (no self-close) blocks like wish; console script unaffected. Enables G-020 GUI automation via `script` instead of `shell` (noted in G-020 detail). Project version 0.4.1. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
b8371e0587 |
script subcommand: lib:<name> scriptlib support; punk::path 0.2.2 - 0.4.0
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 |
1 week ago |
|
|
935f597c0b |
script subcommand: core-command doc parity (i list works in piped scripts)
app-punkscript loads punk::args::moduledoc::tclcore (catch-guarded, mirroring the punk::repl code-interp setup) so core Tcl commands are documented in script runs as at the repl: `''i list'' | punkexe script` now renders the doc table instead of "Undocumented command". Cost ~40ms; kit script startup ~0.33s. REVIEW note added: the default-punk-shell package set is now expressed in app-punkscript AND the repl codethread setup - consolidation into one shared definition is the G-015-noted follow-on. punk::packagepreference 0.1.1: moduledoc auto-load success notice moved stdout -> stderr (stdout must stay machine-clean for script/exec contexts; the failure branch already used stderr). Verified on both generations (punk902z, punksys): i list doc table on stdout, notice on stderr, timing unchanged. Build-order footnote: lib changes need make.tcl libs before vfscommonupdate - the modules-only first rebuild shipped a stale app-punkscript payload. Project version 0.3.1. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
9316a2f17d |
G-015 achieved: punk executable script subcommand (app-punkscript) - 0.3.0
New lean app package src/lib/app-punkscript behind the (previously stub) script subcommand in punk_main.tcl: - `<commands> | <punkexe> script` runs piped stdin to EOF - no trailing exit needed; `<punkexe> script <file> ?args?` runs a file with conventional ::argv0/::argv (bare non-subcommand first arg still reclassifies to the file form). Script may itself read stdin in the file form. - Default punk shell environment via shared definitions (package punk registers deck aliases e.g dev; punk::aliascore::init adds the utility aliases) - no local alias lists, no boilerplate in piped one-liners. - Honest exit codes: 0 success, 1 on error with errorInfo on stderr, script''s own exit honoured. No shellfilter stacks/transforms, no logging side effects, no interactive fallback (terminal stdin with no scriptname is a usage error, never a blocking read or shell). - Stdin form echoes the script''s final result when non-empty (one-shot eval ergonomics: return-value commands like `dev projects.work <glob>` emit their table without a puts wrapper); file form keeps pure script semantics. Verified on both generations (punk902z/tcl9 from _build - bin deploy was file-locked; punksys/tcl8.6 from bin): piped success/error/exit-code, file form with args and stdin passthrough, missing-file error, motivating one-liner `dev projects.work *tomlish*` emitting the project table with exit 0, `src` mode combination (dev modules load), and `shell` subcommand regression smoke. G-015 flipped to achieved 2026-07-07 per GOALS.md rules; goal detail records the verification and the manual console spot-check item. Project version 0.3.0 (new user-visible shell capability - minor bump). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
b1fc3929dc |
vendor tomlish 1.1.10 (G-014 argdoc precondition met); vfscommon refresh
vendorupdate pulls tomlish 1.1.10 from a clean tomlish checkout: the library API punk::config will consume now carries punk::args (PUNKARGS) documentation - from_toml, to_dict, from_dict, to_toml, update_tomlish_from_dict - completing the G-014 precondition (documentation added upstream in the tomlish project, landed here by re-vendoring, never by editing src/vendormodules copies). 1.1.10 also carries the explicit tomlish::cmdline_main entry point (wrapped-exe startup fix; the load-time argv side effect is gone). vfscommonupdate refreshes the punkshell kit payload to the current built modules: shellfilter 0.2.3 (channel-restoration try/finally), shellrun 0.1.4, punkboot::utils 0.1.1, punk::console 0.7.1 content catch-up, and tomlish 1.1.10. Project version 0.2.7. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
6d01b6e93b |
shellfilter 0.2.3: survive infra errors in run; runtests tm order + Thread path
shellfilter::run now wraps everything between tee-stack add and removal in try/finally so the callers stdout/stderr are always restored, and the decorative stack-status table rendering in log::critical blocks is catch-guarded. Previously an error there aborted the run after diverting the channels and before restoring them, leaving process stdout/stderr broken with all subsequent output silently lost - observed when a stale same-version textblock snapshot (old option-value syntax) called the new punk::ansi sgr_merge_singles inside the stack-status render during tomlish test runs. runtests.tcl: - testinterp tm path order: bootsupport moved to last test_tmlist element so it wins same-version module ties over vendormodules. Rules verified experimentally on Tcl 9.0.3 (identical under standard package unknown and punk::libunknown): tcl:™️:add prepends each argument, head of tcl:™️:list wins same-version ties, so the last element of a single-call add list wins. - testinterp auto_path gains the parent of [info library] so binary packages such as Thread (needed by shellrun) resolve in projects without a root lib_tcl<N>/<arch> payload. Project version 0.2.6. Verified: full shellspy suite at baseline (517 pass / exec-14.3 known); tomlish ported suite 184/184; reconstructed stale-module scenario now completes with captured results and live stdout instead of silent loss. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
d88e1c1759 |
punkboot::utils 0.1.1: move vendorupdate dirty-checkout check into module
Move vendor_source_dirty_warnings out of make.tcl into punkboot::utils as
vcs_dirty_warnings (PUNKARGS-documented, caller-label param so the
bootsupport update path can share it per G-026). make.tcl now uses a
guarded lazy require and degrades to skipped-with-warning if the
bootsupport snapshot lacks the proc - a stale/broken snapshot must never
brick the make.tcl commands used to repair it.
Chicken-and-egg-safe ordering used and now documented in
src/bootsupport/AGENTS.md ("Moving make.tcl functionality into
punkboot::utils"): edit src module + bump buildversion, make.tcl modules,
make.tcl bootsupport, only then repoint make.tcl call sites. Boot-phase
code (path setup, punkboot::lib prompts, package-availability checks)
stays self-contained in make.tcl.
Bootsupport snapshot refresh from the sanctioned pipeline: punkboot::utils
0.1.0->0.1.1, shellrun 0.1.2->0.1.4 (punk::args require fix catch-up),
punk::console 0.7.1 content catch-up; layout mirrors via the
punkcheck-tracked sync steps.
New tests: src/tests/modules/punkboot/utils/testsuites/utils/vcsdirty.test
(git fixture: dirty/clean/dedupe/label/unversioned/missing) - 25/25 across
punkboot suites; vendorupdate verified end-to-end through the module path.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
69d9b8f23a |
vendorupdate: warn when pulling from dirty source checkouts; goal G-026
make.tcl vendorupdate now walks up from each vendor source path to the nearest fossil and/or git root and warns (non-fatal, once per VCS root) when the checkout is dirty - vendored artifacts built from uncommitted source have no committed provenance. Silent for unversioned or missing locations; dual git+fossil roots report each VCS separately. First real run flagged 8 dirty source projects (the tomlish 1.1.7/1.1.8 incident - vendored content whose source history ended at 1.1.6 - motivated this, remedied upstream by tomlish checkin 37b71e82). Goal G-026 (proposed) carries the enforcement follow-on: abort with explicit override, warn-only as configured mode, shared coverage of bootsupport_localupdate, and a recorded decision on the residual staleness gap. Abort-by-default now would block routine work given the dirty-project count. Project version 0.2.5; vendorupdate doc note in src/AGENTS.md. 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 |
|
|
c18b2d9320 |
project version 0.2.3: shellrun runx -debug/--timeout fix + -tcl removal from sh_*
- CHANGELOG: added 0.2.3 entries for shellrun punk::args migration and -tcl removal - punkproject.toml: bumped 0.2.2 -> 0.2.3 (patch: user-visible bug fix in runx) Assisted-by: harness=opencode; primary-model=openrouter/z-ai/glm-5.2; api-location=openrouter.ai |
1 week ago |
|
|
28106ac4b2 |
punk::console 0.7.1: idle-reader hostage guard - fail fast instead of timeout + phantom input
On a tcl 8.6 windows console in cooked (line) mode with a readable handler
armed on stdin - the idle-at-a-line-mode-prompt condition, e.g. a query
fired from an after-script or worker thread while the shell waits for
input - the 8.6 channel driver has a blocking cooked-mode ReadConsole
parked (arming posts it; driver reads sample the console mode at issue
time), so a terminal query's response is swallowed until Enter and then
leaks to the line reader as phantom input. This is the one remaining
hostage window after the 0.7.1 detection fixes and repl 0.2.2 read
discipline: it is the reader legitimately doing its job, so no repl-side
change can remove it (and line mode remains supported for user
scripts/mini-apps even once raw becomes the default).
get_ansi_response_payload now detects the condition before emitting
(cooked + no -inputmode key + twapi console handle + armed readable
handler) and refuses fast with errorcode
{PUNK CONSOLE QUERY HOSTAGE_COOKED_READ} - no emission, no ~500ms timeout,
no input corruption. Mid-command queries (repl reader disarmed) and raw
mode are unaffected. Best-effort by design: a parked read can outlive a
removed handler, so the guard catches the systematic case only. The G-007
routing wrapper now preserves the owner-side errorcode so brokered callers
can discriminate the refusal.
Tests: constraint-gated guard test in probes.test (engages on a real 8.6
console, self-skips on 8.7/9 via the -inputmode key and in piped runs);
ownerrouting.test passes with the errorcode-preserving wrapper. Full suite
at baseline (exec-14.3 only) under Tcl 9.0.3; probes suite also verified
under Tcl 8.6. Project version bumped to 0.2.2 with CHANGELOG entry per
the versioning policy (user-visible failure-mode change).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
c8072d7945 |
Extract punkboot::utils module + tests, bump project to 0.2.1
Move project-version helper procs (parse_punkproject_version, read_punkproject_version, read_changelog_latest_version) out of make.tcl inline definitions into a loadable punkboot::utils module so the parsing logic is unit-testable. - src/modules/punkboot/utils-999999.0a1.0.tm: new module (0.1.0) with the 3 procs in punkboot::utils namespace, PUNKARGS argdoc blocks. - src/modules/punkboot/utils-buildversion.txt: initial 0.1.0. - src/tests/modules/punkboot/utils/testsuites/utils/utils.test: 19 tests covering section tracking, missing fields, wrong sections, whitespace, quote styles, changelog header parsing, pre-release suffixes. All pass. - src/make.tcl: inline procs removed; projectversion block now does package require punkboot::utils and calls punkboot::utils:: procs. - Layout make.tcl files (punk.shell-0.1, punk.project-0.1): same edit; punk.basic keeps inline procs (no bootsupport tree). - include_modules.config: added punkboot::utils entry (main + 2 layouts). - Bootsupport snapshots propagated via make.tcl bootsupport. - AGENTS.md: project version bump 0.2.0 -> 0.2.1 (patch: new make.tcl projectversion subcommand is part of the product surface); added clarifying line that make.tcl command interface warrants at least a patch bump; src/project_layouts/ added to directories agents should not directly modify. - CHANGELOG.md: 0.2.1 entry. Assisted-by: harness=opencode; primary-model=openrouter/z-ai/glm-5.2; api-location=openrouter.ai |
1 week ago |
|
|
717432676f |
project versioning: change-driven bump policy + make.tcl projectversion check
Add a project-level version bumping mechanism for punkshell, tracked in punkproject.toml, independent of individual module versions. - root AGENTS.md: new 'Project Versioning' section with change-driven SEMVER bump policy (patch/minor/major triggers), CHANGELOG.md requirement, advisory enforcement contract, and independence from module versions. - src/AGENTS.md: cross-reference to root Project Versioning section so agents working in src/ discover the rule during their DOX chain walk. - CHANGELOG.md: new repo-root file with initial 0.2.0 entry; latest '## [X.Y.Z]' header must match punkproject.toml version. - src/make.tcl: new 'projectversion' subcommand — read-only, advisory check that warns on CHANGELOG/punkproject.toml version mismatch and on src/ commits since the last punkproject.toml change. Exempt from bootsupport staleness abort (same as 'check'). Self-contained Tcl, no punk deps. Assisted-by: harness=opencode; primary-model=openrouter/z-ai/glm-5.2; api-location=openrouter.ai |
1 week ago |