Skip to content

feat(t27b): drop top-level statements like the reference (StmtExpr, +5 counted) - #6365

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27b-lane-next
Oct 5, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27b-lane-next

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #6363
Refs #6063

What

t27c's Zig backend (gen_decl in bootstrap/src/compiler.rs) emits nothing for a statement at top level, so the reference compiles a file that has one. t27b refused every such file with StmtExpr ("statement at top level" / "stray .b at top level"). It now drops a top-level StmtExpr the same way, and leaves it out of the roots of the analyzed-fn set (a fn named only there is never emitted-and-analyzed by the reference either).

Sources of the shape in the corpus: a dotted module a.b; / use a.b; read by the t27c parser as a plus a stray .b (#6102), and the tail of a test body the parser closed early. Top-level StmtAssign is a separate family and stays refused.

Numbers (my runs, t27b corpus specs --timeout-ms 60000 --jobs 8 --blockers --reference /tmp/t27shared/release/t27c, from master bd59d8c)

before after
counted (pass + pass_vacuous where the reference passes) 648 / 720 653 / 720
checked pass (with tests) 370 373
JIT/interpreter mismatch 0 0
t27b passes, reference does not 0 0
test fails / timeouts 8 / 2 8 / 2

Newly passing: specs/sandbox/health.t27, specs/sandbox/https_enforce.t27, specs/port/trinity/src/tri/gen_arithmetic.t27 (pass, with tests); specs/lsp/language.t27, specs/sandbox/modules.t27 (pass_vacuous).

Still blocked by other families after this (reference passes): wrapup-auto (StmtAssign, ExprArrayLiteral), ternary_vs_binary and orphan_detection (ExprArrayLiteral), gen_image (std.mem.Allocator), gen_work_stealing (anonymous struct). The remaining StmtExpr statement blocker (value statement in a body, 1 reference-passing file) is a different construct.

Tests

top_level_statements_are_dropped_like_the_reference in cli/t27b/tests/source.rs: dotted module/use, a failing top-level assert, a top-level call to a fn whose try is now not refused, and the negative control (the same try in a fn a test reaches is still refused). Each source was checked against t27c test-report (all pass). cargo test -p t27b green.

Reference note

The reference silently discarding top-level statements (including a failing assert(1 == 2);) is t27c behaviour, matched here, not endorsed; the dotted-name parse is #6102.

🤖 Generated with Claude Code

t27c's Zig backend emits nothing for a top-level statement (gen_decl), so
the reference compiles files whose dotted `module a.b;` / `use a.b;` the
parser reads as `a` plus a stray `.b`. t27b now drops a top-level StmtExpr
the same way and leaves it out of the analyzed-fn roots.

Corpus (specs, --reference t27c): counted 648/720 -> 653/720, checked pass
370 -> 373, mismatch 0 -> 0.

Closes #6363

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

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 05:32:22 UTC

Summary

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

These columns do not partition: 11 + 35 + 0 + 0 = 46, and there are 47 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 0757c2f into master Oct 5, 2026
28 of 30 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: drop top-level statements as the reference does (StmtExpr)

1 participant