Tree:
bd6b08275b
master
v0.1a
${ noResults }
16 Commits (bd6b08275b64da6e85a1215cd956a2c28a5293ed)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
ee3ed05923 |
punk-runtime: dependency-free sha1 hashing in the powershell payload (Get-FileHash field failure)
Field report (jcross1, Windows PowerShell 5): Get-FileHash not recognized during list -remote while Write-Host/Invoke-WebRequest worked. Root cause class: Get-FileHash is a SCRIPT-defined function in PS 5.1's Microsoft.PowerShell.Utility, resolved via PSModulePath autoload - a damaged PSModulePath (pwsh7 path pollution, overridden env, redirected user module dirs) removes it while the module's compiled cmdlets keep working. Effects were wrong results, not just noise: spurious UPDATE AVAILABLE rows (null local hash) and fail-closed fetch verification. New Get-PunkFileSha1 computes sha1 via .NET (SHA1.Create over a stream, lowercase hex) at all three former Get-FileHash sites; works on any PowerShell edition/state incl FIPS, and emits a one-time informational note when the damaged condition is detected (chosen over detect-and-offer-install/env-repair: nothing to install once the dependency is gone, and persistent environment mutation from a fetch tool is disproportionate). Bash payload already probes sha1sum/shasum/sha1/openssl - unchanged. bin/AGENTS.md records the no-script-module-cmdlets payload rule. Verified: hash parity with Get-FileHash under powershell 5 and pwsh 7; list -remote via the rewrapped .cmd (correct Same-version rows); damaged-PS simulation (probe forced unresolvable): note printed once, zero errors, hashing correct; scriptwrap roundtrip pin runtimecmd_roundtrip PASS (payload + regenerated bin output committed together). CHANGELOG bullet added under the in-flight 0.19.0 entry (rides the user's pending release-notes commit). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
640d53f7cb |
bin/AGENTS: record .cmd-extension invocation guideline for future user-facing docs
User policy 2026-07-22: doc examples for the polyglot bin utilities show the .cmd extension (bin/punk-runtime.cmd ...) - extensionless windows invocation resolves the .ps1 twin, which is ExecutionPolicy-gated and runs under the invoking powershell edition, while .cmd always executes via the wrap-pinned tested path. The same .cmd file runs on unix shells unmodified, so one form serves all platforms with path-separator style as the only remaining per-platform difference. Sweep confirmed no existing user-facing guidance contradicts (none exists yet). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
a423d840e3 |
punk-runtime: deterministic ordinal listing order; AGENTS .ps1-twin knowledge corrected
The user-observed ordering discrepancy decomposed into two edition divergences, both now handled: - launch paths run DIFFERENT powershells: the .ps1 twin executes under the invoking shell (pwsh 7) while the .cmd routes via the wrap-pinned 'cmd.exe /c powershell' (Windows PowerShell 5); - between those editions BOTH Hashtable key enumeration order AND culture-sensitive Sort-Object collation differ (NLS vs ICU treat hyphens differently). Fix: ordinal comparison for every name ordering (candidates, platforms dirs, list -remote local+remote-only rows) in ps1, LC_ALL=C glob/ls/sort in bash - verified byte-identical list -remote output across cmd->powershell5, pwsh7-on-twin, and bash. bin/AGENTS.md .ps1-twin paragraph corrected (was stale): the twin is SELF-MATERIALIZED by the polyglot's batch layer - created when missing, fc-compared and re-copied when content differs - so it self-heals after a re-wrap on the next .cmd launch; no manual copy step (verified: deleted twin regenerated byte-identical). Documented caveats: a direct-.ps1-only user can ride a stale twin until a .cmd launch heals it, and payload code must avoid edition-specific behaviour. Rewrapped; roundtrip pin PASS; layout copy refreshed (twin deliberately NOT hand-copied - the mechanism owns it now). Project 0.18.7. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
f842b286d5 |
punk-runtime list -remote: surface server default + active selection
Both payloads in parity (rewrapped; roundtrip pin PASS; twins + layout copy refreshed): the remote comparison now answers "is my active runtime the recommended one?" at a glance - summary lines show the platform's server default (defaults.txt, best-effort fetch with cache; absent server = markers gracefully omitted) and the locally active runtime (annotated '(= server default)' on match); rows gain the local listing's '*' active marker and a '(server default)' annotation on the default's row, whether it is locally present or remote-only. Also fixes the latent bash bug the verification exposed: CRLF server sha1sums made locally-present runtimes ALSO appear as remote-only rows (bash read keeps the \r that msys grep strips, so the \r-suffixed name failed the local-existence test) - the remote-only loop now strips \r, and punkbin's build_sha1sums.tcl writes LF sha1sums going forward (punkbin 4b403a3). Project 0.18.6. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
0ac4058bcd |
punk-runtime: no-name fetch defaults come from the server's curated defaults.txt
The per-platform default fetch runtime is a punkbin RELEASE DECISION, so it now lives as server data (punkbin defaults.txt, c4d948f there) rather than values baked into the payloads: updating the recommendation is a one-line punkbin edit in the same change-set that publishes the artifact it points at - immediate effect for every deployed punk-runtime, no punkshell release, validated by punkbin's maintenance script, and mirror-curatable. No pre-convention fallback per user direction (no mirrors exist yet) - a server without the file gets an actionable name-it-explicitly message, as does a platform without a recorded line. Both payloads in parity (rewrapped; roundtrip pin PASS; twins + layout copy refreshed): baked rt_default/runtime_available prong values removed (the linux-arm one had already drifted from the server's actual artifact name - the config-in-code failure mode this removes); default lookup keys on the RESOLVED platform, so no-name 'fetch -platform <p>' now works for foreign staging too (supersedes the foreign-name-required rule); cached-copy fallback on network failure. ps1 fix: $arch? in usage strings parsed as a variable NAMED 'arch?' - brace-delimited. Verified: file:// happy path (local + foreign default), no-entry platform, missing-manifest, and the LIVE server's 404 path (graceful until punkbin c4d948f is pushed). Project 0.18.5. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
2ce3edc390 |
punk-runtime: 'platforms ?-remote?' action - server platform discovery via punkbin platforms.txt
Raw-file artifact servers have no directory listing, so served-platform
discovery rides a root-level platforms.txt manifest, now part of the
punkbin layout contract (generated by punkbin's src/build_sha1sums.tcl;
committed in punkbin locally - 7b8a244 - push remains the maintainer's
call; third-party mirrors using the layout carry the same file).
Both payloads in parity (rewrapped; roundtrip pin PASS; layout copy +
.ps1 twin refreshed): 'platforms' lists local bin/runtime/* folders with
the local platform marked; 'platforms -remote' fetches the manifest
(cached-copy fallback), marks local platform / local-dir presence /
local-only dirs, and points at 'list -remote -platform <name>' for
per-platform runtimes. Servers without the manifest get an actionable
message naming the -platform escape hatch and the canon reference
('help platforms'). Verified end-to-end through the wrapped cmd against
a file:// mirror simulation of the local punkbin checkout, including the
no-manifest fallback path. Project 0.18.2.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
cae9f36d3e |
Canonical punkshell platform names: punk::platform module, help topic, tree sync (G-105 groundwork)
Survey outcome (punkbin vs punkshell platform folders): five naming sites had drifted - punkbin folders, bin/runtime, vendorlib_tclX dirs, the punkboot platform_generic snips (an old platform::generic copy), and the Tcl platform package itself whose outputs vary by version (1.1.x renamed modern macOS to 'macos', aarch64/amd64 pass through unmapped). Canon: <os>-<cpu> punkshell platform-dir names, cpu normalized amd64->x86_64 and aarch64->arm64 (arm = 32-bit; on macosx arm folds to arm64 - Apple silicon is 64-bit only), os macos->macosx. The universal 'macosx' name is the runtime-tier convention (punkbin + bin/runtime keep one macOS folder, per make.tcl's existing collapse); per-arch macosx-x86_64/macosx-arm64 serve the lib tier. - new module punk::platform 0.1.0: platforms (canonical records with status supported/dormant/recognized + tiers), normalize, local ?-tier lib|runtime? - full PUNKARGS argdocs. Tcl's platform package stays the raw identifier underneath. - punk 0.2.7: 'help platforms' topic (alias 'platform'; all prefixes mutually ambiguous so they fall through to command lookup, per the env/environment precedent) - canon table with the local interpreter marked and raw platform-package identifiers for comparison. - boot: punkboot platform_punk (inline normalization copy, sync-comment contract with the module) in punk_main.tcl/project_main.tcl/make.tcl; all platform-dir call sites switched to it. make.tcl exercised live; main.tcl copies brace-verified. - vendorlib_tcl8/9 synchronized to canon: freebsd-amd64 -> freebsd-x86_64 (READMEs updated), freebsd-arm64/linux-arm64/macosx-arm64 added, tcl8's untracked-empty linux-arm now tracked + tcl9 gains linux-arm, stray untracked macosx-arm empties removed, msys-x86_64 marked dormant pending a utility decision, top-level READMEs state the canon contract. - punk-runtime bash prongs emit canonical names: aarch64 -> linux-arm64 (no fetch default until punkbin carries that folder), arch-aware freebsd/openbsd/netbsd/dragonflybsd via normalized cpu tokens. Rewrapped; roundtrip pin PASS; layout copy + .ps1 twin refreshed. Flagged for user decisions (recorded in G-105 Notes): punkbin linux-arm holds an arm64-named kit (recommend linux-arm64 folder at next arm publish; artifacts immutable), msys-x86_64 disposition, optional platform-1.1.x re-vendor, src/vfs stays mapvfs-categorized (recommend a mapvfs platform column when cross-wraps land, not a .vfs tree restructure). Project 0.18.0. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
d3bfc4484c |
G-103/G-105 groundwork: punk-runtime -platform surface, help action, no-args usage
Cross-build staging surface (both payloads in parity, rewrapped polyglot, layout copy + .ps1 twin refreshed, roundtrip pin PASS): - fetch/list/use accept -platform <p> (punkbin platform-DIR names, never zig triples); resolution: -platform arg > PUNK_RUNTIME_PLATFORM env > detected local platform; shape-only lowercase validation (server URL paths are case-sensitive - ps1 uses -cnotmatch; default -notmatch is case-insensitive and passed Win32-X86_64-class typos in testing). - foreign fetch requires an explicit runtime name (fetch defaults only make sense for the platform you stand on). - use -platform manages that folder's active.toml/materialization - the marker travels with the folder when deployed (provisioning story; unix exec bits restored at deploy time). - list flags !TARGET-MISMATCH when a runtime's metadata target disagrees with the folder it sits in (cross-fetch misfiling guard). - run stays LOCAL ONLY: rejects a leading -platform, ignores the env override, later args pass through to the runtime untouched. - new 'help' action (actions, options, env vars, examples) and a real usage block on no-args invocation (was a bare action list). - bash FreeBSD platform dir aligned to punkbin's actual freebsd-x86_64 (was freebsd-amd64; the G-105 platform-dir naming-alignment item). Verified on both payloads directly and through the wrapped cmd: noargs, help, local list unchanged, foreign use-materialization + mismatch flags, foreign-fetch refusal, run guard, env override (and run's immunity to it), bad-name validation. Project 0.17.9. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
61cf903dd9 |
G-103: punk-runtime list/use surface artifact metadata; use materializes -rN artifacts
Scriptset extension (ps1 + bash payloads in parity, rewrapped polyglot, layout-shipped copy + untracked .ps1 twin refreshed, roundtrip pin PASS): - list: per-runtime summary parsed from the <rootname>.toml metadata record beside each runtime (variant, tcl patchlevel, revision, piperepl on/off, from=<artifact> on materialized working copies). - use <artifact-r<N>-name>: materializes the immutable artifact into its WORKING name (minus -r<N>) with the metadata toml copied alongside, then selects it - the G-103 naming decision's artifact->working mapping, so republishing never churns consumers. use <workingname> unchanged. - fetch of -r<N> artifacts also retrieves the metadata toml from punkbin (absence tolerated for pre-family runtimes). - rootname handling strips only .exe (dotted patchlevels break last-dot stripping for extensionless unix names); same exe_split fix applied to family_artifacts.tcl artifact/toml naming for the G-105 cross-target future. Candidate listing excludes directories and .log files (parity cleanup; bash side previously listed directories). Verified on the wrapped bin/punk-runtime.cmd (powershell 5 branch) and the bash payload under git-bash: all three family members materialized from their -r1 artifacts with metadata shown in list, and 'punk-runtime run' launched the active punk family runtime (9.0.5, piperepl machinery, //zipfs:/app/tcl_library). Project 0.17.7. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
099ac699e3 |
G-097: bin utility naming sweep - punk-bits, punk-runtime, punk-tclargs, selfsign
The remaining pre-policy punkshell-own bin utilities take the punk- prefix (bin/AGENTS.md policy, G-096); external-tool wrappers (dtplite/sdx/kettle) and getpunk stay unprefixed. No behaviour changes ride along. - runtime scriptset: sources/toml renamed (src/scriptapps/bin/punk-runtime.*), the eight ps1 usage/guidance messages now say punk-runtime.cmd, the bash payload's filename-derivation comment example updated; REWRAPPED -> bin/punk-runtime.cmd (checkfile clean) with the .ps1 twin regenerated as a byte-copy. The roundtrip + checkfile pins retarget the new names and pass. - tclargs + bits: sources/tomls renamed; bin artifacts moved BYTE-FAITHFULLY (git mv, no rewrap): a pre-rename drift check showed both carry pre-template-refresh wraps (477-byte delta = the template's 2025 wmic-deprecation timestamp fix; runtime was in sync). Regenerating them is a behaviour change and is deliberately not smuggled into the rename - recorded in the goal. Fresh .ps1 twins cut from the current .cmds; stale untracked bits.bat/bits.ps1/tclargs.ps1/runtime.ps1 removed. - selfsign experiments: SELFSIGN.PS1 -> punk-selfsign.ps1 (case normalized), wrap toml + cert-create script renamed; the four untracked bin experiment scripts renamed on disk; the exported .cer is not a script and keeps its name. - runtimebash_wsl.test: functional staged-filename sites updated (bash ./punk-runtime.bash; solo-fixture cp) along with comments. - Docs: bin/AGENTS.md (examples, policy paragraph records the sweep, runtime contract section, pin pointer corrected to runtimecmd_roundtrip.test), src/scriptapps/AGENTS.md, root AGENTS.md, README.md, src/README.md, untracked bin/runtime/README.md, G-060 reference, libunknown comment (src copy; root modules/ + bootsupport copies catch up on their re-vendor cycles). Suites green: scriptwrap + binscripts 26 run / 25 passed / 1 constraint-skip / 0 failed - the roundtrip pin passes against the renamed artifact. Discovered and recorded for user decision (goal Progress): the project LAYOUT stores ship stale utility copies - runtime.cmd (2025-era payload) and getzig.cmd (the G-096 rename missed this channel) - so generated projects still receive old-named utilities; folding the layout channel into this goal's scope vs a layout-sync mechanism is flagged. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
e68d9800a7 |
G-096: getzig renamed to punk-getzig; utility naming policy documented in bin/AGENTS.md
Scriptset (src/scriptapps/bin) and the generated bin wrapper renamed; the untracked bin/getzig.ps1 twin replaced by punk-getzig.ps1 (byte-copy of the .cmd - launchability convenience for cmd.exe-or-powershell starts). Payload improvements: self-references updated, and the ziglang.org release URL now derives its version from the single $releasearchive pin (was a separately hardcoded 0.15.1 vs the 0.15.2 archive). Re-wrapped via scriptwrap multishell; checkfile ERROR-free (the two boundary-scan warnings are the documented-normal polyglot ones). bin/AGENTS.md gains the punk- naming policy section (exceptions: dtplite/sdx/kettle wrappers, getpunk; sweep of bits/runtime/ tclargs/selfsign is G-097). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 weeks 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 |
2 weeks ago |
|
|
e6be532938 |
runtime.cmd: list -remote for the unix payload + PUNKBIN_URL override (punkshell 0.8.0)
- bash/zsh payload gains list -remote parity with the powershell payload: local-vs-server sha1 comparison table (Same version / UPDATE AVAILABLE / not listed on server, plus remote-only entries), falling back to a cached sha1sums.txt with a warning when the server is unreachable (the powershell version has no cached fallback - candidate backport) - both payloads: artifact server base url overridable via PUNKBIN_URL (mirrors/testing - also what makes the new feature testable offline) - first real catch for the 512-byte label guard: the payload growth pushed the template's :exit_multishell target label across a boundary from its callsite (checkfile ERROR at wrap time); fixed with a documented byte-alignment spacer comment at the end of runtime.bash, and the resize-the-spacer workflow recorded in bin/AGENTS.md - bin/runtime.cmd regenerated via scriptwrap (roundtrip pin green; multishell suite 9 pass + 1 skip on 9.0.3 and 8.7); runtime.bash syntax-checked under bash and zsh; windows list/use/run sanity re-verified Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
3 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 |
3 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 |
3 weeks ago |
|
|
7448dcad8a |
add bin/AGENTS.md: launch package modes (src mode) and verification-shell contracts
The dash-delimited launch package modes of built punk shells (dev/os/src/ internal, implemented in src/vfs/_config/punk_main.tcl) had no agent-facing record. bin/AGENTS.md now documents the mode grammar and, in operational terms, the src mode that matters for verifying working-tree changes: exe-location-based project-root discovery, the source module paths it prepends, package prefer latest (dev 999999.0a1.0 modules beating kit-stamped snapshots), and how 'package present' distinguishes a src-mode session from a plain kit launch. Also records the both-Tcl-generations interactive verification convention (a Tcl 8.6-based shell plus the current Tcl 9-based incarnation, deliberately not version-pinned) and the role of the plain runtime kits under bin/runtime/ for punk-free probes. Root AGENTS.md Child DOX Index gains the bin/ entry, and .gitignore gains a !/bin/AGENTS.md negation alongside the other source-controlled bin items (the /bin/* ignore is why no doc lived there before). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
4 weeks ago |