Tree:
d0834c1d05
master
v0.1a
${ noResults }
75 Commits (d0834c1d05b874bde6e8d9863a43cabf44363ba0)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
7ea1deaae5 |
G-030 achieved: make.tcl dogfoods punk::args - tabled usage, declared subcommands, -confirm prompt policy
All 15 make.tcl subcommands are punk::args-declared ((script)::punkboot + (script)::punkboot::<sub>, built from single-source summary/help/opt dicts with shared option fragments and explicit @form -synopsis). Bare make.tcl / -help, 'help ?subcommand?' and '<subcommand> -help' render tabled usage; invalid flags/subcommands raise punk::args usage errors (exit 1) with unambiguous prefix resolution; 'shell' is a declared passthrough. Prompt policy: new -confirm 0|1 (default 1) on every confirmation point (bootsupport minor-staleness gate, vfscommonupdate REPLACE, kit-type mismatch). Default prompts only on an interactive terminal and aborts fast with guidance on non-interactive stdin (::punkboot::lib::stdin_is_interactive; Tcl 8.6 lacks the -inputmode probe and is assumed interactive). -confirm 0 proceeds (staleness, REPLACE) or skips the mismatched kit. The piped-y agent workflow is retired; the old vfscommonupdate decline half-abort (printed done, exit 0) now exits 1. Degrade rule: punk::args/punk::ansi/textblock boot requires guarded; definition load caught with fallback to a self-contained scan (-k/-dirty-abort/-confirm supported) + plain punkboot_gethelp (availability NOTE factored into punkboot_availability_note, shared by both paths); rendering degrades independently of parsing (errorstyle minimal / plain help when the ANSI stack is unhealthy); PUNKBOOT_PLAIN=1 forces degraded mode. punk::args joins the bootstrap-tracked _runtime_deps staleness set (parsing contract only - the rendering stack degrades instead; contract docs updated in src/bootsupport/AGENTS.md + src/modules/AGENTS.md, workflow docs in src/AGENTS.md + src/tests/shell/AGENTS.md). Verified: usage/help/error paths, vfscommonupdate fail-fast and -confirm 0 runs with closed stdin, staleness flag route live (args 0.5.0->0.12.0 tripped the gate), degraded-mode help/check/info, full 'project -k -confirm 0' kit build. Dogfooding finding recorded in the goal file: punk::args 0.12.0 reports generic overflow where 0.5.0 reported choiceviolation for optional-choice mismatches (worked around with required leaders; candidate error-selection improvement). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
49ec22a928 |
doc: restore 'dev doc.validate' - wrap tcllib dtplite as bin/dtplite.cmd
'dev doc.validate' invokes a bare dtplite command which the repl unknown-handler resolves via auto_execok on PATH - no dtplite executable existed (only the legacy misnamed bin/dtplite_run.bat), giving "invalid command name dtplite". - src/scriptapps/dtplite.tcl: LF-converted (polyglot payloads are embedded verbatim into the LF-only multishell output); fall back to the project-vendored tcllib (src/vendorlib_tcl9/<arch>/tcllib*) when the invoking tclsh lacks the dtplite package - src/scriptapps/dtplite_wrap.toml: new scriptset config (tclsh nextshell on all platforms) - bin/dtplite.cmd: generated polyglot via punk::mix::commandset::scriptwrap::multishell (checkfile-clean, LF-only) - src/tests/shell/testsuites/binscripts/dtplite.test: artifact pins (LF-only, checkfile, byte-identical round-trip re-wrap) + execution usecases (usage error, validate good/bad file, validate directory tree, html generation) - 8/8 pass under runtests - AGENTS.md (bin, src/scriptapps): record the dtplite scriptset, its test pin and the LF-only payload requirement - punkproject.toml: 0.12.22 -> 0.12.23 Verified: 'dev doc.validate' in punk902z src validates all 64 src/doc .man files clean. The doctools pipeline remains interim - punk::args is the intended doc source of truth. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
6af0fd541e |
punk::args 0.12.0: formcheck on-demand multiform ambiguity analysis + @form -overlapallowed sanction (G-074 achieved)
New punk::args::formcheck <id> ?-return dict|summary?: reports the form pairs of a multiform definition that some argument list could cleanly match simultaneously (the multipleformmatches inputs). Static pairwise pass over the resolved FORMS enumerates each form's positional word-slot chains (leaders then values; -optional and ?-wrapped clause-member branching; -multiple capped; options excluded - order-free), screens aligned equal-length chains per position (discriminator words via choiceword_match, type witnesses from a small table), and CONFIRMS every candidate witness arglist with a real single-form parse against both forms (parse_status - no raise, no user-supplied words, no define/resolve cost). Findings are therefore witnessed - discriminated form pairs cannot false-alarm; misses (exotic types, option-requiring forms, enumeration caps) are the documented conservative direction. Classes: type_weakness (discriminator aligned with a permissive non-validating type - any/none/string/ansistring/globstring/expr/script) vs structural (forms genuinely share an argument shape). New @form key -overlapallowed <formname-list> sanctions a KNOWN overlap on either pair member: the finding reports with sanctioned 1 and leaves the result's unsanctioned list (the actionable/gate subset). Parse behaviour is never affected; unknown form names are rejected at definition resolve (end-of-forms cycle). @form directive doc updated. tclcore moduledoc 0.3.4: the documented after cancelid/cancelscript overlap (runtime-liveness ambiguity, 0.3.0 record) sanctioned on the cancelid form - ::after now reports zero unsanctioned findings while 'after cancel <id-shaped>' still raises multipleformmatches. ::lseq deliberately unsanctioned: formcheck reports range/start_count (witness {1 count 1}) AND range/count (witness {1 by 1}) - both real, both rooted in the expr-typed end slot, kept visible pending an expr syntax-validating type (G-069/G-070). Tests: new args/formcheck.test (7) - no-finding cases (parse withid/withdef pair, afterish/sharedform fixtures), class+sanction fixture, unknown-form rejection, -return summary, ::lseq/::after pins with witnesses re-verified, sanction parse-neutrality. punk::args suite 210/210, punk::ns 57/57. G-074 achieved and archived (acceptance review in the detail file); G-055 verification gate gains the formcheck step (unsanctioned must be empty for regenerated multiform commands). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
97ca1ceb1e |
punk::lib 0.4.3 + punk::repl 0.5.1 + punk 0.2.6: G-076 dead-console defect in 'help tcl' with mitigated axis, version-gated watchdog (project 0.12.21)
New goal G-076 (active): adopt the upstream tcl9 dead-console fix (ticket f10d91c2d3, root-caused in G-039) via a single version gate shared by the 'help tcl' warning and the repl watchdog arming. - punk::lib 0.4.3: has_tclbug_console_deadspin + pure classifier tclbug_console_deadspin_applies, gate variable check::tclbug_console_deadspin_fixed_in (empty = all Tcl 9 windows runtimes affected). Buginfo dicts gain a mitigated/mitigation axis orthogonal to level; the deadspin check reports mitigated when punk::repl >= 0.5.0 is available to the runtime. - punk::repl 0.5.1: repl::start arms the dead-console watchdog only when the check reports the runtime affected - recording a verified fixed release once flips both consumers. - punk 0.2.6: 'help tcl' renders mitigated warnings subdued (term-grey) with a "(mitigated)" annotation and the mitigation text; severity classification unchanged. - checkbugs.test: classifier truth table, live-check consistency, and mitigated-axis validation in the generic every-check sweep. The fixed_in flip is deliberately deferred until a released Tcl passes the G-039 kill-procedure re-verification (watchdog disabled, clean script-visible eof exit) - recorded as the goal's remaining acceptance item. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
b35ea12896 |
punk::args 0.11.2: bad-@dynamic warn-once + round-1 caching; tclcore 0.3.2: fix malformed tcl_startOfNextWord (project 0.12.19)
User-reported: 'i join' emitted the bad-@dynamic warning 4 times ('i
join test' 6). Root cause was a real inefficiency, not just noisy
logging: a @dynamic definition whose round-1 tstr output has no
round-2 parameters bypassed argdefcache_unresolved entirely, so every
resolve in the 'i' flow (doc walk, advisory parse, get_spec for the
render, synopsis) redid display masking plus the full round-1 tstr and
re-warned. Such definitions now cache as a zero-param unresolved entry
- consistent with the round-1 freezing legitimately dynamic
definitions already get - so later resolves take the cheap cached
branch and the warning emits once per definition per interp.
Warning wording corrected: @dynamic is not a complete no-op for a
parse-inert definition - deferred display fields still re-expand per
render instead of caching - so the message says removal is appropriate
only if that display behaviour is unintended. Sweep of all 462
registered ids: ::split, ::array, ::join carry the parse-inert tag
(left in place pending the display-refresh decision).
Incidental finds from the sweep: the malformed ::tcl_startOfNextWord
tclcore definition (double-quoted -help with unescaped quotes in the
embedded man-page example) failed to resolve at all - now braced per
the define quoting rules, 'i tcl_startOfNextWord' works; and resolve's
malformed-record error path printed dev diagnostics (full records dump
+ ::testrecord global) - commented per the stray-debug convention.
Tests: new args/dynamic.test (warn-once + cached parse, legit-dynamic
round-2 freshness; stderr captured via channel transform). punk::args
203/204 (1 pre-existing skip), punk::ns 57/57. Live-verified: 'i join'
and 'i join test' each emit the warning exactly once (punk902z src).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
5a553b4ff3 |
tclcore 0.3.0: after cancel-id discrimination via harvested id shape (project 0.12.16)
The cancelid and info forms' id argument is typed
stringstartswith(<prefix>) with the prefix harvested from the running
interpreter at define time (safe create+cancel probe; after# on 8.6.11
and 9.0.3) - substituted via a build-time %AFTERIDPREFIX% string map
because tstr placeholders in non-display fields are not expanded for
plain PUNKARGS definitions (G-046 defers display fields only; noted in
G-055 for the regeneration workflow). -typesynopsis id keeps the
synopsis as the man page's 'id'; both ids gain man-page-derived help.
Effect under G-041 form candidacy: 'i after cancel someid' resolves
cleanly to the cancelscript form, matching real Tcl's silent
script-match no-op; 'after info <non-id>' is model-rejected where real
errors at runtime (parity-true). An id-SHAPED word after cancel stays
truthfully ambiguous (cancelid+cancelscript) - real Tcl resolves that
junction by id liveness at runtime, which no static type expresses.
Dead-id over-acceptance on 'after info' recorded as the accepted
runtime-liveness boundary.
Tests: three parity pins added in tclcoreparity.test (id-shape harvest
agreement with live ids, cancel discrimination incl the liveness
ambiguity witness, info error-vs-ok parity + accepted dead-id
divergence). punk::args 201/202 (1 pre-existing skip), punk::ns 57/57.
Live-verified on punk902z src ('i after cancel someid' renders info
scheme).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
4707af6fc2 |
G-041 increment 2: doc surface presents the matching form (punk::ns 0.5.0, punk::args 0.11.0, project 0.12.15)
cmdhelp ('i'): the -form option defaults to * (was 0) with parse's
list semantics, and both render sites present the form the advisory
parse selected - 'i after cancel <id>' presents the cancel form's
argument table with its synopsis line underlined; 'i lseq 0 10 2'
presents the range form info-scheme. When no form matches, the ranked
candidates are passed to arg_error (best candidate's table, all
candidates marked, message naming each form's failure); when several
forms match, all matching forms are marked under the ambiguity message.
punk::ns::synopsis ('s'): trailing argument words after a multiform
command path underline the form(s) they match - matching forms from the
advisory parse's formstatus, or the best candidate when none fully
matches ('s after cancel someid' marks both cancel forms; 's lseq
0 10 2' marks the range form). Ordinal line position maps lines to
declaration-order forms in both full and summary renders; marking is
skipped under alias-currying excess or an explicit -form.
punk::args 0.11.0: the documented @form -synopsis override now renders
in punk::args::synopsis full and summary output (arg_error honoured it
already) - the adjacent forms.test GAP flipped
(forms_form_synopsis_override_rendered). Candidate ranking extended:
form_literal_affinity treats required RESTRICTED-choice arguments as
discriminators via choiceword_match (the tclcore models express
subcommand words as -choices), so 'after cancel' ranks the cancel
forms first instead of falling back to declaration order.
Real-model findings recorded in the goal detail: 'after cancel someid'
is genuinely ambiguous in the doc-faithful model (cancelid vs
cancelscript - real Tcl disambiguates semantically); 'lseq 1 count 5'
ambiguity traces to the expr-typed operands (noted in G-055 as a
model-tightening candidate alongside TIP 746).
Tests: cmdhelp.test gains the multiform doc-surface pins (autoselected
form presented, noformmatch best-candidate table + candidate naming,
synopsis marking present/absent). punk::ns 57/57, punk::args 198/199
(1 pre-existing skip); full source-tree suite in the detail record.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
d85608d685 |
G-041 increment 1: multi-form candidacy engine (punk::args 0.10.0, project 0.12.14)
punk::args::parse/get_dict with the default -form * (or any multi-form selection) now attempts every permitted form instead of effectively parsing form 0 only. Exactly one clean match auto-selects (result gains a 'form' key; 'formstatus' reports every candidate when candidacy ran). No match raises a 'noformmatch' validation error naming each candidate form's first-line failure, ranked best-candidate first (leading-literal affinity with the supplied words, then incomplete before invalid, then declaration order). Several clean matches raise 'multipleformmatches' naming the forms - deliberately no silent preference (recorded in the goal detail); callers pass -form to disambiguate. -form now accepts the documented list of form names/indices across get_dict, parse, parse_status and arg_error via a shared resolver (private::form_selection). arg_error renders the argument table for the first listed form and marks all listed forms' synopsis entries; parse's error render passes the ranked candidate list so the closest form's argument table shows under the no-match message. parse_status: 'form' is now the matched (or best-candidate) form - the per-argument statuses and badarg marking are built for it - and the new documented 'formstatus' key carries per-form status/failureclass/badarg/ message (caller-attributed), the per-form compatibility surface the G-044 completion/hinting consumer needs on partial argument lists. Engine restructure: the single-form parse body of get_dict extracted verbatim to private::get_dict_form (argspecs resolved in the caller's context before selection; no caller-frame use inside - verified). Single-form definitions take the direct path unchanged. Tests: forms.test GAP pins flipped (forms_parse_autoselect, forms_parse_formlist_restriction) plus new coverage: shared-prologue arity discrimination, noformmatch ranking + errorcode payload, multipleformmatches + explicit -form disambiguation, formstatus in results and parse_status. punk::args 198 pass / 1 pre-existing skip, punk::ns 53/53, punk::lib 35/35. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
deb8f17d72 |
G-051 achieved: doc-walk choice-prefix parity + truthful doconly cmdtype (punk::ns 0.4.0, punk::lib 0.4.1, project 0.12.13)
Space-form docid prefix parity: cmd_traverse's space-delimited child
docid jump, on an exact-word miss, now resolves the word against the
current level's choices-bearing first leader via
punk::args::choiceword_match (the shared G-040 resolver - -choiceprefix,
-nocase, -choicealiases, denylist, reservelist honoured) and retries
with the canonical word. 'i string is tr' resolves to the
"::tcl::string::is true" documentation exactly when 'string is tr 1'
executes; 'string is bool' -> boolean; ambiguous ('d'), unknown ('zz')
and denied words stay at the parent exactly when parse rejects them.
resolvedargs records the canonical, mirroring parse normalization. No
second matching rule exists.
Truthful cmdtype: cmdinfo classifies cmdwhich-notfound + non-empty docid
as 'doconly' (was 'notfound') - documentation-only levels below real
commands (per-class ids like "::tcl::string::is true", documented TclOO
method docids; the method case adopts doconly per the recorded design
decision, refinable by G-052). Consumers audited: cmdhelp/synopsis/eg
are docid-driven, cmdtrace tests only for 'proc', punk::help topic
fallback uses cmdwhich; punk::lib script analysis updated in step
(doconly accepted alongside notfound, bucketing unchanged).
Tests: the four G-051 GAP pins flipped and renamed
(cmdhelp_pseudo_command_cmdtype_doconly,
cmdhelp_spaceform_docid_prefix_honoured + ambiguous/unknown guard,
cmdhelp_string_is_true_pseudo_doconly,
cmdhelp_string_is_prefix_honoured). punk::ns 53/53 (cmdflow + non-GAP
cmdhelp unchanged), punk::args 193 pass / 1 pre-existing skip,
punk::lib 35/35; full source-tree suite result in the detail file.
Live verification (punk902z src): 'i string is tr' renders
byte-identical to 'i string is true' except the failure banner echoing
the typed words.
Flip edits: G-051 index entry to GOALS-archive.md (achieved 2026-07-13),
detail Status flipped with acceptance review and verification record,
reference sweep updates G-052 Notes. Detail-file move to goals/archive/
follows as a pure rename; goals_lint transiently unclean between the two
commits.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
72d50f91df |
punk::ns 0.3.0: restore bare-query failure banner in cmdhelp (project 0.12.12)
Regression report (user, vs older punk executables): "i if" / "i while" /
"i foreach" used to render the error-scheme box with a "Bad number of
trailing values..." message signalling the command cannot be called with
no arguments; recent builds rendered plain info-scheme usage with no
indication, while direct punk::args::parse {} withid ::foreach still
errored.
Root cause: deliberate suppression, not breakage - G-046 item 5 (ns
0.1.4) suppressed the failing advisory parse for the whole
no-supplied-words path because the message then carried internal-looking
attribution ("Bad number of leading values for punk::args::parse
$args_remaining ...", the "i string is" complaint). G-049 (ns 0.2.0,
same day) independently added -caller attribution making bare-query
messages accurate - but the suppression stayed, hiding now-useful
signal.
Fix: reversal rather than rewording (user decision) - both cmdhelp
render sites (alias path and main path) drop the no-supplied-words
special case; a failing advisory parse renders its message and error
scheme uniformly, and dict returns no longer rewrite the scheme to
info. "i if" now leads with "Bad number of trailing values for if. Got
0 values. Expected at least 2"; the original "i string is" case renders
an accurate "Bad number of leading values for string is. Got 0 leaders.
Expected exactly 1" instead of being hidden.
Tests: cmdhelp_leader_required_no_args_plain_usage flipped to
cmdhelp_leader_required_no_args_error_render (message present,
attribution never the internal parse); cmdhelp_return_dict_scheme
expects scheme error for the bare-query failure. punk::ns suite 53/53;
verified live in punk902z src.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
d4519f41d3 |
G-071 achieved: punk::args 0.9.0 allocation choice screen - lseq-class optional-element arglists parse in-form (project 0.12.11)
Root cause: get_dict_can_assign_value blanket-satisfied the member check
for any argument carrying choices, so an optional restricted-choice value
(the lseq '..'/'to' noise word) consumed any word whenever arity
permitted, starving later elements/clauses and failing validation with a
confusing trailing-choices error ('lseq 0 10 2' shape).
Fix: an allocation choice screen using choiceword_match (the shared G-040
implementation - exact/alias/prefix/nocase semantics; -choicemultiple
words screened per list member within min/max), applied only where
allocation has an alternative: -optional arguments and further
occurrences of -multiple arguments. Required arguments are deliberately
not screened - the word must fill them and validation's choiceviolation
reporting stays informative (the existing parsestatus/cmdhelp/choices
pins forced and now document both refinements). -choicerestricted 0
behaviour unchanged.
Results: the allocation.test GAPs flipped ('1 2 3' and '1 2 by 3' parse
with correct clause shapes {{} 3}/{by 3}; '1 2 3 4' gets the plain
excess-values rejection instead of blaming the unrelated optional);
prefix normalization survives the screen; all noise-word variants and
if-shape guards unchanged. lseq moduledoc matrix parses per lseq.n under
-form range, and 'i lseq 0 10 2' works end-to-end. Remaining lseq
divergences trace to G-041 form selection or the -type expr laxity
recorded in G-055 - not allocation.
Also corrected an increment-1 mis-premise: parse_status ALREADY accepts
-form before the withid/withdef tail per its documented synopsis - the
probe had passed it trailing. GAP replaced by
parsestatus_form_option_order (correct-order acceptance incl. the form
key, trailing rejection). No code change was needed for that acceptance
clause.
Verification: punk::args suite 193 pass / 1 pre-existing skip / 0 fail;
punk::ns 53/53; full source-tree suite 813 pass / 13 skip / 1 fail =
exec-14.3 only (known baseline) - zero regressions (tclsh 9.0.3; lseq
verification in punk902z src, Tcl 9.0.2).
Flip edits: G-071 index entry moved to GOALS-archive.md (achieved
2026-07-12), detail Status flipped with the acceptance review and
before/after record; reference sweep updates G-041 (prerequisite fixed,
parse_status correction) and G-072 Notes. The detail-file move to
goals/archive/ follows as a pure rename; goals_lint transiently unclean
between the two commits.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
17b8a6dbbd |
G-071 increment 1: allocation characterization suite + retreat-path debug silencing (punk::args 0.8.3, project 0.12.10)
G-071 flipped proposed -> active (user direction 2026-07-12).
New allocation.test (7 tests) with reduced fixtures isolating the failing
shape from the tclcore moduledoc: the lseq-range shape (start ?sep? end
?by-step clause?) reproduces the moduledoc failures exactly. Current
mis-allocation pinned as GAP tests ("1 2 3" -> invalid blaming sep,
"1 2 by 3" -> incomplete blaming end, "1 2 3 4" correctly invalid but
misblaming sep), noise-word variants and the if-shape noise-word clauses
pinned as regression guards, parse_status -form absence pinned as GAP.
Also silenced four more unconditional debug puts on get_dict allocation
retreat paths ((111)/(222)/(333)/(444)) - these printed to stderr during
NORMAL successful parses at every optional-skip retreat, polluting
interactive help/parse output for noise-word-modelled commands. Behaviour
unchanged; the retreat logic they marked is exactly this goal fix target.
Full punk::args suite 193 pass / 1 pre-existing skip / 0 fail (tclsh
9.0.3).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
22606faebe |
G-045 increment 4: punk::args 0.8.0 @normalize directive; define_docs converts as consumer proof (project 0.12.7)
New bare @normalize directive: opts a definition into indent normalization of BLOCK-FORM multi-line field values (first line whitespace-only, as authored by opening a braced literal with a newline). The structural first newline and a whitespace-only trailing line are dropped, the content lines' common leading whitespace is the block's base indent, the first content line is unindented fully and subsequent lines are re-based to the standard 4-space continuation convention (deeper relative indents preserved; whitespace-only inner lines become empty). Fields in a record's -unindentedfields are exempt. Implemented as a resolve pre-pass over the split records (private::normalize_records / rebase_multiline_value); @normalize with options is an error. Head-form values are never altered - their base indent is unknowable (continuations uniformly at 6 may be base-4 with the deliberate +2 relative convention, or base-6 flush; re-basing would flatten the former). The idempotence test caught exactly that on a file-style definition during implementation, narrowing the user-confirmed re-base semantics to block form only - which also makes @normalize a proven no-op on conforming file-style definitions. Consumer proof (punk 0.2.5, per the recorded user decision): ::punk::helptopic::define_docs converts from interim left-margin authoring to indented block-form values under @normalize, dropping its -unindentedfields declarations; 'i help' and 'i help_chunks' verified aligned in punk902z src, including the blank-line separator in the combined basehelp+extra block. Tests: new normalize.test (5 tests: block re-base, block left-margin, head-form boundary, exemption byte-exactness, file-style idempotence); rendering.test P4 characterization stays pinned as the deliberate unopted default with its text updated to reference @normalize. punk::args suite 186 pass / 1 pre-existing skip / 0 fail; punk::ns 53/53; full source-tree suite 806 pass / 13 skip / 1 fail = exec-14.3 only (known baseline) - zero regressions (tclsh 9.0.3). define doc documents the directive. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
52ad1211a2 |
G-045 increment 3: punk::args 0.7.0 - record-continuation token -& (project 0.12.6)
An unquoted trailing -& element on a definition record line continues the
record on the next line. Implemented in
private::split_definition_records: the token is dropped and the next line
joins after a single space with its leading whitespace collapsed - exactly
how the Tcl parser joins backslash-newline continuations before a braced
definition ever reaches the splitter - so a -& record assembles
byte-identical to its backslash-continued equivalent. Motivation:
constructed (string-built) definitions cannot author backslash-newline
ergonomically (the building code's own quoting consumes it); -& is plain
text and survives any construction.
Collision rules (analysis and decision recorded in the goal detail file):
bare word preceded by whitespace (or whole line), trailing whitespace
tolerated; braced/quoted -& is data ({-&} escapes a literal trailing
value); mid-line -&, word-suffix abc-&, and -& inside still-open
braced/quoted values are data. Element-count disambiguation rejected
(action-at-a-distance; positional rule is locally decidable). Backslash
authoring unchanged - continuation is additive.
Tests: new recordcontinuation.test (6 tests) incl. backslash-twin
parse+render byte-equality and the constructed-def chaining case. Full
punk::args suite 181 pass / 1 pre-existing skip / 0 fail; full source-tree
suite 801 pass / 13 skip / 1 fail = exec-14.3 only (known baseline) - zero
regressions (tclsh 9.0.3). define doc documents -& alongside backslash
continuation.
Also recorded: tclparser considered and rejected for the splitter (ANSI
unbalanced-bracket data, dialect semantics outside Tcl grammar, binary
dependency vs G-004); dev-time parse cross-check lint flagged as candidate.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
bb9ff66f51 |
G-045 increment 1: punk::args 0.6.1 - @cmd honours -unindentedfields for -help (project 0.12.4)
arg_error's cmd-help display transform (undent " "+help, max 4 - the '#unindentedfields ?' todo site) is now gated by "-help" membership in the @cmd line's -unindentedfields list, mirroring the existing per-argument gate. The single transform site feeds both the table and string renderers, so left-margin-authored @cmd help renders its first line flush with continuations in both. @cmd -summary carries no indent transform in any renderer, so -unindentedfields for -summary is vacuously honoured. No in-tree definitions set -unindentedfields on @cmd - existing rendering is unchanged. define doc for -unindentedfields now states where the option is valid. Tests: rendering_unindentedfields_cmd_help_GAP flipped to rendering_unindentedfields_cmd_help (aligned expectation, both renderers measured). Full punk::args suite 175 pass / 1 pre-existing skip / 0 fail; punk::ns suite 53/53 (arg_error consumer); make.tcl modules builds clean (tclsh 9.0.3). Also: G-045 flipped proposed -> active (user direction 2026-07-12); progress and remaining-work recorded in the detail file. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week 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 |
2 weeks ago |
|
|
83c1e3e82b |
tests: repl-through-console-backend verification suite (G-001 acceptance)
New modules/punk/repl/testsuites/repl/consolebackends.test drives an interactive repl through TestConsole (chan pipe pair), SshConsole (socket pair with a scripted remote terminal answering CSI 6n - size 100x30 resolved over the socket) and TkConsole (wired text widget; self-gates on Tk availability in the child) to a clean exit: prompt-by-prompt conversation, results, diverted code-interp stdout/stderr. Each case execs testsupport/repl_console_driver.tcl in a child tclsh - a repl cannot run inside the shared runtests testinterp because the codethread's quit/exit callbacks thread::send to the thread's MAIN interp (documented in src/tests/AGENTS.md). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks 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 |
2 weeks 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 |
2 weeks 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
|
2 weeks ago |
|
|
3bafc2f195 |
GOALS + src/tests: test provenance comments and superseded/abandoned test-sweep rules
- src/tests/AGENTS.md: agent-added tests carry a one-line provenance comment `#added <YYYY-MM-DD> (agent[, G-<id>])[ - <short note>]` - immutable facts only (never "G-NNN will flip this" expectations, which live in _GAP_ test names and goal files); user-added tests optional; no bulk retrofit of existing suites. Rationale: provenance must survive where VCS history does not travel - packaged test modules (G-029), git+fossil dual history, file regeneration/moves - GOALS.md maintenance rules: marking a goal superseded/abandoned includes a test sweep - grep G-<old id> (at minimum src/tests) plus the tests named in the goal's detail-file Acceptance, and record each test's disposition (transfers to the superseding goal / stands down to plain characterization / lapses) in the appropriate detail file; the sweep never deletes, skips, or weakens tests on its own - the provenance lines are what keep the supersession sweep's grep reliable over time; closes the dangling-GAP-pin risk analyzed for superseded goals - no project version bump: governance docs only Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
ae04b3f8c9 |
GOALS: two-tier index restructure - summary-only GOALS.md, canonical Goal/Acceptance in detail files, archive-on-flip
- GOALS.md collapsed to summary entries (ID/status/title/Scope/detail pointer): 104.6KB -> 23KB so a full read stays cheap; Scope lines kept verbatim so path-grep goal discovery still works - canonicality split: index canonical for ID/status/title/Scope, detail file canonical for Goal:/Acceptance:; all 61 detail-file headers reconciled from the index (fixes stale copies, e.g. G-036 detail acceptance predated the achieved rework), bodies preserved untouched - detail files created for the three index-only goals G-017, G-034, G-054; every goal now has one - 10 achieved goals (G-007 G-015 G-036 G-037 G-040 G-046 G-049 G-054 G-058 G-059) archived: summary records appended to GOALS-archive.md, detail files moved to goals/archive/; archive-on-flip replaces the ~30-achieved-entries trigger - GOALS.md preamble/rules reworked: read workflow (read index in full, then detail files of scope-intersecting goals before editing), contract spans both tiers with proposal-first unchanged, next-free-ID counts the archive, achieved flip judged against the detail-file Acceptance and includes archiving - progress convention codified from G-001 increment-1 practice: index entries carry status only, never progress; incremental progress lives in the detail file's ## Progress section (landed/remaining); achieved flip requires the remaining-work list resolved - a partial increment never flips a goal - goals/AGENTS.md rewritten for the split (required 4-field header, one detail file per goal, orphan rules covering archive/); root AGENTS.md Child DOX Index + Repo-wide Notes updated; GOALS-archive.md preamble updated - stale detail-file paths updated to goals/archive/ in src/lib/app-punkscript/punkscript.tcl (comment), runtimebash_wsl.test, wslprobe.tcl and the G-042 detail file; propagated copies (root lib/, src/vfs/_vfscommon.vfs, src/_build) left to refresh via normal build steps - no project version bump: governance docs and source comments only, no user-visible shell behaviour Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks 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 |
2 weeks 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 |
2 weeks 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
|
2 weeks 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 |
2 weeks 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 |
2 weeks 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 |
2 weeks 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
|
2 weeks 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
|
2 weeks 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 |
2 weeks 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 |
2 weeks ago |
|
|
22dd6d5407 |
runtests.tcl: -include-paths -multiple 1 - repeated flags accumulate (last-wins footgun fixed)
- Repeated -include-paths flags previously overrode each other silently (standard
non-multiple punk::args opt semantics), quietly narrowing the test selection
while reporting green - a recurring misuse driven by Unix-CLI accumulate-flag
muscle memory (gcc -I / curl -H style).
- The option is now -multiple 1: repeated flags accumulate, the single
space-separated quoted list form is unchanged, and the unreceived default {**}
passes through (the consumer flattens occurrences with concat). Help text
documents both forms as equivalent.
- src/tests/AGENTS.md work-guidance updated. Known remaining sibling issue:
multiple trailing file-tail globs still silently match 0 files.
- Verified: repeated-flag and single-list invocations select identical file sets
(20 files / 189 tests) on Tcl 9.0.3, repeated-flag accumulation on 8.7, and a
no-flag default run with a file-tail glob unchanged. The general strict-arity
mechanism is proposed as G-053.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
2 weeks 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 |
2 weeks ago |
|
|
83b7e2a0de |
punk::ns 0.1.3: usage-marking characterization tests (usagemarking.test, cmdhelp.test) + cmdhelp subcommand doc fix
- punk::args level (usagemarking.test, 14 tests): pins -parsedargs/-badarg/-scheme marking primitives, goodchoice highlighting of selected and default-in-effect choice words, and scheme border selection - asserted by SGR-parameter subset against the live colour arrays. GAP pins for the documented -scheme choice 'nocolour' falling through to 'na' (renders with the previous scheme's leftover colours) and the dash-spelling '-nocolour' leaking strike-only goodarg into the shared colour array (G-049 candidates). - punk::ns level (cmdhelp.test, 19 tests): pins scheme selection (error scheme on failed parse of supplied args, info scheme + goodarg marking on success), badarg marking via choiceviolation, the early alias-resolution branch, -return string parity, goodchoice highlighting through cmdhelp, and the cmdinfo result shape. GAP pins: pseudo-command cmdtype 'notfound' despite resolved docid + space-form docid exact-word-only jump (G-051; real 'string is true'/'is tr' pins behind the have_tclcoredocs constraint), TclOO undocumented-method class-summary fallback with info-scheme parse of bogus args (G-052), synopsis marking absence and curried-alias braced-target substitution (G-050), explicit -scheme ignored on the parse-failure path and caller-attribution leaking cmdhelp's internal parse source line at top-level call depth (G-049). - punk::ns 0.1.3 (doc-only): cmdhelp 'subcommand' argument help rewritten - was described as ensemble-subcommands-only; now covers tcl::oo methods and argument words, and documents the info/error scheme display driven by argument validity. - Verified: full punk::args + punk::ns suites green on Tcl 9.0.3 and 8.7. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
5fd3bf9330 |
runtests.tcl: expose kit-internal lib trees to the testinterp auto_path
The testinterp replaces auto_path wholesale (project src/lib dirs, root lib_tcl<N>/<arch>, [info library] + parent). Under a kit executable that parent is e.g //zipfs:/app, and tclPkgUnknown scans only an entry plus its immediate children - so kit-bundled packages under //zipfs:/app/lib_tcl<N>/ <pkg> (e.g tcllib's tcl::chan::fifo2, required by the shellrun harness at testinterp setup) were unreachable. Unnoticed in punkshell because the project's own root lib_tcl9/win32-x86_64 carries tcllib2.0; projects without that payload (e.g tomlish) failed every file at 'package require shellrun' when run under a punk kit exe. Now the kit's internal lib/lib_tcl<N> dirs are appended when present, mirroring the internal-path classification in src/vfs/_config/punk_main.tcl: zipfs app mount, tclkit ::tcl::kitpath exe dir-shadow, cookfs //cookit:/ volume (default mount name only, as per punk_main.tcl). No-op under native tclsh. Verified: punk902z + tclsh902z suites pass; classification probed OK under tclkit 8.6.17, punk9cook (cookit), punk91 (zipfs 9.1), native Tcl903; tomlish suite under punk902z/punk91 goes 0 -> 149/149 with the same edit. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
6d8228c2f8 |
runtests.tcl: default tcltest -tmpdir to a self-cleaning system-temp dir
makeFile/makeDirectory output previously landed in the working directory - aborted core exec.test runs littered src/tests with untracked helper files (cat, echo, gorp.file ...). Unless -tcltestoptions supplies -tmpdir, a fresh directory from 'file tempdir' (TMPDIR/TEMP/TMP + pid fallback for tcl 8.6) is configured and deleted before exit; a hard-aborted run now leaves litter in the OS temp area rather than the source tree. Takes effect in single-process mode; multi-process mode still does not forward tcltest options to child processes (pre-existing todo). Contract documented in src/tests/AGENTS.md. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks 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 |
2 weeks 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 |
2 weeks 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
|
2 weeks 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 |
2 weeks 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
|
2 weeks 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
|
2 weeks 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 |
2 weeks 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 |
2 weeks ago |
|
|
25e45e0cce |
tests: scriptexec.test for the script subcommand; scriptlib/_punktest fixtures
Adds src/tests/shell/testsuites/punkexe/scriptexec.test (12 tests, all pass) covering app-punkscript / the script subcommand (G-015): piped execution and honest exit codes, error->exit 1, exitcode propagation, stdin result echo, default-env dev alias present without boilerplate, file-form argv passing, the lib:<name> scriptlib mechanism (subpath, extensionless, bare-arg reclassification, not-found location listing), and the tclsh-matching Tk main-loop behaviour (0.4.1): a serviced after-callback runs and exits, a no-exit GUI script stays alive, an errored GUI script exits promptly without hanging. Reuses the shellexit.test built-exe harness pattern (pipe stdin, half-close for EOF, timeout+force-kill) so runs are hang-proof; Tk cases gated by an auto-detected punktk constraint (probes whether the kit loads Tk). Full shell suite: 19 pass / 2 skip (console-only punkgoals) / 0 fail. lib:/Tk cases resolve committed fixtures under scriptlib/_punktest/ - a lib:-resolvable fixture cannot live in a tcltest temp dir since resolution only searches scriptlib locations relative to the exe. The subfolder is test-owned (README + do-not-edit fixture headers); root AGENTS.md carves it out as the one agent-manageable exception to scriptlib being user-only. No project version bump - tests/docs/fixtures only, no shipped shell behaviour change. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks 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 |
2 weeks 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
|
2 weeks 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 |
2 weeks 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
|
2 weeks ago |