You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27b: lower plain enums to integer tags (first rejection in 89 specs) #6146
t27b (cli/t27b, the native AArch64 backend) refuses every spec that declares an enum. On the Railway t27b lab run of 2026-10-04 (https://t27b-lab-production.up.railway.app/latest.json, ref f59fd76), EnumDecl is the first rejecting construct in 89 spec files and occurs 272 times in all. The reference path (t27c gen + zig test) passes many of them, so each is a file t27b should run.
Today cli/t27b/src/lower.rs records an enum only as a type name (l.type_decls.insert(item.name.clone(), "enum"), pass 1) and lowers no values for it. The task: lower a plain enum (no payloads) to integer tags, so that E.variant constants, ==/!= between two values of one enum, a switch over an enum, and enum-typed params/returns/locals compile natively. Enums with payloads or explicit tag types stay rejected, with the rejection naming the construct exactly as today.
The steward (not the bee) merges, measures the corpus on the lab and reports on #6063. CI runs the cargo tests; do not build on the owner's machine.
Boundary
cli/t27b/src/lower.rs
cli/t27b/tests/differential.rs
User Scenarios
A spec with const Color = enum { red, green, blue }; and a test assert(pick(1) == Color.green) runs under t27b test with the same verdict as the reference path.
A spec that switches over an enum value and returns an integer per arm passes under t27b exactly as under zig test.
A spec with an enum carrying a payload is still rejected, and t27b corpus --blockers still names it.
Requirements
FR-001 -- plain enums lower to integer tags in declaration order; E.v is a constant, ==/!= and switch work on them, and they can be params, returns and locals.
FR-002 -- payload enums and explicit tag types stay a rejection (never an interpreter fallback, never a skipped test).
FR-003 -- at least one differential test in cli/t27b/tests/differential.rs named enum_... that compiles an enum spec and compares the JIT result with the reference evaluator. JIT and evaluator must agree; a mismatch is a failure, not a skip.
Success Criteria
grep -c "fn enum_" cli/t27b/tests/differential.rs prints at least 1
grep -c "EnumDecl" cli/t27b/src/lower.rs prints at least 2
grep -c "interpreter fallback" cli/t27b/src/lower.rs prints 0
Steward (epic #6063): no owner seen after about 3 h, so the steward lane is taking this. The branch is claude/t27b-enums, built on #6249 because all of them edit cli/t27b/src/lower.rs. After slices landed, EnumDecl is the top first rejection: 109 files, from t27b corpus specs on claude/t27b-slices 1724748.
Activity
gHashTag commentedon Oct 4, 2026
Steward (epic #6063): no owner seen after about 3 h, so the steward lane is taking this. The branch is
claude/t27b-enums, built on #6249 because all of them editcli/t27b/src/lower.rs. After slices landed, EnumDecl is the top first rejection: 109 files, fromt27b corpus specson claude/t27b-slices 1724748.🤖 Generated with Claude Code
Merge pull request #6254 from gHashTag/claude/t27b-enums