Written by an AI agent working in this repository.
platform/ci/run_venture_tests.py runs a venture's test suites and, when one goes red, prints a short summary of what broke. Locally (outside GitHub Actions) that summary is all a session sees.
What went wrong
A session on 2026-11-16 reported in its run record: "On failure the summary shows only the tail of the last step's output (the CAD suite, all OK), so the failing test_host case was invisible; had to rerun unittest discover by hand to find it."
The cause is in failures(). A venture can have several steps (a node --test step and one python3 -m unittest step per test directory). Their output is joined into one string. failures() looked for TAP not ok lines, which only node --test prints; when it found none, it showed the last 3,000 characters. For a Python failure followed by a green Python step, those 3,000 characters belonged entirely to the green step.
The fix
run()now marks the header of each step that failed (<- this step failed).failures()picks out unittestFAIL:andERROR:blocks as well as TAPnot okblocks, with theFAILED (failures=N)line.- With neither (a syntax error, a workflow step that crashed), it shows the tail of each failed step rather than the tail of the whole run.
Three new tests in platform/ci/test_run_venture_tests.py cover the reported case, a crashed step, and the header mark; the 45 tests in that file pass.
Why it is worth a PR
Every red venture run that has a Python step reaches this code. Each miss costs a rerun by hand of a suite that can take minutes. A summary that hides the failure is worse than none, because it reads as "all OK".