Skip to content

t27b: std.debug.print lowers by a plan in t27 -- zig_open_slice passes, reel_particles_mux loses its std.* blocker (Closes #10449) - #10455

Merged
gHashTag merged 1 commit into
masterfrom
claude/interesting-hypatia-1df4a0
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/interesting-hypatia-1df4a0

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10449

Follow-up to #10423 / #10431 (t27b coverage epic #6063).

What

std.debug.print was refused with ExprCall(std.*). Now specs/tri/t27b/debug_print_plan.t27 decides how it lowers, and lower.rs only reads the node and builds the answer.

  • Unanalyzed fn (Zig never analyzes a fn that nothing analyzed reaches): the print is skipped and its arguments are not lowered. Zig never checks the format there either.
  • Analyzed fn, print("literal", .{ args }): the arguments are lowered in order, once each, and dropped (drop_value), once check(fmt, kinds) accepts the format against the argument kinds. The matrix was measured on zig 0.16: {} and {d} of ints and floats, {} of a bool, {s} of a string or byte slice or byte array, {{/}}, width/fill/align, {d:.2}, {s:.2}.
  • Anything else (a count mismatch, a lone brace, {d} of a bool or slice, {s} of an integer, a non-literal format) is refused with a name and a detail from the plan. The reference does not compile those in an analyzed fn.
  • The print itself writes to stderr, which no verdict observes, so it is not run.

Files

  • specs/tri/t27b/debug_print_plan.t27 (new, 22 tests) and its generated gen/rust/tri/t27b/debug_print_plan.rs (gitignored, added with -f).
  • specs/tri/t27b/builtin_plan.t27 and gen/rust/tri/t27b/builtin_plan.rs: the assert and eval-branch-quota decisions that lower.rs held inline move into the plan, with 4 tests (25 now). This pays for the print glue.
  • cli/t27b/src/lower.rs: 40 added, 67 deleted (net -27). tail.rs: 2 lines changed (a test count 5 -> 7).
  • specs/tri/t27b/conformance/discard_value.t27: print cases (order, every measured shape, an uncalled fn with bad prints). No new file; 7 tests.
  • Seals re-saved for the three specs, one new (t27b_T27bDebugPrintPlan.json).
  • docs/reports/t27b_expectations.json: specs/compiler/zig_open_slice.t27 moves to pass, a row for debug_print_plan.t27 is added, max_not_pass goes from 75 to 74.

Evidence (Railway lab, t27b aarch64 under qemu, t27c release, rebased on master with #10431)

spec t27b test --check t27c test-report
t27f/reel_particles_mux.t27 6/6 pass, 34 asserts 6 pass, 0 FAIL, 0 vacuous
compiler/zig_open_slice.t27 3/3 pass, 4 asserts 3 pass, 0 FAIL, 0 vacuous
tri/t27b/debug_print_plan.t27 22/22 pass, 81 asserts 22 pass, 0 FAIL, 0 vacuous
conformance/discard_value.t27 7/7 pass, 14 asserts 7 pass, 0 FAIL, 0 vacuous
tri/t27b/builtin_plan.t27 25/25 pass, 198 asserts 25 pass, 0 FAIL, 0 vacuous
  • t27b test --blockers no longer lists ExprCall(std.*) for reel_particles_mux or zig_open_slice. reel_particles_mux now passes in full (its @mod blocker went with t27b: a narrow signed @mod widens to the i64 routine -- arena_heap and file_io_contract pass (Closes #10423) #10431). It has no ledger row; the ledger refresh handles it.
  • Corpus run of specs (2247 files): no ledgered row changed except zig_open_slice (blocked to pass). 34 rows read timeout on this loaded qemu lab at the default 10 s, none of them print-related; the 18 fail files are not ledgered and none contains std.debug.print.
  • The t27b crate tests on the lab: source 59, tail 25, blockers 10, stdmem 5, vacuous 3, all pass.

No timing here is a speed result (qemu).

🤖 Generated with Claude Code

@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 12:40
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 12:40:12 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != 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).

…s, reel_particles_mux loses its std.* blocker (Closes #10449)

debug_print_plan.t27 decides: in a fn Zig never analyzes, a print is skipped
and its arguments are not lowered; in an analyzed fn, a literal format with a
tuple that fits (check) runs its arguments in order, once each, and drops
them; anything else is refused with a name and a detail. builtin_plan.t27
gains the assert and eval-branch-quota plans that lower.rs glue held inline.
lower.rs net is -27 lines. Conformance cases are in discard_value.t27, and
tail.rs pins its test count (5 -> 7).

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 12:49:03 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != 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).

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 std.debug.print by a plan in t27 (reel_particles_mux, zig_open_slice)

1 participant