Browse Source
grepstr regression report (user, 2026-08-08): 'grepstr -h underline
-group test-group' errored 'bad option "-group": must be -all, -about,
-indices, ...' - regexp's own option list - with or without the --
end-of-options marker, where an old punk901t.exe kit worked.
Diagnosis: the punk::args parse layer was never at fault. A live probe
seats the dash-led word as the pattern value in both invocation forms
(without a marker via the starved-values/valmin reservation rule). The
failure was the body's capture-group probe 'regexp -about $pattern' in
punk::ansi::grepstr - no -- guard, so any dash-led PATTERN VALUE was
read as a regexp option. Present since the proc's introduction
(bc9bacd8, 2025-11-10), which also repointed the repl 'grepstr' alias
from the dash-safe ::punk::grepstr predecessor - so kits baked since
then regressed vs older kits.
Sister defect, same class: the punk::args -type regex|regexp validator's
'catch {regexp -about $e_check}' falsely rejected a legitimate dash-led
regex value as 'requires type regexp' with regexp's bad-option text
embedded as the reason.
Fix: add -- at both sites (ansi grepstr numgroups probe, args
validator). A genuinely invalid dash-led regex still fails as a type
mismatch, now with the real compile reason.
New pins:
- ansi/grepstr.test grepstr_dashled_pattern: the reported invocation
with and without the -- marker, exact highlight expectations.
- args validation.test type_regexp_dashled_value: dash-led valid ARE
accepted; invalid '-(' rejected without 'bad option' in the message.
- args validation.test opt_dashword_seats_when_values_require_it: the
starved-values dash-led seating rule grepstr relies on, pinned at
args level (no -- marker needed when word supply equals
required-values demand).
src/tests/modules/AGENTS.md index updated (punk/ansi + punk/args
bullets). The promoted bootsupport/vfs copies (ansi 0.2.0, args 0.18.0)
still carry the bug until the next coherent-set promotion + bake.
punk::ansi 0.2.0 -> 0.2.1, punk::args 0.25.0 -> 0.25.1, project 0.62.0
-> 0.62.1 + CHANGELOG (user-visible shell command regression fix).
Suites: testbody_lint 1687 clean; grepstr.test 10/10; validation.test
13/13; modules tree 1334 total / 1323 pass / 11 constraint-skipped /
0 fail (zig-built tclsh90s 9.0.5); make.tcl projectversion consistency
+ staleness OK.
Claude-Session: https://claude.ai/code/session_01QgaxV27VZkmEec7oNbEVFc
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
9 changed files with 86 additions and 7 deletions
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue