Skip to content

t27b: assert(cond, "msg") lowers like the reference (+19 files) - #6306

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27b-assertmsg
Oct 4, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27b-assertmsg

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Closes #6305
Refs #6063

What

assert(cond, "msg") was rejected as ExprCall(assert with message) -- step 1 of the greedy order at master 7e69777 (+19 files). t27c's Zig backend (gen_expr, the node.name == "assert" arm) emits if (!(cond)) @panic("msg") and never evaluates the message, so t27b now lowers a string-literal message form exactly like assert(cond).

Refused by name, never guessed:

  • non-literal message -> ExprCall(assert with non-literal message) (0 specs today)
  • three or more arguments -> ExprCall(assert with message) (0 specs today)

t27b corpus specs (local, master 7e69777 vs this branch, load ~13)

before after
pass (all tests pass) 258 277
pass_vacuous (0 runtime asserts) 279 279
fail (a test fails) 6 6
rejected 670 651
front-end error 40 40
JIT/interpreter mismatch 0 0
timeout 3 3

The 6 failing and 3 timing-out files are the same before and after.

Reference check

Every newly passing file was run through t27c test-report built from the same master (7e69777); all agree test for test (tests / pass / FAIL):
specs/compiler/rust_constant_case.t27 2/2/0, specs/numeric/bnf{8,16,32,64,128,256,512,1024}.t27 2/2/0 each, specs/numeric/gft{4,8,16,32}.t27 2/2/0 each, specs/numeric/tnf{4,8,32}.t27 2/2/0 each, specs/numeric/tnf{16,64,128}.t27 4/4/0 each.

Tests

cargo test -p t27b green. New assert_with_message_checks_the_condition_only (cli/t27b/tests/source.rs): a passing test, a failing one (trap at the assert's line, JIT and interpreter agree) and an invariant with a message, plus the non-literal refusal. The same spec through t27c test-report gives pass 1 / FAIL 1 / invariant proved -- the same verdicts.

docs/reports/t27b_expectations.json is not touched here: like #6296, the steward re-blesses it from a lab run on master.

Top 5 blockers after (greedy)

  1. ExprIdentifier statement +18
  2. FnDecl +15
  3. ExprBinary statement +12
  4. ExprCall(@compileAssert) +9
  5. StmtAssign(module var in test) +7

🤖 Generated with Claude Code

t27c's Zig backend emits `assert(cond, "msg")` as
`if (!(cond)) @Panic("msg")` and never evaluates the message, so the
verdict is the one-argument assert's. t27b now lowers a string-literal
message form exactly like `assert(cond)`. A non-literal message is
refused as ExprCall(assert with non-literal message); three or more
arguments stay ExprCall(assert with message).

t27b corpus specs: pass 258 -> 277, rejected 670 -> 651, mismatch 0.
All 19 newly passing files agree with t27c test-report from the same
master.

Closes #6305

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

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-04 23:33:58 UTC

Summary

Status Count
Total Open PRs 44
PRs with Failing Checks 32
PRs with All Checks Green 12
READY 11
FAILING 32
PENDING 0
NO CHECKS YET 0

These columns do not partition: 11 + 32 + 0 + 0 = 43, and there are 44 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8597b6ded596 != 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 0851055 into master Oct 4, 2026
29 of 31 checks passed
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.

t27b: lower assert(cond, "msg") like the reference (ExprCall(assert with message), +19 files)

1 participant