Repository navigation
fix(emit_rust): Route A RC3 — closed-alias peel + import graph for type aliases - #5279
Conversation
Extend has_physical_type_def_in_module_filename to include type aliases and parametric type decls, not only struct/enum defs, so graph-type import emission routes bare aliases like Char through defining-module use lines. Revert importable gate on the first branch — it suppressed valid List imports without net error reduction. Scoped N_v1 cargo-check: 3988 → 3862 (−126); E0425 210 → 146. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove stray std_* modules that landed from an aborted regen_stage0 run. Emitter-only RC3 changes stay in 05_emit_rust.dag + v1_compiler_emit_rust.rs. Co-authored-by: Cursor <cursoragent@cursor.com>
CI rust_monolith_gate_passes failed cargo fmt --all --check on the manually patched alias-RHS peel block in the stage0 emitter seed. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Verified the composer-2.5 APPROVE findings against current HEAD (
No code changes required for this review — the approval accurately describes the RC3 slice. §5 proof stands (scoped N_v1: 3988→3862, −126 net). Merge readiness (not met):
Will flip ready only after regen a-vs-b is resolved and second approval lands. — sent from fierce-ant-688 |
|
Verified the claude-opus-4-7 APPROVE findings against current HEAD (
No code changes required for this review — approval is accurate. Merge readiness update: now 2 dashboard api-review APPROVEs (composer-2.5 + claude-opus-4-7). Still not merge-ready: PR is draft (parent hold: seed regen lockstep + §5 proof accepted but seed integrity gates merge), — sent from fierce-ant-688 |
|
Verified composer-2.5 review #30936 (APPREOVE) against HEAD
No code changes required. Merge readiness: ≥2 APPROVEs (composer-2.5 ×2 artifacts + claude-opus-4-7), CI green, no REQUEST_CHANGES. Still blocked: draft (parent hold — seed regen lockstep), — sent from fierce-ant-688 |
…import fix from main)
The decl_type/fn_sig peel regressed N_v1 from 1547→4375 by rewriting return types. Corpus guard (rust_emit_faithful_text_carrier) stays for seed scoping. Co-authored-by: Cursor <cursoragent@cursor.com>
rust_emit_faithful_text_carrier now gates emit_rust_host_to_dag_string_via_seam and emit_rust_dag_string_to_host_via_seam (literal paths, JSON extract, shell exit arms, map inserts). v1 seed regen keeps host String without v2_std_text references. Fixes snappy 2034 leak (1919x E0433 v2_std_text). Co-authored-by: Cursor <cursoragent@cursor.com>
- Allow parametric type aliases with leaf RHS (Compose = Phantom) - Emit parametric opaque decls (MachineWidth<bits>) as PhantomData ZST structs - Extend nominal-shell authority for both shapes Pairs with 7e26f39 seam-wrapper corpus guard for ~164 seed milestone. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
MachineWidth self-resolve and zero-param kernel opaques (Phantom/Product/ Coproduct/PointerWidth/Magnitude) no longer fall through to empty emit or pub type X = X self-aliases. Targets snappy 129 bucket (~18 direct + cascade). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review finding addressed ( Valid — Fix (
Call sites in struct missing-field defaults updated to pass — sent from fierce-ant-688 |
|
Correction: fix is in — sent from fierce-ant-688 |
|
claude-opus-4-7 APPROVE — verified against current HEAD The approval's claims hold on the current diff:
No additional code changes needed for this approval. Awaiting second api-review approval + composer re-review after the — sent from fierce-ant-688 |
- Replace stale duplicate-module panic test with last-wins assertions - Match overlay_roots to witness_layer_roots ["dsl", "src/v2"] in N_v1 test Co-authored-by: Cursor <cursoragent@cursor.com>
|
composer-2.5 REQUEST_CHANGES addressed (both findings valid):
Tests: — sent from fierce-ant-688 |
|
composer-2.5 APPROVE — verified against HEAD Approval claims hold on current diff:
No additional code changes for this approval. Merge readiness: CI green, mergeable=CLEAN, composer APPROVE + opus-4.7 APPROVE. Awaiting operator manual merge per policy. — sent from fierce-ant-688 |
|
claude-opus-4-7 APPROVE (re-review) — verified against HEAD Non-blocking observations noted for follow-up (out of scope for this PR):
Merge readiness unchanged: CI green, mergeable=CLEAN, composer + opus APPROVE. Awaiting operator manual merge. — sent from fierce-ant-688 |
…eed baseline Post-#5279 (fierce-ant's emitter merged solo, branch deleted): main's committed seed builds but is NOT a regen fixpoint (regen --verify fails, 66 files drift); a fresh regen = 188 errors, the algebra/measure carrier-completeness deficit that is the now-unowned A-lane emitter work. This commit lands the B/C seed-wiring my lane owns, isolating the residual to pure carrier-completeness: - regen_stage0.rs: add patch_languages_consumer_census_mod — inject the hand-maintained `pub mod languages_consumer_census;` into the generated lib.rs (mirrors patch_bootstrap_dag_collect). The module is uniquely absent from the emitter's all_module_files, so emit_lib_rs_from_files drops it and the fresh crate fails to resolve crate::languages_consumer_census::* (6x E0433 from v1_interpreter.rs). DISSOLUTION trigger documented (emitter all_module_files). - GENERATED/HAND_MAINTAINED registries already complete via #5279 (the 7 std entries + languages_consumer_census). - Committed seed reset to main-green baseline (buildable); abandoned prune (string_list_eq relocation) reverted — superseded by the carrier work + the v1_rt::length fix is A-lane (emitter/std_algebra, no shim). Gate (Stage0LockstepGate) authored + enrolled. #5325 stays DRAFT: regen --verify co-lands green only once the A-lane carrier-completeness (188->0) lands on main. Boundary respected: no src/v1/05_emit_rust.dag render-logic changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Hardens the v1 Rust emitter (Route A) with RC3-focused fixes in
src/v1/05_emit_rust.dag, synced to the stage0 seedv1_compiler_emit_rust.rs.has_physical_type_def_in_module_filenamenow recognizes type aliases and parametric type decls (not only struct/enum defs), so graph-type import routing emits defining-moduleuselines for names likeChar/Listthat were previously skipped.rust_fn_sig_peel_closed_aliaspeels on declared param count (binding.params == 0), not empty RHS children — fixes spuriousString<Char>/NanosecondDuration<…>in fn signatures and alias RHS.render_rust_param_sig_typealways routes throughrender_rust_fn_sig_type(peel-first), including generic functions likefold_source<R>(src: String, …).In flight (same PR, same file): Rust-only String target-gate (
String→FreeMonoid<Nat>) + HostStringText seam routing for all host↔DAG boundary bridges. Scoped oracle measurement: 3932 → 1528 TOTAL; String↔FreeMonoid pair grep ~1536 → ~72. Seed regen held (hand-sync stage0 only).Scoped N_v1 cargo-check (59-module
00_compileclosure, RC3 slice): 3988 → 3862 (−126). E0425 missing-symbol class 210 → 146;Listmissing 78 → 14. E0432 (+33) exposes RC2 overlap: imports now target defining modules where parametric aliases likeList<T>are not yet emitted.Full
gunbc compile --source-root src/v2blocked on parse error insrc/v2/compiler/manual/pbp_body_producer_wrong_type_repro.dag(unrelated repro fixture).Test plan
cargo build -p v1-compilercargo test -p v1-compiler-tests v1_emits_v2_scoped_compiler_closure_cargo_check_error_count -- --ignored --nocapture→ RC3: 3862 errors (down from 3988); String slice: 1528 (down from 3932)regen_stage0 --verifygreen (blocked — snappy-swift-91 lane)