Tree:
eedcd57ad2
master
v0.1a
${ noResults }
10 Commits (eedcd57ad23811c78f31830a272095b43706ada1)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
f562d13d2e |
G-119: punk-runtime freshness verdict - active vs server default (both payloads)
list -remote now states the relationship between the ACTIVE runtime and the SERVER DEFAULT whenever both are known: explicit freshness: AHEAD/ BEHIND verdicts naming both revisions (BEHIND adds a fetch+use update guidance line), an equivalent current verdict where the (= server default) identity annotation did not fire, a different-series incomparable note, and a stated no-revision-basis note for pre-family actives - with sha1 VALUE-matching against the server sha1sums identifying a byte-copy of a server artifact by content (support-file rows excluded; first ordinal/C-collation match in both payloads). A NO-NAME fetch prints the same verdict as a one-line note when the active diverges from the resolved default (BEHIND carries an inline 'use <default>' hint - the artifact was just fetched). Revision basis: -r<N> parsed from artifact-named actives, else the beside-toml revision field (materialized working copies); the default's revision parses from its defaults.txt name. Verdict lines are byte-identical across the payloads; guidance lines keep each payload's program-name convention. Help text (list/fetch sections) mentions the new surface; bin/punk-runtime.cmd rewrapped (checkfile clean, no spacer resize). New fixture-server suite shell/testsuites/binscripts/runtimecmd_freshness.test: a child-process http file server (new src/tests/testsupport/httpfixture.tcl) serves a crafted punkbin layout behind the PUNKBIN_URL override; the ps1 payload runs as the staged committed .cmd via cmd.exe (wrap-pinned path), the bash payload directly under a probed msys/git bash (on windows the polyglot routes unix shells to the powershell payload; WSL bash rejected - WSL2 cannot reach a 127.0.0.1 fixture server). Covers the five G-119 acceptance scenarios with per-scenario ps1/bash verdict-line parity plus bash-side extras (different-series incomparable, fetch-mode BEHIND hint): 7/7 pass; scriptwrap + binscripts subtrees 32 pass / 1 pre-existing skip / 0 fail (roundtrip, checkfile, WSL, dtplite unaffected). bin/AGENTS.md runtime-manager contract records the verdict surface; src/tests + src/tests/shell AGENTS docs cover the new suite and helper. punkshell 0.21.0 + CHANGELOG entry. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
83d2c6f44c |
G-118 item 11: env-gated hidden-console test for the dorepl console-reopen path
New src/tests/testsupport/consoleinject.ps1: the G-106 recipe's injection half as a committed helper - FreeConsole/AttachConsole to a target pid's console, open CONIN$, type lines as WriteConsoleInput key events. tclshcmd.test: constraint punkconsole (windows + PUNK_TEST_CONSOLE=1; normal runs skip) gates two tests driving the reopen path end-to-end in the child's OWN hidden console (outer Start-Process -WindowStyle Hidden wrapper owns a fresh console; wrapper runs '<kit> tclsh' there with std handles redirected to files; piped code sets dorepl; injected lines + exit 0 finish it). Pinned: reopened flips 0 -> 1 at reopen with istty immutable at 0, inputbuffer published empty, reopen notice silent by default and STDERR-only under TCLSH_PIPEREPL_DEBUG=1, injected exit completes with code 0 - closing the item-1/7 console-side residue. Deadlines + wrapper-tree kill keep the tests hang-proof; the piped-harness HANG RULE stands for everything else. Verified: PUNK_TEST_CONSOLE=1 run 21/21 against punk9_beta; normal run 19 pass + 2 console skips; shell/*** suite 64 pass / 4 skips / 0 fail. AGENTS updates: src/tests/shell (tclshcmd bullet - coverage now exists, refined hang rule), src/tests (testsupport index + .ps1 helpers wording). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
d3cc914a52 |
punk::libunknown epoch-copy unsoundness fix - tkconsole repl failure root-caused (G-098)
Copying ::punk::libunknown::epoch verbatim into a fresh interp/thread carries per-epoch 'added' maps that drive zipfs_tclPkgUnknown's can_skip_sourcing short-circuit - sound only in the interp that performed the scans. Packages the donor obtained at an earlier epoch (or with no unknown call: Thread is baked into thread::create'd threads) are absent from the donor's current-epoch map, so recipients skip their pkgIndex sourcing and requires fail where stock tclPkgUnknown would succeed. Bit deterministically as repl_console_backend_tkconsole under the suite 9.0.5 runtime: 'package require Tk' bumps the epoch pre-init, the codethread inherits the post-bump sparse map, the code interp then can't find vfs/Thread/registry, its init aborts before the G-001 conredirect junction vars exist, and the first pending-collect error left the repl reader inactive until the driver failsafe. Tcl903 escaped only by an accidental extra epoch bump in its code interp (fresh map, full rescan). Fix: punk::lib::libunknown_epoch_export (PUNKARGS-documented) - epoch record with every 'added' map emptied; counters/untracked/scripts/index globs preserved. Used at all four propagation sites (interp_sync, snapshot, repl %lib_epoch%, repl safe-arm). Hardening: the repl pending-collect now tolerates missing junction vars so a code-interp init failure can't wedge the reader. Also: test socketpairs pinned to -myaddr 127.0.0.1 (all-interfaces listens raised windows firewall consent popups for each newly built test exe - user datapoint). Verification: consolebackends 3/3 both runtimes (suite 42s->14s); full runtests sweeps identical on suite runtime and Tcl903: 1037/1021/15/1 with the sole failure exec-14.3 (documented machine baseline). G-098 acceptance sweep met. Pre-existing PUNK_TEST_TK opt-in quirk noted in the goal (silent early end, both runtimes, out of scope). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
bc958300b1 |
G-093 rework: punk::path *** pathglob + separable lattice; runtests passthrough targeting
User-approved contract amendment replacing the day-1 file-relpath filter: one
directory-oriented pathglob semantics at every layer, with the ergonomics gap
closed in the syntax itself.
punk::path 0.4.0:
- *** as a whole segment matches ZERO or more segments (join-aware regex in
pathglob_as_re: an adjacent separator is absorbed into an optional group),
so X/*** = X and everything below - the subtree spelling; ***/f.txt matches
at any depth including the root.
- include separability fix: an exact or single-segment-glob full match no
longer sets allbelow (the deep walk previously dragged the whole subtree in
for X and X/* patterns; the zipfs walk was already separable).
- exclude separability fix (new exclude_state classifier, both walks): only
**|***-tail patterns prune the matched subtree; other matches exclude just
that directory's files - the **/_aside vs **/_aside/** argdoc distinction is
now real. Dead _path_matches_any removed.
- legacy bare-* include collapse removed (a * in -include-paths is the
one-below lattice form, not a match-everything alias; no caller used it).
- globmatchpath default-nocase driveletter exception rewritten as a direct
regex-head rewrite (the regex-text file-split broke on c:/***'s glued group
and accepted non-alpha drives).
- path.test +5 lattice/*** pins (40 total).
runtests.tcl:
- -include-paths/-exclude-paths pass through to treefilenames unchanged;
argdocs teach the separable X | X/* | X/** | X/*** lattice; directory and
file-name axes independent (tails); single-file targeting = exact dir
pattern + file tail.
- -serial-paths reconciled to the same directory-of-file reading (default now
modules/punk/console/*** modules/opunk/console/*** via
runtests_discovery::dir_matches_any) - the pre-existing file-path serial
matching was the other same-option-different-referent divergence.
- per-pattern zero-match stderr advisory (the X/**-for-subtree foot-gun points
at X/***).
- json report emitter: whitespace-padded entier-looking values now take the
quoted-escaped path ('string is entier -strict' accepts surrounding
whitespace - a failed test's "0\n" result_was embedded a raw newline and
truncated the parseable report line).
- testsupport/discovery.tcl now a thin passthrough (requires punk::path
0.4.0-); pathdiscovery.test rewritten to the directory-semantics contract
(22 tests incl. the X/** zero-match advisory characterization); AGENTS.md
targeting guidance swept to /*** across src/tests and src/modules/opunk.
Verification (native tclsh 9.0.3, piped, serialized): 45-probe matrix, path
suite 40/40, runner suite 22/22; vs the pre-G-093 baseline the default
discovery FILE SET differs by exactly the added runner suite and result
parity only by the five new path tests (+ that suite); mode parity -jobs 16
vs singleproc: PARITY ok (94/1037/failed=1 exec-14.3). Goal contract amended
in the detail file; full record there.
Claude-Session: https://claude.ai/code/session_01BNUVVkYq9vHa6G3S9a3XTZ
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
2 weeks ago |
|
|
e5060160b4 |
G-093: runtests file-relpath path targeting - include fix, -exclude-paths, -discover-only
Root cause (recorded in the goal file): punk::path::treefilenames matches -include-paths against the DIRECTORY containing files, and its documented X/** boundary semantics exclude files directly in X - so suites keeping .test files at the subtree root (scriptwrap, binscripts, punkexe) were silently missed by X/** targeting: the G-092 four-pattern (2/13 files) and repeated-flag (zero files) failures. punk::args -multiple accumulation probed healthy - repeated flags and a single space-separated value reach discovery identically; no punk change was needed or made. runtests.tcl now filters the tailbase-relative FILE paths after an unrestricted walk (new testsupport/discovery.tcl: globmatchpath, any-include-match, exclusion wins): X/** includes files directly in X, an exact relative path targets a single file, a bare directory path matches nothing (append /**). -exclude-paths exposed (same syntax and accumulation, exclusion wins over inclusion). -discover-only prints the discovered list plus a RUNTESTS_FILES tcl-list line and exits before any run machinery - subsecond via a two-stage boot (discovery phase loads only punk::args + punk::path; punk/Thread/shellrun/punk::tcltestrun and the testinterp/child path assembly load after the exit). New regression suite runner/testsuites/discovery/pathdiscovery.test (23 tests: pure filter, fixture-tree walk+filter, end-to-end -discover-only children including both G-092 characterization forms; ~7s wall, parallel-safe). src/tests/AGENTS.md targeting wording reconciled; new src/tests/runner/AGENTS.md. G-093 index status proposed -> active (user-directed). Verification (native tclsh 9.0.3, piped Bash context): pre-change baseline default -jobs 16 (93 files / 1010 tests / failed=1 exec-14.3 only) vs post-change -jobs 16 with -exclude-paths runner/**: PARITY ok; post-change default run differs from baseline only by the added suite (+23 passing); mode parity -jobs 16 vs singleproc sequential: PARITY ok (94/1033/1). Claude-Session: https://claude.ai/code/session_01BNUVVkYq9vHa6G3S9a3XTZ Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
7e9eced51e |
lean test children: explicit suite deps, shellrun preload removed (-jobs ~50s)
The multiproc child bootstrap no longer preloads shellrun + the no-op runx warmup: 17 test files gained their missing explicit package require lines (punk::ansi for the bare ansi suites, punk::args for the bare args suites incl dev/dynamic-cache, punk::lib for the lib suites and for grepstr/untabify/examples whose punk::ansi/punk::args commands reach punk::lib internally, plus textblock for examples.test - caught by the empirical lean run: punk::args only soft-requires textblock and punk::args::helpers::example calls textblock::join). Children now load only tcltest plus each file's declared deps; the singleproc testinterp keeps shellrun as the runner's own capture mechanism. Module-web finding recorded in src/tests/AGENTS.md and the test-file comments rather than fixed: punk::ansi and punk::args call punk::lib without requiring it, and a hard back-require is blocked by punk::lib's own hard require of punk::args (cycle) - deps declared at test level; a considered module-level resolution remains open. UDP watch-mode note folded into child_test_runner.tcl per user direction: no interaction today (the parent relays child output at file granularity; verified post-lean - events + relay flow); any future live per-child tee must be conditional on PUNK_TEST_UDPTEE so unwatched children stay lean. Verified (native tclsh 9.0.3): full-suite PARITY ok for lean -jobs 16 vs the pre-lean baseline, between repeated lean -jobs 16 runs, and lean -jobs 1 vs -jobs 16 (989/973/15/1, exec-14.3 sole failure). Timings: -jobs 16 70.7s -> 49-53s; sequential multiproc ~5m30 -> 4m32; singleproc unchanged. AGENTS scaling guidance refreshed. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks ago |
|
|
218fbb1c46 |
runtests.tcl: complete -singleproc 0 multi-process mode + parity harness
Multi-process mode previously execd bare test files with no environment (children died on their first package require) and misreported the crashes as missing-cleanupTests warnings with the stderr discarded. - testsupport/child_test_runner.tcl (new): per-file child bootstrap. Applies a runtests-generated environment payload (prefer latest, test tm paths, auto_path, modpod ifneeded defs, tcltest options; per-file -testdir computed child-side), warms 'clock format' before the module-path wipe (first script-level clock use loads msgcat from the runtime default paths, which the test paths do not supply), and mirrors the testinterp preload: package require shellrun plus one no-op runx -tcl call (runx execution pulls punk::lib; several suites depend on preloaded punk::* commands). - runtests.tcl: generate the payload per run; spawn children via plain exec with file-captured stdout/stderr and immediate-EOF stdin (mechanism reusable for future parallel -jobs scheduling); classify nonzero child exits as file-level failures with the stderr tail surfaced in all report styles (exit-0-no-summary remains the missing-cleanupTests warning); warn under kit executables (children boot with kit-stamped punk packages preloaded, shadowing src dev modules - prefer a native tclsh). - scriptlib/developer/runtests_parity.tcl (new): compares two '-report json' captures on result identity (per-file counts, failure/skip/warning identities; timings ignored), tolerating preamble noise and the ANSI SGR reset emitted on the JSON line. Verified on native tclsh 9.0.3: full suite singleproc vs multiproc PARITY ok (87 files, 989 tests, 973/15/1 with the documented exec-14.3 baseline as the sole failure); crash and warning classification exercised. Wall time ~5m50s in both modes. 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 |
3 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 |
3 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 |
3 weeks ago |