Skip to content

t27b: automatic reducer for blocked and disagreeing specs (tri t27b reduce) #6445

Closed

Description

@gHashTag

Refs #6434
Refs #6063

Problem

When a spec is blocked, fails or disagrees, someone triages it by hand. Lane briefs start from whole corpus specs, often hundreds of lines with several blockers. Slips Q38 and Q40 show lanes picked on files the reference could not even compile. Nothing turns a disagreement into a minimal regression test.

Prior art: C-Reduce / C-Vise (interestingness-driven reduction), Perses (grammar-aware reduction, about half of C-Reduce's time), and Go's GOSSAHASH / x/tools/cmd/bisect (hash bisection down to the guilty function).

Change

tri t27b reduce <spec> [--family X | --disagree]:

  • does delta debugging (ddmin) over top-level declarations, then statements, then expressions, using the t27c parser so every candidate parses;
  • uses one of two interestingness tests: (a) --disagree: the reference passes and t27b disagrees (fail, ref_mismatch, crash); (b) --family X: the reference passes and t27b's first blocker is X. The reference condition stops the reducer from drifting into a reference bug;
  • writes the result to a fixtures directory with the original path and blocker in a header comment;
  • uses the reference cache so repeated candidates are free.

Optional second step: t27b --only-hash <bits> JITs only the functions whose name hash matches and interprets the rest, so tri t27b bisect <spec> can pin a failure to one function.

Done when

  • tri t27b reduce shrinks an existing blocked spec (for example one type (tuple) file) to fewer than 20 lines while keeping its family.
  • Lane briefs from tri t27b next link a reduced repro for the top family.

🤖 Generated with Claude Code

Boundary

  • bootstrap/src/compiler.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    owner-approved-foreignOwner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PRpriority/highMust fix before next milestone

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions