Skip to content

Finish the diagnostic repair: a crash is not a numeric mismatch - #2190

Merged
gHashTag merged 1 commit into
masterfrom
loop/t27-stdout-rest
Aug 18, 2026
Merged

Finish the diagnostic repair: a crash is not a numeric mismatch#2190
gHashTag merged 1 commit into
masterfrom
loop/t27-stdout-rest

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

#2187 fixed the six t27c gen-* calls in verify_igla_race.py. An AST re-scan shows the repair was partial — 12 sites remained, in two classes:

1. t27c gen-* with a different call shape (3 sites) — verify_multitarget.py, verify_trainer_c.py. The previous regex only matched the single-line form, so these were silently skipped.

2. Running the built binary (8 sites) — cb, rb, peb, perb, cbin, rbin, b. subprocess.run([...]).stdout with no exit-code check means a crash arrives as a short or empty result list, which then surfaces as a NUMERIC MISMATCH between targets. That is the most alarming reading available and the wrong one: a program that died on signal 11 did not disagree about arithmetic.

Fix: _run_bin(cmd, what) alongside the existing _build and _gen, reporting the exit code and the signal number when negative. All ten _gen/_run_bin call sites now guard None so a failure ends cleanly instead of raising TypeError on None.split().

Verified by planting a fault, not by reading:

before:  FAIL: C backend failed to build/run

after:   C target: cc exited 1
             mod.h:18:34: error: use of undeclared identifier 'hm'
                18 | static const int32_t hs = (512 + hm);

All three tools still exit 0 on a clean tree.

Remaining, deliberately: check_withdrawn_live.py:80 (git ls-files, already has a try/except fallback) and verify_emit_bitexact.py:127 (vvp) — the latter is worth a follow-up.

Self-critical: this is the second partial repair in a row. #2187's regex matched one call shape and I reported the pattern as fixed without re-scanning. The AST scan is now the check, and it runs before the claim.

Refs #2187, #2185

Closes #2189

🤖 Generated with Claude Code

…ismatch

#2187 fixed six t27c gen-* calls in one file. An AST re-scan found 12 more:

  t27c gen-* in another call shape    3 sites   the previous regex matched only
                                                the single-line form
  running the built binary            8 sites   .stdout with no exit-code check

The second class is the interesting one. A crash arrives as a short or empty
result list and surfaces as a NUMERIC MISMATCH between targets -- the most
alarming reading the harness can produce, and the wrong one. A program that died
on signal 11 did not disagree about arithmetic.

_run_bin joins _build and _gen, reporting the exit code and the signal number
when negative. All ten _gen/_run_bin call sites now guard None, so a failure ends
cleanly instead of raising TypeError on None.split().

Verified by planting a fault rather than by reading:

  before   FAIL: C backend failed to build/run
  after    C target: cc exited 1
               mod.h:18:34: error: use of undeclared identifier 'hm'

All three tools still exit 0 on a clean tree.

Left deliberately: check_withdrawn_live.py:80 (git ls-files, has a try/except
fallback) and verify_emit_bitexact.py:127 (vvp), the latter worth a follow-up.

Self-critical: this is the second partial repair in a row. #2187's regex matched
one call shape and I reported the pattern as fixed without re-scanning. The AST
scan is the check now, and it runs before the claim.

Closes #2189
Refs #2187

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-18 12:52:32 UTC

Summary

Status Count
Total Open PRs 29
PRs with Failing Checks 12
PRs with All Checks Green 17
READY 9
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=cd2822f290eb != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 302f73c into master Aug 18, 2026
19 checks passed
@gHashTag
gHashTag deleted the loop/t27-stdout-rest branch August 18, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish the diagnostic repair: 10 sites still took stdout without checking the exit code

1 participant