- scriptlib/developer/testbody_lint.tcl (new): tcltest .test lint per
src/tests/AGENTS.md Verification. E-level: a -body whose final command
always returns empty vs a -result that cannot match empty under its
-match mode; test invocations with no -body at all (vacuous pass);
unbalanced-brace parse kills. W-level: uninterpretable shapes.
Hand-rolled command-word splitter (the corpus '{desc}\' style is
command-legal but list-illegal), namespace-eval recursion, literal
{*}{...} splices, -selftest (8 fixtures) + -stats. 142 files /
1674 tests parse clean.
- src/tests/runtests.tcl: FAILED reports with an empty actual and a
non-empty expected append a hint= (compact) / hint : (markdown) line
naming the trailing 'set result'/'return $result' convention, so the
failure carries its own diagnosis. JSON reports unchanged.
- src/tests/modules/punk/args/testsuites/args/args.test: the
literalprefix sibling of parse_withdef_value_leading_multiple_not_greedy
was passing VACUOUSLY - a missing description made the braced
description word swallow -setup/-body/-cleanup/-result, so tcltest ran
an empty body against the default -result "". Description restored,
orphan closing brace removed; the de-vacuized test executes and passes
(file 34/34).
- AGENTS.md (root), src/tests/AGENTS.md, .agents/.claude tcl-runtests
SKILL.md (byte-identical copies): the body-ender convention now
sanctions 'return $result' alongside 'set result' (verified on 8.6 and
9.0: default -returnCodes {ok return} accepts the return form,
-cleanup still runs, an explicit -returnCodes list omitting 'return'
rejects it loudly); linter and hint documented.
Verification: testbody_lint -selftest PASS on tclsh90s and tclsh86ts;
corpus lint clean; args.test 34/34; full suite in both runner modes with
runtests_parity.tcl PARITY: ok (1677 tests, 1631 pass). Residual 23
failures are pre-existing/environment, not this change: 12 maketclhelp
(auto_execok tclsh Bash-env trap; pass under PowerShell), 8
maketcllibfetch + 2 maketclbakelist (reproduce identically with this
runtests.tcl change stashed), core exec-14.3 (pins the pre-'-encoding'
exec error message vs tcl 9.0.5).
Claude-Session: https://claude.ai/code/session_016Bk571eG3prsJWYnewboW2
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com