CR-F2 Arm-Parity Reality (2026-06-05)
CR-F2 Arm-Parity Reality
Section titled “CR-F2 Arm-Parity Reality”Measured 2026-06-05 against
main @ 7a3aaf4408with avoxbinary built--features script-execution. This is the first behavioral measurement of cross-arm parity (CR-F2) and it is decisive.
Headline
Section titled “Headline”The two execution arms are fully divergent, not subtly drifting:
| Arm | main()-goldens that work |
|---|---|
--mode interp (tree-walking interpreter) | 10 / 10 run and match their // EXPECT: output |
--mode script (codegen-rust → cargo compile + run) | 3 / 10 (was 0/10 → 1 → 3; noop + while_loop_algorithms + decimal_math green as of 2026-06-05) |
The interpreter is production-shaped for these programs. The codegen-rust
arm cannot compile even the trivial program fn main() to int { return 0 }
(examples/golden/mesh/noop.vox). CR-F2 (all-three-arm byte parity) is
therefore not a gate that can go green today — it is blocked on a
substantial codegen-rust repair backlog. (The codegen-ts arm was not yet
measured; codegen-rust must work first.)
This concretely confirms the v1.0-criteria-advisory premise that “arms of the compiler are still not fully working”: one arm is real, the other does not compile basic programs.
The map (all 10 main()-goldens, --mode script)
Section titled “The map (all 10 main()-goldens, --mode script)”FAIL adt_multi_field FAIL json_as_typed FAIL range_and_indexingFAIL closures_hof FAIL noop FAIL regex_free_functionsFAIL decimal_math FAIL process_run FAIL scrape_demoFAIL env_and_pathAll interp-passing; all script-failing.
Categorized codegen-rust repair backlog
Section titled “Categorized codegen-rust repair backlog”Each is a distinct defect. Ordered by leverage (a fix unblocks many programs).
-
fn main() to <T>return type not handled (highest leverage — every value-returning main hits it). ✅ FIXED 2026-06-05 (commit f982b90ac3). codegen-rust now runs a non-Unit main’s body in a closure and prints the result, mirroring interp.mesh/noop.vox(fn main() to int { return 0 }) compiles, runs, and prints0— CR-F2 ratcheted 0/10 → 1/10. The other value-returning mains (tuple_destructure,range_and_indexing,closures_hof,json_as_typed) cleared the main-return error and now fail on their separate body bugs below (#5/#6). -
Missing generated
[dependencies]fordecand regex. The NativeCargo.tomltemplate (pipeline.rs~line 173) has a fixed dep set (tokio/serde/serde_json/tracing/vox-actor-runtime) — norust_decimal, noregex— but codegen emitsrust_decimal::Decimalfordecliterals.E0433 cannot find crate rust_decimal. Fix: add deps conditionally on construct usage (or route decimals/regex throughvox-actor-runtimere-exports). Triggers:decimal_math,regex_free_functions. -
Option::Noneemitted as a tuple variant →E0532 expected tuple struct or tuple variant, found unit variant None. Triggers:while_loop_algorithms. -
Regex string-escape emission →
error: unknown character escape: w(a\win a Vox string is emitted into Rust source without re-escaping). Triggers:regex_free_functions. -
Loop / binding variable scoping →
E0425 cannot find value i. A loop or destructuring variable is referenced out of the scope codegen placed it in. Triggers:tuple_destructure. -
Jsontype not emitted →E0425 cannot find type Json. The@json_as/json.parsepath references aJsontype the Rust emitter never defines. Triggers:json_as_typed. -
String-interpolation type mismatches →
E0308. Interpolated non-string scalars aren’t coerced toString. Triggers:string_interpolation.
(scrape_demo, process_run, env_and_path exercise I/O builtins and were
not individually triaged — fix the above first, then re-measure.)
Implication for v1.0
Section titled “Implication for v1.0”- CR-F2 stays red and blocked until the codegen-rust backlog above is
worked down. It should be implemented as a ratcheting baseline gate
(record the current
0/10, assert it only improves, require byte-parity where script does compile), feature-gated behindscript-executionand opt-in (the defaultvoxbinary lacks the feature, and script mode compiles a fresh cargo crate per program — too slow for default CI; run it nightly or on demand). - The maintainer’s “all three arms at parity” steer is a large body of work, not a finishing touch. Recommend sequencing: codegen-rust to parity first (interp is the reference), then codegen-ts.
- This is the strongest single piece of evidence for the advisory’s core thesis. The behavioral substrate (CR-F1) made it measurable; the measurement says the compiler’s second arm is not yet a compiler.
Reproduce
Section titled “Reproduce”cargo build -p vox-cli --bin vox # native --mode script is default-on (no flag)# interp:./target/debug/vox run --mode interp examples/golden/mesh/noop.vox # -> 0# script (codegen-rust): 3/10 main-goldens green as of 2026-06-05./target/debug/vox run --mode script examples/golden/mesh/noop.vox # -> 0Build note (2026-06-06): the native
--mode scriptlane is now default-on (script-executionfeature, lightweight). The heavy Wasmtime WASI lane moved to opt-in--features script-wasi— measured at +69 crates / ~5 min, all wasmtime/cranelift, which the native lane never needed.