Engine test harness reports a permanent false green: assert counters never increment (9 test files) #116
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found 2026-08-06 while adding coverage for the OpenAI-tools port (branch
feat/soul-openai-tools-v2).What is wrong
Every
tests/*.elassert helper counts like this:El's scope rule — the one
chat.eldocuments at every while-body mutation ('mutations inside if blocks do not escape scope') — means neither counter ever increments. The summary line every counted test file prints is0 passed, 0 failedalways, whatever happened. Verified by running the file: 32 individual PASS lines printed, summary still 0/0. 9 test files share the pattern.Why it matters
The per-assertion PASS/FAIL lines are correct and reliable — the summary is not. Any CI step, script, or human keying off that line reads permanent green, including on a run where every assertion failed. Same class as the round-6 lesson ('a sub-assertion that can never pass is as worthless as one that can never fail'), applied to the verdict itself.
Related discovery
There was no way to run these tests at all:
elcis a compiler (emits C to stdout and exits), sotests/*.elcould only be read, never executed — presumably why the dead counters went unnoticed. A working runner now exists on the port branch attests/run-el-test.sh(emits the test to C, compilessoul.cseparately withmainrenamed away since it owns the daemon main but also defineslayered_cycleet al., links the remaining modules + the repo-pinned vendor runtime, executes). It computes the verdict itself from the PASS/FAIL lines and exits non-zero on any failure or on zero assertions — proven to discriminate with a negative control (deliberately broken assertion -> 31 passed / 1 failed, exit 1).The real fix (this issue)
The harness workaround means no one reads a false green today, but the in-file counters are still dead. Correct fix is in the test files: carry counts through a mechanism that survives El block scoping (
state_set/state_get, or helpers return a value the caller accumulates at top level as an if-EXPRESSION). 9 files, mechanical. Not fixed here deliberately: it touches shared test files while a beta round is in flight.🤖 Generated with Claude Code