Repository navigation
t27b: an untyped list local that the code indexes lowers as a tuple, from a t27 plan (Closes #8050) - #8055
Merged
Conversation
…g tuple (Closes #8050) specs/tri/t27b/conformance/tuple_local_index.t27 pins what the reference does with the shapes of ternary_gates.t27 and ultra_engine_v70_ultimate.t27: a `[_]i32{ ... }` of typed module consts and a `[]T{ ... }` of struct literals with a str field, read at constant indices with calls reading them, and an invariant that indexes in a loop. gen-zig prints `.{ ... }`, a tuple, and Zig 0.16 takes a run-time index into one only at compile time (measured: in a test it does not compile, "unable to resolve comptime value"). t27c test-report (zig 0.16.0, t27c lab): 2/2 pass, 0 vacuous, 6 runtime asserts; the invariant compiles. 8 of 8 mutants are killed by the reference and by t27b. Sealed (seal --save, then --verify: all hashes MATCH). Part of #6063. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…from a t27 plan (Closes #8050) The decisions are specs/tri/t27b/tuple_local_plan.t27, mounted through t27c gen-rust (gen/rust/tri/t27b/tuple_local_plan.rs): - A local `const x = [_]T{ ... }` with no annotation, whose literal names T and whose every element is a struct literal of T or a module const declared as T, is taken: read-only data, so that a constant-index read folds as Zig's comptime field does, or a constant aggregate where T holds a str. Anything else keeps "array literal with no result type". - An index into it is refused as ExprIndex(tuple) when it is not a constant and the code is neither an invariant (a comptime block in the reference) nor a body Zig never analyzes (a bench, a fn no test reaches). Plan: 6/6 pass under t27c test-report, 0 vacuous; 11 of 11 plan mutants killed. gen-rust output is what the lab's t27c prints; sealed (seal --verify: all hashes MATCH). Glue: lower/arraylit.rs +31 (tuple_array_local), lower.rs +14 (the mount, the name set, the call in the local, the check in index). Tests: cli/t27b/tests/arraylit.rs +17 runs the conformance spec and checks the refusal of a run-time index in a test. Corpus (t27c lab, qemu-aarch64, master 6b6386e's t27b against this branch's over the same tree): ternary_gates.t27, ultra_engine_v70_ultimate.t27 and the conformance spec move from ExprArrayLiteral to pass; nothing else changes. ternary_gates' @setEvalBranchQuota was already gone (see #7410). Part of #6063. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cs pass; AGENTS.md remainder (Closes #8050) docs/reports/t27b_expectations.json: `tri t27b ratchet --bless --accept-new` over the t27b lab run of master 7a07828 with this branch's t27b verdicts for the files it changes (t27c lab corpus, master binary against branch binary), composed onto master's ledger with only these rows: - ternary_gates.t27, ultra_engine_v70_ultimate.t27: blocked (ExprArrayLiteral) -> pass - conformance/tuple_local_index.t27, tuple_local_plan.t27: new, pass max_not_pass 30 -> 28, as bless sets the cap. AGENTS.md: `wc -l` over master 6b6386e: cli/t27b/src/*.rs 15271 -> 15285, src/*/*.rs 1233 -> 1264, cli/t27b/tests/*.rs 8191 -> 8208. Part of #6063. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 9, 2026 07:21
This was referenced Oct 9, 2026
Merged
Merged
From master's side (#7924's float_as plan, and others). docs/reports/t27b_expectations.json: master's ledger plus this branch's four rows, recomposed: max_not_pass 29 -> 27. AGENTS.md: master's remainder plus this branch's clause, re-measured with `wc -l` over master 09ffc2f: src/*.rs 15271 -> 15285, src/*/*.rs 1239 -> 1270, tests/*.rs 8205 -> 8222. Merged-tree checks on the t27c lab: cargo test --release -p t27b 134 passed, 0 failed; under `t27b test --check` tuple_local_index.t27, tuple_local_plan.t27, ternary_gates.t27, ultra_engine_v70_ultimate.t27 and master's float_call_cast.t27 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Contributor
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
Merged
Contributor
PR DashboardGenerated at: 2026-10-09 15:23:29 UTC
Summary
Seal Status
|
Merged from master's side. Only the ledger conflicted; the t27b remainder line is re-measured with wc -l on master e3b8c51. The ledger is master's with only this lane's four rows composed on top (max_not_pass 20 -> 18). Lab check on the merge: the four lane specs pass under t27b --check (2/2, 12/12, 12/12, 3/3), and cargo test -p t27b gives 138 passed and 0 failed. Closes #8050 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
disabled auto-merge
October 9, 2026 15:26
Contributor
PR DashboardGenerated at: 2026-10-09 15:32:04 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
Merged
Merged from master's side. Only AGENTS.md conflicted; the t27b remainder line is re-measured with wc -l on master 0fca4bd. The ledger is master's with only this lane's four rows composed on top (max_not_pass 20 -> 18). Lab check on the merge: the four lane specs pass under t27b --check (2/2, 12/12, 12/12, 3/3), and cargo test -p t27b gives 138 passed and 0 failed. Closes #8050 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-09 16:21:22 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
Merged
This was referenced Oct 9, 2026
Merged
Merged from master's side. Only AGENTS.md conflicted; the t27b remainder line is re-measured with wc -l on master d2b5fc1. The ledger is master's with only this lane's four rows composed on top (max_not_pass 20 -> 18). Lab check on the merge: the four lane specs pass under t27b --check (2/2, 12/12, 12/12, 3/3), string_slice_literal passes 6/6, and cargo test -p t27b gives 138 passed and 0 failed. Closes #8050 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-09 17:50:02 UTC
Summary
Seal Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8050. Part of #6063 (t27b coverage, item C10 of #6488).
Net hand-written lines under
cli/t27b/: -18 (+79 -97), per the owner rule of 2026-10-09: "t27b must be generated entirely from .t27 specs". The glue for the untyped list local is paid for by porting the tuple rules ofcli/t27b/src/lower/tuple.rsinto the same plan,specs/tri/t27b/tuple_local_plan.t27, and deleting the hand code.Decision
const vals = [_]i32{ ... };with no annotation is printed byt27c genasconst vals = .{ ... };. That is a Zig tuple whose fields have the element values' types, and they are comptime fields where the values are compile-time known. Measured in the reference:comptime {}block.t27b now lowers such a local the same way, from
specs/tri/t27b/tuple_local_plan.t27:ExprIndex(tuple): a run-time index outside an invariant, a bench or a fn no test reaches.ternary_gates' second blocker,
@setEvalBranchQuota, was already gone on master (see #7410 and #7459).The port
Moved from
cli/t27b/src/lower/tuple.rsinto the plan (gen-rust moduletl):is_tuple,splitandkeydecide when a return type is a tuple. Its elements are split on every comma and trimmed, as the reference splits them. Each name and type comes back as a byte range. The names are all present or all absent.keygives the text the struct is interned by.assigns:(a, b) = initis taken only at the top of a test, and only as=.what(r)andwhy(r): the construct and the words of each tuple refusal. Eachwhyhas a{}hole for every value the glue fills in, and gives the old message byte for byte.tuple.rs(what the reference does with tuples) moves into the plan's header.The reference prints
!(a or b)as!a or b(filed as #8228), so the plan names that condition as a fn (is_name_byte).Evidence
All on the t27c Railway lab (zig 0.16.0, t27c built from the branch's master); t27b runs under qemu-aarch64, with the JIT and the interpreter agreeing.
The port changes nothing. I ran the whole spec corpus (1716 files) under this lane's t27b before the port and after it, on the same tree. No file differs in verdict, first refusal, blockers list, or test, invariant and assert counts.
tuples_rejectionsandtuples_as_the_reference_lowers_them, which check the tuple refusals' words, still pass. On the five corpus files refused at a tuple type, the full--blockersoutput is identical (same md5).Reference:
t27c test-reportpassestuple_local_plan.t2712/12 andconformance/tuple_local_index.t272/2 (6 runtime asserts; its invariant compiles). Both have 0 vacuous passes.t27b (
t27b test --check):tuple_local_plan.t27conformance/tuple_local_index.t27isa/ternary_gates.t27ultra_engine_v70_ultimate.t27Mutants: 31 of 31 for the plan (11 for the local, 20 for the ported rules) and 8 of 8 for the conformance spec, killed by the reference and by t27b.
Seals: both specs are sealed (
seal --save, then--verify: all hashes MATCH).Corpus, master's t27b against this branch's (before the port): exactly ternary_gates, ultra_engine_v70_ultimate and the conformance spec move from
ExprArrayLiteralto pass.Tests:
cargo test --release -p t27bgives 138 passed and 0 failed, on the port head and on the merge with afc601f.Lines by file
Against master afc601f; the counted files are the hand-written ones under
cli/t27b/.cli/t27b/src/lower/tuple.rscli/t27b/src/lower/arraylit.rstuple_array_local)cli/t27b/src/lower.rsindex)cli/t27b/tests/arraylit.rsgen/rust/tri/t27b/tuple_local_plan.rsspecs/tri/t27b/tuple_local_plan.t27specs/tri/t27b/conformance/tuple_local_index.t27.trinity/seals/docs/reports/t27b_expectations.jsonAGENTS.mdHand-written: +79 -97, net -18 (budget 80 added, at most 40 per file). Master's
check_budget()andcheck_all()fromgen/c/policy/own_language.cboth exit 0.wc -lover master afc601f:cli/t27b/src/*.rs15261 -> 15274,cli/t27b/src/*/*.rs1263 -> 1222,cli/t27b/tests/*.rs8274 -> 8284.Ledger
Only the rows that move: ternary_gates.t27 and ultra_engine_v70_ultimate.t27 go from blocked to pass, and the two new specs are new rows that pass. On master afc601f's ledger, max_not_pass 21 -> 19.
Receipt
Signed lane receipts from the t27b lab (#7686), compared on the lab from
/work/t27with/work/t27c-master corpus-receipt compare BASE HEAD --challenge-head <mine>:lane improvedfor ternary_gates.t27, ultra_engine_v70_ultimate.t27, tuple_local_index.t27 and tuple_local_plan.t27; no other file changed. The head run had 0 mismatches, 0 reference disagreements and no ratchet findings on these files.lane improvedfor the same four files: ternary_gates.t27, ultra_engine_v70_ultimate.t27, tuple_local_index.t27 and tuple_local_plan.t27; no other file changed.Master was merged in from master's side several times. Each conflict was in the ledger, the AGENTS.md remainder line, or a test appended at the same place in
tests/arraylit.rs. Each merge was re-checked on the t27c lab.Generated with Claude Code