From 561db6bae3c357dcb8f252bf5cf861575232d20a Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sat, 3 Oct 2026 18:33:08 +0000 Subject: [PATCH 1/2] emit_rust: hand-written supplemental impl headers carry the item header's bounds (WIP, mirrors not regenerated) Co-Authored-By: Claude Opus 5.5 (1M context) --- dag/gunbc/instrument_targets.dag | 23 +++- .../instruments/native_emission_controls.dag | 126 ++++++++++++++++++ .../generic_item_clone_bound_witness_test.dag | 60 ++++++++- src/v1/05_emit_rust.dag | 99 +++++--------- src/v1/stage0/src/target_invocation_host.rs | 6 + src/v1/trait_derive_emit.dag | 78 +++++++---- 6 files changed, 301 insertions(+), 91 deletions(-) create mode 100644 dag/gunbc/instruments/native_emission_controls.dag diff --git a/dag/gunbc/instrument_targets.dag b/dag/gunbc/instrument_targets.dag index 2888b18b959..013817726cf 100644 --- a/dag/gunbc/instrument_targets.dag +++ b/dag/gunbc/instrument_targets.dag @@ -323,6 +323,19 @@ fn dag_emit_real_grammar_round_trips_entry() -> String { "dag/gunbc/instruments/dag_emit_real_grammar_round_trips.dag" } +// THE NATIVE EMISSION CONTROLS: one carrier per Rust-emitter rule, emitted, built and run by the +// NativeClaimDriver program gunbc.instruments.native_emission_controls. It is the executing evidence +// that a rule's emission is a compilable program with the right answers -- the half a textual +// witness over the emitted header cannot establish. Run by name, not a merge gate. +// `gunbc test //gunbc/instruments:native-emission-controls`. +fn native_emission_controls_label() -> Label { + Label { package: instruments_package() target: TargetName { name: "native-emission-controls" } } +} + +fn native_emission_controls_entry() -> String { + "dag/gunbc/instruments/native_emission_controls.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`. @@ -497,6 +510,10 @@ fn native_app_attest_binding() -> TargetBinding { TargetBinding { target: native_app_attest_label() producer: NativeClaimProgramProducer { entry: native_app_attest_entry() } } } +fn native_emission_controls_binding() -> TargetBinding { + TargetBinding { target: native_emission_controls_label() producer: NativeClaimProgramProducer { entry: native_emission_controls_entry() } } +} + 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() } } } @@ -652,7 +669,8 @@ fn instrument_targets() -> List