Repository navigation
Gate-1 repr grounding: ground modeled String to native Rust String in v1 emit - #6983
Conversation
…ding Flip discriminating controls to expect String (not FreeMonoid<Char>) after the 05_emit_rust.dag FaithfulFreeMonoid text-carrier grounding in d046e7c. Co-authored-by: Cursor <cursoragent@cursor.com>
|
review 40674 (claude APPROVE) — verified, no code change. The nit is accurate for the two seam helpers: after grounding they are identity passthroughs (
Isolated CSSL validation receipt (already on PR body): — sent from merry-newt-412 |
|
review 40681 (cursor APPROVE) — verified, no code change. The note is directionally right but worth one precision: The remaining mismatch (fn-def bodies still FreeMonoid-converting while types now ground to native — sent from merry-newt-412 |
Post-merge regen_stage0 --verify reported regen_divergence_count=1 (v1_compiler_infer_emit_info.rs stale vs live emitter). Re-emitted seed; verify now regen_divergence_count=0. Co-authored-by: Cursor <cursoragent@cursor.com>
…erialization_carriers, program_assembly, source_authority, 02_parse, 03_ingest) refuse with UNRESOLVED_CompilerError in curated probes — census + receipts in #6872 TSVs (calm-boar-697). Read the actual probe error output per module (#6986) * Gate-A flip prep + Measure nested-generic emitter fix (rebased on main) Rebased session/neat-swift-795-flip-prep onto origin/main: drop superseded module-identity/integration history already landed via #6866; retain flip infrastructure (frontier 6→12 SelfEmitted, wet enrollment, behavioral transports/shims), Measure emitter generic-env threading (EmitGraphInfo fn_generic_param_names/fn_type_env, fold lambda param_nodes, container child recursion gated to generic-fn context), stage0 regen, and nested List<List<Measure>> emit witness. PR #6881 remains draft until sign-off receipts complete. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix PR #6881 CI: exclude wet behavioral receipts and repair census gates. Hermetic discovery was running the three new self-host behavioral witnesses (shell.Mktemp.Dir has no mock); add them to witness_exclusion_substrings like the other wet receipts. Discharge Band-A OtherGate rows when the frontier module is already SelfEmitted. Rename nested-fold witness so its stem covers the new v1 emit test module for the migration-debt ratchet. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * Revert unrelated effect-namespace-grants.md collateral from Gate-A PR. Restore origin/main section 6 (FLAG A interim): workspace Read grant, ownership-implies-read note, and PR-1/PR-2 LANDED paragraphs. The hunk was accidental doc drift with no tie to the flip or emitter work. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * Add Measure sign-off POST-fix 6-module probe receipt TSV. Documents hash-verified gunbc rebuild probe results for the flip-wave baseline: emit 0-diag on all six, cargo at named next layers (std_dup on 5/6; materialization_carriers E0433 deferred per operator routing). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * Fix PR #6881 CI: regen verify gate + stage0 infer sync. Remove duplicate empty_type_env fallout from stage0 infer emit drift, and normalize rustfmt-only diffs in regen_stage0 verify so workspace cargo fmt and fresh self-compile compare cleanly. Co-authored-by: Cursor <cursoragent@cursor.com> * ci: retrigger after regen verify + cargo fmt fix (44b23d6). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * frontier: sync stage0 crate layout after honest SelfEmitted baseline revert (12→6). Regenerated stage0_crate_layout_generated artifacts to drop the six prematurely-flipped modules from hand-maintained pub mod / filename rosters now that frontier.dag marks them SeedRetained again. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(frontier): restore sweep-order monotonicity after honest revert. Re-sort compiler_frontier_sweep_order after SeedRetained revert changed tractability ranks (materialization_carriers/program_assembly → NameResolutionGap band; 00_compile → EmitSurfaceGap). Fixes compiler_frontier_census_composite_test CI failure on #6881. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * fix(frontier): align reverted behavioral transport docs with honest refresh. Six reverted-module transport docs now cite SeedRetained / honest_frontier_refresh_probe_note instead of stale "flip landed" prose. Remove three flip-wave seed stubs (parse/ingest/materialization_carriers) that were never wired into the frontier-derived crate layout. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: Gate-1 emit regression (post-#6848): the Rust emit target renders namesp * WIP: Gate-1 emit regression (post-#6848): the Rust emit target renders namesp * emit_imports: field-struct import synth asks "provides", not "physically defines" An anonymous record literal takes its type from the FIELD it initializes, so the constructed type name appears nowhere in the source and can never sit in an authored import list. emit_imports derives use-lines only from import lists, so the emitted Rust refused: E0422 cannot find struct ... in this scope. module_data_field_struct_import_names gated candidates on has_physical_type_def_in_module_filename — field type PHYSICALLY DEFINED in the module being imported from. That is narrower than the question being asked. compile_stage_memo imports CacheInterfaceCatalogFacts from extdeps.cache.types but its io/placement field types are defined in the SIBLING modules extdeps.cache.catalog_io / catalog_placement and merely re-exported, so they were rejected and no use-line was synthesized. Now uses name_in_transitive_export_surface, the existing authority for "does this module provide this name" (get_exported_names counts specific-import names as exports, which is exactly re-export) — reused, not re-minted. Routing needed no change: graph_type_import_module_filename already groups emitted use-lines by the type's DEFINING module. export_sets is threaded as a parameter rather than rebuilt inside the filter, which would have been a per-field quadratic cost-shape defect. Verified by execution, both halves: regen_divergence_count=0 (two-stage bootstrap; stage 2 with the new emitter LIVE over the whole import-BEARING seed, which is the run that counts) materialization_carriers first error advanced CacheInterfaceCatalogIoSemantics -> CacheEvidence Known residue, documented in-code not hidden: a generic field type (evidence: List<CacheEvidence>) still misses, because build_field_type_map stores only the type node's HEAD name, so CacheEvidence is absent from field_type_map entirely and no string-level test can recover it. Distinct axis, separate increment. Honest frontier refresh (receipt must match measurement, independent of any flip): 01_tokenize / 04_infer / program_partition were recorded as import_closure but all three now MEASURE as the dotted namespace-qualified render class; rows corrected. Flip wave produced ZERO flips — 4 of 5 probed modules refuse on the dotted class, which is emitted into std.collection itself and so sits in every deep closure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * emit_imports increment-2: recurse field-type node tree for import surface names. build_field_type_map now walks resolved generic/container argument nodes so List<CacheEvidence> contributes CacheEvidence to field_import_surface_names, not just the List head in field_type_map. emit_imports field-struct synth consumes the expanded surface list (rides on #6981 sibling-axis machinery). Oracle: materialization_carriers first cargo error advances past CacheEvidence E0422 (verified via cssl probe + emitted use of std_cache_interface::CacheEvidence). Co-authored-by: Cursor <cursoragent@cursor.com> * docs(emit_imports): refresh provider note after increment-2 generic axis. Replace stale KNOWN RESIDUE paragraph claiming CacheEvidence still misses — increment-2 now walks the resolved field-type node tree into field_import_surface_names. Update frontier_probe_types receipt to record materialization_carriers advancing past CacheEvidence E0422. Co-authored-by: Cursor <cursoragent@cursor.com> * ci: cargo fmt for increment-2 stage0 + test module ordering. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: unresolved_compiler_error diagnosis + fix: 6 modules (00_compile, materi * Regen stage0 infer_emit_info seed after main merge (#6983). Post-merge regen_stage0 --verify reported regen_divergence_count=1 (v1_compiler_infer_emit_info.rs stale vs live emitter). Re-emitted seed; verify now regen_divergence_count=0. Co-authored-by: Cursor <cursoragent@cursor.com> * Regen std_measure seed after main merge (#6991 measure.dag). Post-merge regen_stage0 --verify reported regen_divergence_count=1 (std_measure.rs; main's measure.dag delta, not #7002 cli_run). Re-emitted; verify now regen_divergence_count=0. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(probes): emitted deep-module E0308 baseline pre-#6981 (crisp-fox-839) Measure repr_mismatch_emitted_e0308_probe on 04_infer and materialization_carriers at main@3bd736d230: E0308 already 0 on 04_infer and module-level on materialization_carriers (post-#6983 repr grounding); remaining cargo refuse is dotted-alias (#6981) and E0425 extdeps. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(probes): post-#6981 emitted deep-module measurement receipt 04_infer dotted-alias cleared (110->106); layer N+1 is generic-T + dup Witness. materialization_carriers E0425 is value-position qualified emit (sidecar, not fan-out gate). Co-authored-by: Cursor <cursoragent@cursor.com> * docs(probes): emitter residual site map for fan-out blocking classes Map generic-T fold closures, Witness-dup prelude, and value-position qualified emit back to 05_emit_rust.dag / 04_emit_info.dag sites. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: Emitted deep-module cargo-green validation (pre-staged for fan-out gate) * WIP: Emitted deep-module cargo-green validation (pre-staged for fan-out gate) * WIP: Emitted deep-module cargo-green validation (pre-staged for fan-out gate) --------- Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Grounds the v1-emit text carrier so modeled
String/FreeMonoid<Char>/List<Char>render as native RustStringunder all corpus reprs, dissolving the corpus_repr-gated fork (HostNative→StringvsFaithfulFreeMonoid→FreeMonoid<Char>rope).Changes in
05_emit_rust.dag(+ regen seed):is_host_text_carrier_typeis corpus_repr-agnostic (String, FreeMonoid<Char>, List<Char>)rust_named_type_base/rust_applied_type_baseno longer map faithful String → FreeMonoidrender_rust_text_carrieremitsString; host↔dag string seams are identityAdopted from bright-lynx-868 (
d046e7c3c0+55f6d2d5ec); #6982 closed as duplicate.Validation (isolated CSSL FaithfulFreeMonoid probe)
Method:
scripts/repr_mismatch_emitted_e0308_probe.sh src/v2/compiler/04_infer.dag csslfound '.')found '.')Delta: −3442 E0308 on isolated 04_infer. Remaining 109 errors are the warm-lark dotted-path regression (not repr-mismatch); emitted 652/3410 confirmation deferred until emit_imports + dotted land.
Test plan
cargo test -p v1-compiler-tests faithful_string— 5/5 greencargo test -p v1-compiler-tests map_literal_string— 4/4 greencargo test -p v1-compiler-tests optional_carrier— 4/4 green04_infer