Skip to content

t27b: lower std.debug.print by a plan in t27 (reel_particles_mux, zig_open_slice) #10449

Closed

Description

@gHashTag

Follow-up to #10423 / PR #10431, t27b coverage epic #6063.

Boundary

  • specs/tri/t27b/debug_print_plan.t27 (the decision, new) and its generated gen/rust/tri/t27b/debug_print_plan.rs (t27c gen-rust).
  • 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 here.
  • specs/tri/t27b/conformance/discard_value.t27 (conformance cases; no new file).
  • cli/t27b/src/lower.rs glue only, net <= 0 lines.
  • docs/reports/t27b_expectations.json rows and .trinity/seals/ for the specs that move.
  • Out of scope: running the print (stderr is not observable to a verdict), std.debug.print with a non-literal format, any other std.* call.

User Scenarios

  • Given a spec whose main or helper fn calls std.debug.print("{d}:{d}\n", .{ i, f(i) }) (specs/compiler/zig_open_slice.t27, specs/t27f/reel_particles_mux.t27 main), when t27b compiles it, then it does not refuse with ExprCall(std.*); in a fn Zig analyzes the arguments run in order, once each, and in a fn nothing analyzed reaches nothing runs.
  • Given an analyzed fn whose format does not fit its tuple (a count mismatch, {d} of a bool, {s} of an integer), when t27b compiles it, then it refuses with a named reason, as the reference does not compile it.

Requirements

  • FR-001: t27b MUST skip a std.debug.print in a fn Zig never analyzes, without lowering its arguments.
  • FR-002: In an analyzed fn t27b MUST lower the arguments of std.debug.print(<string literal>, .{ ... }) left to right, once each, and drop the values, once debug_print_plan.t27 check accepts the format against the argument kinds.
  • FR-003: t27b MUST refuse any other shape or a format that does not fit, with a name and detail from the plan.
  • FR-004: The choice and the measured format matrix MUST be recorded in debug_print_plan.t27 with tests.

Success Criteria

  1. t27b test --blockers no longer lists ExprCall(std.*) for specs/t27f/reel_particles_mux.t27 or specs/compiler/zig_open_slice.t27.
  2. t27b test --check agrees with t27c test-report on specs/tri/t27b/debug_print_plan.t27, specs/tri/t27b/conformance/discard_value.t27 and specs/tri/t27b/builtin_plan.t27.
  3. docs/reports/t27b_expectations.json moves zig_open_slice to pass and max_not_pass falls from 75 to 74.
  4. Seals are re-saved and the hand-written cli/t27b/src/lower.rs is net <= 0 lines (git diff --numstat).

Activity

  1. added 2 commits that reference this issue on Oct 18, 2026
    3efff9c
    7aa6e92
  2. added a commit that references this issue on Oct 18, 2026
    1ef60ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions