Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .trinity/seals/Explainability.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gen_hash_c": "sha256:952caf75701c86102f5920523badff0aff5810bf66fac7806c0adc63d2266169",
"gen_hash_rust": "sha256:e059173c75a58fe21330468a2d2a482ca8743039964eb931ece9b21de9136f98",
"gen_hash_rust": "sha256:6d875be3225c359d230ae0bdd7b5b32461ee45f7803789a6d9a307aa35eb5746",
"gen_hash_verilog": "sha256:f0f9fca4fd8795607c9ac572ef510888f9467aff2f64eadf8725b94993e205df",
"gen_hash_zig": "sha256:f52e5c26de65c941c91654b1cfb4ccaed8938f99b756db204f28a764fb149291",
"module": "Explainability",
Expand Down
2 changes: 1 addition & 1 deletion .trinity/seals/NotebookLM.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gen_hash_c": "sha256:1363497601bffd09dd3ee2c619f834af65869e1e4f2ed21dcc9a03ebbec9b21c",
"gen_hash_rust": "sha256:121bd3164607487cc77b79c5604573fc8bfa4b1a39aa1926f53bfa4247c1dc2c",
"gen_hash_rust": "sha256:a0b1a594713925c0c571351b89a61f6b6a0f8adc20ffcef8f926037ff4d03b43",
"gen_hash_verilog": "sha256:7716f39dc3d0baf658917208a7c294da3ed66d8d849778e3a0d170e7083115b4",
"gen_hash_zig": "sha256:534abb99380c2bc0decab8ee239edaac260e956b20891b17728a337b40ba104c",
"module": "NotebookLM",
Expand Down
2 changes: 1 addition & 1 deletion .trinity/seals/ProofTrace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gen_hash_c": "sha256:05385a9de9099e0a596ac23cb2231fdca952db8e92df3681479a44aa12026d09",
"gen_hash_rust": "sha256:0574a717a935eeb52e81ec955b24f7d36ddae62bae3b86ac4ac7a27a6847e467",
"gen_hash_rust": "sha256:4abb3379bc73d56f926b4605e8a1cc9a97bc4d9979a95549792111aca90ca460",
"gen_hash_verilog": "sha256:277e8f3d888b436b3386fa512f275d3994fcc40b711df9bb60d10815457e9a1d",
"gen_hash_zig": "sha256:85ca85b32a903b330cd0fd1b543c3ba5eefb4f91d83528baaece0cd33d8d331c",
"module": "ProofTrace",
Expand Down
4 changes: 2 additions & 2 deletions .trinity/seals/ar_Explainability.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"gen_hash_c": "sha256:952caf75701c86102f5920523badff0aff5810bf66fac7806c0adc63d2266169",
"gen_hash_rust": "sha256:e059173c75a58fe21330468a2d2a482ca8743039964eb931ece9b21de9136f98",
"gen_hash_rust": "sha256:6d875be3225c359d230ae0bdd7b5b32461ee45f7803789a6d9a307aa35eb5746",
"gen_hash_verilog": "sha256:f0f9fca4fd8795607c9ac572ef510888f9467aff2f64eadf8725b94993e205df",
"gen_hash_zig": "sha256:f52e5c26de65c941c91654b1cfb4ccaed8938f99b756db204f28a764fb149291",
"module": "explainability",
"ring": 12,
"sealed_at": "2026-09-05T19:32:03Z",
"sealed_at": "2026-09-06T02:37:18Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:80e970c2be2a313cfca43bc0bbb20397259952dd2d26af5b1359e1d26ea1a4b3",
"spec_path": "specs/ar/explainability.t27"
Expand Down
2 changes: 1 addition & 1 deletion .trinity/seals/ar_ProofTrace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gen_hash_c": "sha256:05385a9de9099e0a596ac23cb2231fdca952db8e92df3681479a44aa12026d09",
"gen_hash_rust": "sha256:0574a717a935eeb52e81ec955b24f7d36ddae62bae3b86ac4ac7a27a6847e467",
"gen_hash_rust": "sha256:4abb3379bc73d56f926b4605e8a1cc9a97bc4d9979a95549792111aca90ca460",
"gen_hash_verilog": "sha256:277e8f3d888b436b3386fa512f275d3994fcc40b711df9bb60d10815457e9a1d",
"gen_hash_zig": "sha256:85ca85b32a903b330cd0fd1b543c3ba5eefb4f91d83528baaece0cd33d8d331c",
"module": "ProofTrace",
Expand Down
4 changes: 2 additions & 2 deletions .trinity/seals/ar_coa_planning.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"gen_hash_c": "sha256:51034bfe26f2a680c1db02232415a90a4e84420a86c9d4f19602686b9acd5afb",
"gen_hash_rust": "sha256:4424f92caae7ab6275bb031f0fa6521e4f3241925c2b1f608370a79d95cfdf3e",
"gen_hash_rust": "sha256:d68a3dfc5332bf206443b1befc475940231962e3f1a69f7944daae4006d81f96",
"gen_hash_verilog": "sha256:29e4a69b72122f9715a543d92d7ee68c8d554ec5b8aefe2f797e9b86406cb8ce",
"gen_hash_zig": "sha256:f631078ead3dd650ee408409b06bdedaa66f64de0be918128b0caac668b81a33",
"module": "coa_planning",
"ring": 12,
"sealed_at": "2026-09-05T19:32:03Z",
"sealed_at": "2026-09-06T02:37:18Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:d6b1c23a9296e687435aa23bb3dff4adac3b81e5ff938ac41294d8936a62a7c8",
"spec_path": "specs/ar/coa_planning.t27"
Expand Down
4 changes: 2 additions & 2 deletions .trinity/seals/ar_proof_trace.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"gen_hash_c": "sha256:05385a9de9099e0a596ac23cb2231fdca952db8e92df3681479a44aa12026d09",
"gen_hash_rust": "sha256:0574a717a935eeb52e81ec955b24f7d36ddae62bae3b86ac4ac7a27a6847e467",
"gen_hash_rust": "sha256:4abb3379bc73d56f926b4605e8a1cc9a97bc4d9979a95549792111aca90ca460",
"gen_hash_verilog": "sha256:277e8f3d888b436b3386fa512f275d3994fcc40b711df9bb60d10815457e9a1d",
"gen_hash_zig": "sha256:85ca85b32a903b330cd0fd1b543c3ba5eefb4f91d83528baaece0cd33d8d331c",
"module": "proof_trace",
"ring": 12,
"sealed_at": "2026-09-05T19:32:03Z",
"sealed_at": "2026-09-06T02:37:18Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:2591d4523eed910a4add8ecd6d7f8a33c9883ad3449955ac3c347d9744ab2a04",
"spec_path": "specs/ar/proof_trace.t27"
Expand Down
2 changes: 1 addition & 1 deletion .trinity/seals/coa_planning.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gen_hash_c": "sha256:51034bfe26f2a680c1db02232415a90a4e84420a86c9d4f19602686b9acd5afb",
"gen_hash_rust": "sha256:4424f92caae7ab6275bb031f0fa6521e4f3241925c2b1f608370a79d95cfdf3e",
"gen_hash_rust": "sha256:d68a3dfc5332bf206443b1befc475940231962e3f1a69f7944daae4006d81f96",
"gen_hash_verilog": "sha256:29e4a69b72122f9715a543d92d7ee68c8d554ec5b8aefe2f797e9b86406cb8ce",
"gen_hash_zig": "sha256:f631078ead3dd650ee408409b06bdedaa66f64de0be918128b0caac668b81a33",
"module": "coa_planning",
Expand Down
4 changes: 2 additions & 2 deletions .trinity/seals/coder_igla-coder-arch.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"gen_hash_c": "sha256:f0e837bf1d6031326a3a69db7843b208e653a3f527266e01c3b901b41e9efc34",
"gen_hash_rust": "sha256:333b47ca7d8c5e82185cc0de3d1273732a52d41b29ea5803be69e015ba711b57",
"gen_hash_rust": "sha256:1ba83284c5cda3c45b831b446f4139bc9f15a60d20fd659aacecc859f0b769d9",
"gen_hash_verilog": "sha256:68ee411594d2a8d1b0df9214fa06102bc4297f3d597e12fef90d8986b86670aa",
"gen_hash_zig": "sha256:825537b84cf902a2b6ba0e18ce53cb4af39d117aefac808e3ecf8bae4cc09931",
"module": "igla-coder-arch",
"ring": 12,
"sealed_at": "2026-09-05T11:21:58Z",
"sealed_at": "2026-09-06T02:37:19Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:baafdfb69f57527162bec359e9439edb7e0049f421019912200889abf9386707",
"spec_path": "specs/igla/coder/arch.t27"
Expand Down
4 changes: 2 additions & 2 deletions .trinity/seals/memory_NotebookLM.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"gen_hash_c": "sha256:1363497601bffd09dd3ee2c619f834af65869e1e4f2ed21dcc9a03ebbec9b21c",
"gen_hash_rust": "sha256:121bd3164607487cc77b79c5604573fc8bfa4b1a39aa1926f53bfa4247c1dc2c",
"gen_hash_rust": "sha256:a0b1a594713925c0c571351b89a61f6b6a0f8adc20ffcef8f926037ff4d03b43",
"gen_hash_verilog": "sha256:7716f39dc3d0baf658917208a7c294da3ed66d8d849778e3a0d170e7083115b4",
"gen_hash_zig": "sha256:534abb99380c2bc0decab8ee239edaac260e956b20891b17728a337b40ba104c",
"module": "NotebookLM",
"ring": 12,
"sealed_at": "2026-09-05T20:06:35Z",
"sealed_at": "2026-09-06T02:37:19Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:dc5b054f79d747598c75190379fe4a36400bb27af13dffe06d438f145c1af96f",
"spec_path": "specs/memory/notebooklm.t27"
Expand Down
2 changes: 1 addition & 1 deletion .trinity/seals/proof_trace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gen_hash_c": "sha256:05385a9de9099e0a596ac23cb2231fdca952db8e92df3681479a44aa12026d09",
"gen_hash_rust": "sha256:0574a717a935eeb52e81ec955b24f7d36ddae62bae3b86ac4ac7a27a6847e467",
"gen_hash_rust": "sha256:4abb3379bc73d56f926b4605e8a1cc9a97bc4d9979a95549792111aca90ca460",
"gen_hash_verilog": "sha256:277e8f3d888b436b3386fa512f275d3994fcc40b711df9bb60d10815457e9a1d",
"gen_hash_zig": "sha256:85ca85b32a903b330cd0fd1b543c3ba5eefb4f91d83528baaece0cd33d8d331c",
"module": "proof_trace",
Expand Down
4 changes: 2 additions & 2 deletions .trinity/seals/race_igla-race-cordic.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"gen_hash_c": "sha256:4405e43b030307c596bd7f1d585d2e127fc104209608a64b0b761fdabc05ae7c",
"gen_hash_rust": "sha256:bece58ffbc66085d97c01b13110a455de7beea4bc39f6892e5eb16abf6c32a7f",
"gen_hash_rust": "sha256:904b4dbf3b398af5e281b09f7a533ffe2bd67e12c646fa80c30f026f906997da",
"gen_hash_verilog": "sha256:b583ddb95a9f88564a413b72373d1a5f86231c342105564d8b46339a6ebf3fda",
"gen_hash_zig": "sha256:1c478d385f704ea235578ba0dd1942377648649a02e5430aa1086c3c530a7e8c",
"module": "igla-race-cordic",
"ring": 12,
"sealed_at": "2026-08-30T21:18:16Z",
"sealed_at": "2026-09-06T02:37:19Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:54b1b8bed209dbc8d3dfc4540fd6a44e8dabe47ae4d264d7f0d30df32a0fa6aa",
"spec_path": "specs/igla/race/cordic.t27"
Expand Down
33 changes: 33 additions & 0 deletions bootstrap/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24561,6 +24561,39 @@ impl RustCodegen {
(t, false)
};

// A TUPLE maps element by element. Without this arm `(A, B)` fell through to
// the default and was emitted verbatim, so an inner `[]f32` -- which every other
// position maps to `Vec<f32>` -- reached rustc as `[]f32`. The rule existed and
// did not travel into this position. Measured on the corpus: 6 specs.
//
// The split is DEPTH-AWARE. A naive `split(',')` would cut `(Map<K, V>, T)` into
// `Map<K` and ` V>` and produce something worse than the input.
if base_type.starts_with('(') && base_type.ends_with(')') && base_type.len() > 2 {
let inner = &base_type[1..base_type.len() - 1];
let mut parts: Vec<String> = Vec::new();
let (mut depth, mut start) = (0i32, 0usize);
for (i, c) in inner.char_indices() {
match c {
'<' | '[' | '(' => depth += 1,
'>' | ']' | ')' => depth -= 1,
',' if depth == 0 => {
parts.push(inner[start..i].to_string());
start = i + c.len_utf8();
}
_ => {}
}
}
parts.push(inner[start..].to_string());
// A one-element "tuple" is a parenthesised type, not a tuple, and Rust writes
// it without the comma. Emitting `(T,)` there would change the type.
let mapped: Vec<String> = parts
.iter()
.map(|q| Self::t27_type_to_rust(q.trim()))
.collect();
let joined = format!("({})", mapped.join(", "));
return if is_optional { format!("Option<{joined}>") } else { joined };
}

let rust_type = match base_type {
"u8" | "u16" | "u32" | "u64" | "u128" => base_type.to_string(),
"i8" | "i16" | "i32" | "i64" | "i128" => base_type.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/stage0/FROZEN_HASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ca169bfed429665e761170e0337ed3423cc6649b6a0e1c444faf3f5227bef80e bootstrap/src/compiler.rs
b109be394c5276ba477b0233a9d344b6d223becff24955ff4dda286b9870716a bootstrap/src/compiler.rs
19 changes: 19 additions & 0 deletions docs/now/2026-09-06-a-tuple-type-was-emitted-verbatim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# NOW -- A tuple type was emitted verbatim (2026-09-06)

## A tuple type was emitted verbatim (Refs #3345)

- The Rust type mapper had no arm for a tuple, so `(A, B)` fell through to the default and
an inner `[]f32` -- which every other position maps to `Vec<f32>` -- reached rustc
as `[]f32`.
- Measured: 3 specs emitted `-> (...[]...)` before, 0 after. The class is closed.
- **+0 on the column.** All three still fail on other defects; two of the three changed
their failure cause, which is how the fix was confirmed rather than assumed.
- My first count of the class was 6 and it was wrong. The matcher also caught
`std.StringHashMap([]Const u8)` and `std.HashMap(T, []T)` -- Zig standard-library
types leaking into the Rust output, not tuples. That is a separate class of 8 specs.
- The split is depth-aware, because a naive `split(',')` would cut `(Map<K, V>, T)`
into `Map<K` and ` V>` and emit something worse than the input. Controls:
`([]f32, []u8)` maps both elements; the one-element `(u32)` stays `(u32)` and does
not become the one-tuple `(u32,)`, which would be a different type.
- Found by censusing the FIRST rustc error of all 245 failures together with the generated
LINE, which is what separated four classes inside one error text.
Loading