Serves the engine's 'truncate/summarize values in error messages' todo
(G-151 lean 5, explicitly deferred from that goal's acceptance). New
private::error_display_value wraps the G-151 report_display_value /
ansistring TRUNCATE machinery (string mode: single-line-ize with visible
control/ANSI rendering, then grapheme-cap with '...' plus ' (len N)') and
is applied at every site interpolating a received word into a validation
error message: the check_clausecolumn type/size/range/regexprefail
reports, the leaders/values allocation-rejection and choiceviolation/
ambiguous-prefix sites, the multi-value clause echo, the -allow_ansi
character-view (previously unbounded ansistring VIEW), and the
Unexpected-option unknown-flag word. Width cascade: definition-level
'@cmd -reportvaluewidth' > built-in 48; 0 = no cap (define -help
documents the extension). Display-only: -badarg/-badval errorcode fields
keep the raw words.
Safety properties: a short plain value (within budget, no C0/C1/DEL
content) displays byte-identical via a cheap fast path - important both
for the existing message pins (all held unchanged) and because
check_clausecolumn builds candidate messages for type alternatives that
may never be raised; and the helper catches-and-degrades to the plain
non-ansistring fallbacks, since punk::ansi loaded without punk::lib dies
in ansistring TRUNCATE (RANGE calls punk::lib::lindex_resolve) - an
error message must never die on its display helper. parse_report's own
value cells retain that uncaught exposure (pre-existing, success-side).
validation.test +4 pins (long-value truncation with raw -badval
retention, multiline single-line-ization, @cmd -reportvaluewidth cap,
unexpected-option word truncation with raw -badarg retention). Args
subtree 415/0 on tclsh90s (9.0.5) and tclsh86ts; full suite at the
recorded 13-failure environment baseline (maketclhelp re-verified 12/12
with a real tclsh on PATH). Minted modules/punk/args-0.26.0.tm.
Project version 0.66.1 (patch: kit-shipped error-display behaviour) with
CHANGELOG entry; G-151 archive follow-on disposition flipped to landed.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com