punk-runtime list -remote identity columns (G-119 follow-on, user-directed)
The starred active row previously never changed across 'use' switches
(every -rN materializes to the same working name) and carried the
name-keyed dead end '(not listed on server)' - true of the name,
unexplanatory for a working copy whose bytes match a server artifact.
Rows the server listing does not name now carry an untitled identity
middle column: from=<artifact> for materialized working copies (the
beside-toml source; content verified against that artifact's server
sha1 so the Remote cell shows a real status - Same version, CONTENT
DIFFERS for the immutable-artifact anomaly, or '(artifact not listed
on server)'), sha1=<name> for tomlless byte-copies (default-first-
then-ordinal pick, the same rule as the freshness fallback so row
identity and freshness verdict always name the same artifact).
'(not listed on server)' remains only for genuinely unknown files;
the (server default) row annotation follows artifact identity onto
working copies of the default. Table header/rules widened to the
three-column layout, payload row formats now column-aligned across
ps1/bash; help text updated; bin/punk-runtime.cmd rewrapped
(checkfile clean).
Chosen shape (user-approved from mockup variants): untitled middle
column with self-keyed from=/sha1= tags - consistent with the plain
list metadata summary's from= vocabulary and self-describing when a
row is pasted without its header.
runtimecmd_freshness.test +3 row-shape tests (identity columns, the
identity-following default annotation, anomaly statuses) with ps1/bash
parity: 10/10 pass; scriptwrap + binscripts battery 35 pass /
1 pre-existing skip / 0 fail (roundtrip + checkfile pins green, WSL
row pins unaffected). bin/AGENTS.md + shell tests AGENTS updated.
punkshell 0.22.0.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
@ -22,7 +22,7 @@ Tests for shell-level behavior, command-line execution, and stdin/stdout interac
- punkexe tests run against the built binary: after changing punk::repl or app-punkshell source, rebuild via `make.tcl packages`, `make.tcl vfscommonupdate -confirm 0` (unattended runs must pass the flag - the REPLACE confirmation aborts fast on non-interactive stdin instead of reading a piped `y`), then `make.tcl project` before trusting results; `make.tcl project` alone does not refresh `_vfscommon.vfs`.
- `testsuites/punkexe/tclshcmd.test` covers the `tclsh` subcommand (punk_main.tcl dispatch): script-file sourcing (argv0/argv/info-script state, honest exit codes incl. explicit exit), piped no-arg stdin evaluation, stock argument forms (leading `-` arg = no script, all args stay in `::argv`; `-encoding name file` sources with the named encoding, incomplete `-encoding` forms fall through to argv; verified byte-level via a utf-8/iso8859-1 fixture), the `lib:` refusal (plain-tclsh semantics - pointer to the `script` subcommand, exit 1), and - on kits built on a TCLSH_PIPEREPL-patched runtime (G-096/G-103, see `src/buildsuites/suite_tcl90/patches/README.md`) - the piperepl launch-state contract: ::tclsh(istty) published, piped script-arg launch state all-zero, unconsumed piped input NOT evaluated unless the script sets `::tclsh(evalinput) 1`, and the script's right to consume stdin itself; plus the degraded-mode notice on unpatched runtimes. Patched-kit resolution: `env(PUNK_PIPEREPL_TEST_EXE)` if it probes as patched, else the punkexe if patched, else `bin/punk9_beta.exe`/`bin/punk9bi_beta.exe`. HANG RULE: no PIPED test or fixture may set `::tclsh(dorepl)` - that path reopens stdin from the console (CONIN$) and blocks under the piped punk_run harness. Console-reopen coverage exists but is env-gated (G-118 item 11; constraint `punkconsole` = windows + env `PUNK_TEST_CONSOLE=1`, normal runs skip): two tests drive the dorepl path end-to-end in the child's OWN hidden console per the G-106 recipe - an outer `Start-Process -WindowStyle Hidden` powershell wrapper owns a fresh console and runs `<kit> tclsh` there with std handles redirected to files, then `testsupport/consoleinject.ps1` attaches to that console and types the verification lines + `exit 0` as key events. They pin: `::tclsh(reopened)` flips 0 -> 1 at reopen while `istty` stays 0 (immutable launch fact), `::tclsh(inputbuffer)` appears empty (the repl loop consumed all piped input), the reopen notice is silent by default and appears on STDERR only under `TCLSH_PIPEREPL_DEBUG=1`, and the injected exit completes the process (exit code 0). Deadlines plus wrapper-tree kill keep them hang-proof.
- `testsuites/binscripts/runtimebash_wsl.test` (G-059) exercises the punk-runtime.cmd unix payload (`src/scriptapps/bin/punk-runtime.bash`) through WSL: active/use/run resolution, env override, stale-active guidance, single-candidate fallback, and `list -remote` local-vs-server comparison (offline via a crafted cached sha1sums.txt + `PUNKBIN_URL` pointed at an unreachable address). Gated by the `wsllinux` capability constraint from `src/tests/testsupport/wslprobe.tcl`; all execution happens in a WSL-native staging dir, and a final test asserts the Windows checkout's git status is unchanged by the run.
- `testsuites/binscripts/runtimecmd_freshness.test` (G-119) exercises the punk-runtime freshness verdict (active-vs-server-default: current/ahead/behind/incomparable) in BOTH payloads against a fixture punkbin server: a child-process http file server (`testsupport/httpfixture.tcl`) serves a crafted layout (defaults.txt, sha1sums, artifacts + metadata tomls) via the `PUNKBIN_URL` override, with all execution in a tempdir staging area on a fixture platform folder (`testplat-x86_64` - the real `bin/runtime` store is untouched). The powershell payload runs as the staged committed `bin/punk-runtime.cmd` via cmd.exe (the wrap-pinned path); the bash payload is driven DIRECTLY under a probed msys/git bash (uname MINGW*/MSYS*; WSL bash is rejected - under WSL2 it cannot reach the 127.0.0.1 fixture server, and on windows the polyglot routes unix shells to the powershell payload anyway). Asserts the G-119 acceptance scenarios (ahead/behind+guidance/current-annotation/pre-family no-basis and hash-identity/no-name-fetch note) with ps1-vs-bash verdict-line parity. Gated by capability constraints (windows, committed cmd, bash source, certutil, msys bash, fixture server started); skips cleanly elsewhere.
- `testsuites/binscripts/runtimecmd_freshness.test` (G-119) exercises the punk-runtime freshness verdict (active-vs-server-default: current/ahead/behind/incomparable) in BOTH payloads against a fixture punkbin server: a child-process http file server (`testsupport/httpfixture.tcl`) serves a crafted layout (defaults.txt, sha1sums, artifacts + metadata tomls) via the `PUNKBIN_URL` override, with all execution in a tempdir staging area on a fixture platform folder (`testplat-x86_64` - the real `bin/runtime` store is untouched). The powershell payload runs as the staged committed `bin/punk-runtime.cmd` via cmd.exe (the wrap-pinned path); the bash payload is driven DIRECTLY under a probed msys/git bash (uname MINGW*/MSYS*; WSL bash is rejected - under WSL2 it cannot reach the 127.0.0.1 fixture server, and on windows the polyglot routes unix shells to the powershell payload anyway). Asserts the G-119 acceptance scenarios (ahead/behind+guidance/current-annotation/pre-family no-basis and hash-identity/no-name-fetch note) with ps1-vs-bash verdict-line parity, plus the identity middle column row shapes (2026-07-25 follow-on): `from=<artifact>` working-copy rows with content-verified Remote statuses (Same version / CONTENT DIFFERS / artifact-not-listed), `sha1=<name>` byte-copy strays, and the identity-following `(server default)` row annotation. Gated by capability constraints (windows, committed cmd, bash source, certutil, msys bash, fixture server started); skips cleanly elsewhere.
- `testsuites/punkexe/staticruntime.test` (G-058) targets a kit built on a runtime with statically-linked packages: resolved from `env(PUNK_STATICKIT_TEST_EXE)`, else `<projectroot>/bin/punk91.exe`, gated by the capability-probed `statickitavailable` constraint (a probe run must show a captured `::punkboot::static_packages` baseline including Thread - not mere file existence). It asserts repl boot without the codethread Thread failure, Thread resolution in the code interp / fabricated interps / snapshot-seeded threads, and twapi resolution per the static-vs-bundled policy. The verification runtime (tclsfe-x64.exe) is pinned in the punkbin artifact repo so the constraint is satisfiable off the original dev machine. Kit script-exec paths must be passed with forward slashes.
- GOAL tests (constraint `punkgoals`, enabled by env `PUNK_TEST_GOALS=1`) cover the piped-stdin-then-interactive-shell drop-in (`shellpipe_eof_then_interactive_shell`, `shellpipe_script_and_eof_then_interactive_shell`); they are excluded from normal runs because they require an openable console in the test environment and briefly attach a live shell to it - they pass in console-attached environments against a current build.
- The eof-policy discriminator is `env(PUNK_PIPE_EOF)` (`exit`|`interactive`|unset=console heuristic) implemented in app-punkshell; termination-guard tests spawn children with `exit`, goal tests spawn with it unset.
#identity middle column (from=/sha1=) so the salient starred row changes with
#every 'use' switch and the Remote column carries a real server relationship
test runtimecmd_freshness_identity_columns {rows the server listing does not name carry identity: from=<artifact> on a materialized working copy (starred) and sha1=<name> on a byte-copy stray, both with a real Remote status - the dead-end '(not listed on server)' no longer appears for identified rows - both payloads}\
stage_file oldkit.exe [dict get $artifacts fakert-alpha-r2.exe]
set_default fakert-alpha-r1.exe
}\
-body {
foreach r [list [run_cmdroute list -remote -platform testplat-x86_64] \
[run_bashroute list -remote -platform testplat-x86_64]] {
set out [dict get $r output]
lappend result [dict get $r exit]
lappend result [regexp {\* fakert-alpha\.exe\s+from=fakert-alpha-r2\.exe\s+Same version} $out]
lappend result [regexp {oldkit\.exe\s+sha1=fakert-alpha-r2\.exe\s+Same version} $out]
lappend result [string match "*(not listed on server)*" $out]
}
set result
}\
-cleanup {
}\
-result [list 0 1 1 0 0 1 1 0]
test runtimecmd_freshness_identity_default_annotation {the (server default) row annotation follows artifact identity: a working copy materialized from the default artifact carries it on the starred row - both payloads}\
foreach r [list [run_cmdroute list -remote -platform testplat-x86_64] \
[run_bashroute list -remote -platform testplat-x86_64]] {
lappend result [dict get $r exit]
lappend result [regexp {\* fakert-alpha\.exe\s+from=fakert-alpha-r1\.exe\s+Same version\s+\(server default\)} [dict get $r output]]
}
set result
}\
-cleanup {
}\
-result [list 0 1 0 1]
test runtimecmd_freshness_identity_anomaly_statuses {identified working copies surface anomalies: content differing from the immutable source artifact reports CONTENT DIFFERS, and a source artifact absent from the server listing is stated - both payloads}\
-constraints $C\
-setup {
set result ""
variable artifacts
reset_stage
#working copy claiming r1 provenance but carrying r2 bytes (modified local
#copy / mismatched sidecar - artifacts are immutable, so never an "update")
stage_file fakert-alpha.exe [dict get $artifacts fakert-alpha-r2.exe]