From 315cc146b7416b1c3bb28399f0d0cc1f28f18e76 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sat, 3 Oct 2026 05:05:57 +0000 Subject: [PATCH 1/9] Emitter: item bounds reach every impl and fn header, lambda arguments are not unwrapped; five text crossings repaired in source The emitted Rust closure of extdeps.realization.materialization_store_local did not build (84 rustc errors at zero blocking diagnostics). Three classes: A. v1.compiler.trait_derive_emit: the hand-written Debug/PartialEq impl headers for FreeMonoid- and Set-carrying items omitted the item header's own Clone bound, and a generic fn over a Set element carried no Ord. One header renderer now reads the bound record the item header prints; a signature-read set-element row sits beside the keyed-map one. C. v1.compiler.emit_rust: rust_call_arg_fail_closed_unwrap read a lambda argument's body type as the argument's own and appended .expect(..) into the closure body. B. Five kernel-String values at structural-text parameters. Not an emitter defect: these are specimens of gunbc.rung_drop text_boundary_identity_wall, repaired in source with existing kernel-text operations (parent decision, quick-gull-60). The drop and its trigger are unchanged. Control: gunbc test //gunbc/instruments:native-materialization-store-closure emits, cargo builds and runs the closure. Stage0 regenerated; regen fixed point equal. Co-Authored-By: Claude Opus 5.5 (1M context) --- dag/gunbc/instrument_targets.dag | 27 +- .../native_materialization_store_closure.dag | 188 +++++++++++++ ...epted_source_emits_uncompilable_target.dag | 3 +- .../rung_drop/text_boundary_identity_wall.dag | 2 +- dag/std/effect_grant.dag | 6 +- .../generic_item_ord_bound_witness_test.dag | 56 +++- ...d_call_target_realization_witness_test.dag | 16 ++ docs/design-rung-drops.md | 4 +- src/v1/05_emit_rust.dag | 92 ++++--- src/v1/stage0/src/target_invocation_host.rs | 6 + src/v1/stage0/src/v1_compiler_emit_rust.rs | 96 +++++-- .../src/v1_compiler_trait_derive_emit.rs | 251 ++++++++++++------ src/v1/trait_derive_emit.dag | 154 ++++++++--- src/v2/compiler/self_host/generation.dag | 4 +- 14 files changed, 713 insertions(+), 192 deletions(-) create mode 100644 dag/gunbc/instruments/native_materialization_store_closure.dag diff --git a/dag/gunbc/instrument_targets.dag b/dag/gunbc/instrument_targets.dag index 7456b794f75..0a109688565 100644 --- a/dag/gunbc/instrument_targets.dag +++ b/dag/gunbc/instrument_targets.dag @@ -306,6 +306,23 @@ fn dag_emit_real_grammar_round_trips_entry() -> String { "dag/gunbc/instruments/dag_emit_real_grammar_round_trips.dag" } +// THE MATERIALIZATION STORE CLOSURE, EMITTED, BUILT UNDER CARGO AND RUN: the NativeClaimDriver +// program gunbc.instruments.native_materialization_store_closure, whose closure contains +// extdeps.realization.materialization_store_local. It is the executing control for three classes of +// accepted source that emitted Rust rustc refused -- item bounds missing from hand-written impl and +// fn headers, an optional-returning lambda unwrapped inside its own body, and five kernel-String +// values at structural-text parameters (specimens of gunbc.rung_drop text_boundary_identity_wall) +// -- so the BUILD is a verdict here, not only the cases: a regression in any of them is a red +// emitted-crate build before a single case runs. Run by name, not a merge gate. +// `gunbc test //gunbc/instruments:native-materialization-store-closure`. +fn native_materialization_store_closure_label() -> Label { + Label { package: instruments_package() target: TargetName { name: "native-materialization-store-closure" } } +} + +fn native_materialization_store_closure_entry() -> String { + "dag/gunbc/instruments/native_materialization_store_closure.dag" +} + // O(corpus) exact-head join of evaluation_store_address callers plus the fail-closed src/v2 // call-form scan. Not a DiscoverySelection floor witness (enrolment_bound_without_ceiling); // not a required CI job. `gunbc test //gunbc/instruments:evaluation-store-address-exact-head`. @@ -470,6 +487,10 @@ fn dag_emit_real_grammar_round_trips_binding() -> TargetBinding { TargetBinding { target: dag_emit_real_grammar_round_trips_label() producer: NativeClaimProgramProducer { entry: dag_emit_real_grammar_round_trips_entry() } } } +fn native_materialization_store_closure_binding() -> TargetBinding { + TargetBinding { target: native_materialization_store_closure_label() producer: NativeClaimProgramProducer { entry: native_materialization_store_closure_entry() } } +} + fn v2_native_frontier_binding() -> TargetBinding { TargetBinding { target: v2_native_frontier_label() producer: V2NativeFrontierProducer {} } } @@ -617,7 +638,8 @@ fn instrument_targets() -> List