Browse Source

punk::tcltestrun 0.4.1: normalize errorInfo/errorCode capture (G-161 follow-on landed) (0.49.7)

The '---- errorInfo: ' / '---- errorCode: ' prefixes are 16 characters;
parse_testrun captured from index 15, so every captured value led with
the prefix's trailing space. Capture now starts at index 16 -
report-shape normalization only (continuation errorInfo lines were
always raw and are unchanged). parsetestrun-multiline-error-3.0 pins the
normalized shape (errorcode exact, errorinfo anchored) instead of
trimming/tolerating; 6/6 green tclsh90 + native tclsh 8.6.

Landed directly at user direction from the archived G-161 Follow-ons -
disposition flipped to landed in the same change-set (the sanctioned
archived-file edit). CHANGELOG + punkproject 0.49.7.

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 6 days ago
parent
commit
977eade569
  1. 9
      CHANGELOG.md
  2. 2
      goals/archive/G-161-tcltestrun-multiline-banner.md
  3. 2
      punkproject.toml
  4. 8
      src/modules/punk/tcltestrun-999999.0a1.0.tm
  5. 3
      src/modules/punk/tcltestrun-buildversion.txt
  6. 9
      src/tests/runner/testsuites/parser/parsetestrun.test

9
CHANGELOG.md

@ -5,6 +5,15 @@ The latest `## [X.Y.Z]` header must match the `version` field in `punkproject.to
Entries are newest-first; one bullet per notable change. See the root `AGENTS.md`
"Project Versioning" section for the bump policy.
## [0.49.7] - 2026-08-04
- punk::tcltestrun 0.4.1 (G-161 follow-on, landed at user direction):
errorInfo/errorCode values in failure reports no longer carry the
historic leading space (the 16-character "---- errorInfo: " /
"---- errorCode: " prefixes were captured from index 15 - the prefix's
trailing space - instead of 16). Report-shape normalization only; the
parser suite now pins the normalized shape exactly.
## [0.49.6] - 2026-08-04
- punk::tcltestrun 0.4.0 (G-161): `parse_testrun` now parses failing-test

2
goals/archive/G-161-tcltestrun-multiline-banner.md

@ -107,4 +107,4 @@ lines inside test output) must keep their current behaviour for single-line case
Follow-on: anchor-verify single-line opening banners too - any "==== * FAILED" line still opens failure capture unanchored (the historic emulated-banner confounder cost, pinned by parsetestrun-confounder-5.0); anchoring would close it but changes characterized behaviour => open
Follow-on: closing-banner prefix match uses glob string match on the raw name, so a test NAME containing glob metacharacters can mis-match its opening text (latent, pre-existing, unexercised in the corpus) => open
Follow-on: errorInfo/errorCode capture retains a historic leading space (capture ranges from index 15 of the 16-char "---- errorCode: " prefix); consumers tolerate it and the parser suite trims - normalizing is a report-shape change => open
Follow-on: errorInfo/errorCode capture retains a historic leading space (capture ranges from index 15 of the 16-char "---- errorCode: " prefix); consumers tolerate it and the parser suite trims - normalizing is a report-shape change => landed 2026-08-04 (tcltestrun 0.4.1 parse_testrun index-16 capture, parsetestrun-multiline-error-3.0 pins the normalized shape exact; punkshell 0.49.7)

2
punkproject.toml

@ -1,6 +1,6 @@
[project]
name = "punkshell"
version = "0.49.6"
version = "0.49.7"
license = "BSD-2-Clause"
url = "https://www.gitea1.intx.com.au/jn/punkshell"
#packager: declared identity for published artifacts (declarative, not proof -

8
src/modules/punk/tcltestrun-999999.0a1.0.tm

@ -292,10 +292,14 @@ tcl::namespace::eval punk::tcltestrun {
if {$fail_stage eq "error" && ![string match "==== * FAILED" $ln_trimright]} {
if {[string match "---- errorInfo: *" $ln]} {
dict append results out "<stdout><$pkg> $ln" \n
dict append test_case_fail errorinfo "[string range $ln 15 end]\n"
#"---- errorInfo: " is 16 chars (indices 0-15) - capture from index 16
#so the value carries no leading space (0.4.1; historically ranged from
#15 and every captured value led with the prefix's trailing space)
dict append test_case_fail errorinfo "[string range $ln 16 end]\n"
continue
} elseif {[string match "---- errorCode: *" $ln]} {
dict set test_case_fail errorcode "[string range $ln 15 end]"
#same 16-char prefix and index-16 capture as errorInfo above (0.4.1)
dict set test_case_fail errorcode "[string range $ln 16 end]"
dict append results out "<stdout><$pkg> $ln" \n
continue
} elseif {[string match "---- *" $ln]} {

3
src/modules/punk/tcltestrun-buildversion.txt

@ -1,6 +1,7 @@
0.4.0
0.4.1
#First line must be a semantic version number
#all other lines are ignored.
#0.4.1 - parse_testrun fix (G-161 follow-on, landed at user direction): errorInfo/errorCode values no longer carry the historic leading space - the "---- errorInfo: "/"---- errorCode: " prefixes are 16 characters and the capture ranged from index 15 (the prefix's trailing space); capture now starts at index 16. Report-shape normalization only; continuation errorInfo lines were always raw and are unchanged.
#0.4.0 - parse_testrun (G-161): multi-line opening-banner tolerance. A failing test whose description contains embedded newlines (tcltest emits the banner as ONE puts spanning physical lines) is now parsed with full fidelity - failure entry with name/description/result_was/result_expected - and every later event including the summary line keeps flowing. Recognition anchors on '---- <name> start' events (-verbose start, which runtests.tcl always passes) plus bounded banner-continuation buffering, abandoned at the next recognisable event line so banner-ish ordinary output cannot swallow events. Streams without start events, and all single-line parse paths (including the emulated-banner confounder heuristics), behave exactly as before.
#0.4.0 - parse_testrun fix (G-161): result_expected was NEVER captured - the '---- Result should have been' opener always arrives while the result_was capture is active, and the active-capture reset branch fell through PAST the opener elseif, so every FAILED record lacked result_expected and the expected-value lines leaked into test_body. The active-capture branch now transitions result_was -> result_expected directly.
#0.3.1 - fix: tm_path_additional_ifneeded exclude list missed the G-155 _build->_mint staging rename - staged pods in _mint were registered as bogus _mint::* modules; now -exclude-paths {**/_build/*** **/_mint/***} (full option name, ***-tail pruning form; _build kept for legacy checkouts)

9
src/tests/runner/testsuites/parser/parsetestrun.test

@ -154,11 +154,12 @@ namespace eval ::testspace {
set f [dict get $r testcase_fails t-err-3.0]
lappend facts status [dict get $f test_status]
lappend facts desc_ok [string equal [dict get $f test_description] "erroring test whose description\nspans two lines"]
#errorcode/errorinfo carry a historic leading space ("---- errorCode: " is
#16 chars, the capture ranges from index 15) - tolerated, not pinned
#errorcode/errorinfo are captured without the historic leading space since
#tcltestrun 0.4.1 (the 16-char "---- errorCode: " prefix; capture starts at
#index 16) - pinned exact/anchored here
lappend facts returncode [dict get $f returncode]
lappend facts errorcode [string trim [dict get $f errorcode]]
lappend facts errorinfo_ok [string match "*boom*while executing*" [dict get $f errorinfo]]
lappend facts errorcode [dict get $f errorcode]
lappend facts errorinfo_ok [string match "boom*while executing*" [dict get $f errorinfo]]
set facts
} -result {detected 1 totals 1/0/0/1 fails 1 passes 0 skips 0 status ERROR desc_ok 1 returncode 1 errorcode NONE errorinfo_ok 1}

Loading…
Cancel
Save