Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dag/gunbc/ci_layer_roots.dag
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ data witness_exclusion_substrings: List<String> = [
"self_host_01_tokenize_behavioral_witness_test.dag",
"self_host_program_assembly_behavioral_witness_test.dag",
"self_host_program_partition_behavioral_witness_test.dag",
"self_host_source_authority_behavioral_witness_test.dag",
"self_host_00_compile_behavioral_witness_test.dag",
"self_host_04_infer_behavioral_witness_test.dag",
"dag_collect_fingerprint_witness_test.dag",
"dag_compile_clean_perturb_receipts_test.dag",
"test/claim/diagnostics_test.dag",
Expand Down
8 changes: 7 additions & 1 deletion dag/gunbc/stage0_crate_layout_generated.dag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import std.types { List, String }

data stage0_crate_layout_generated_note: String = "Generated by gunbc stage0_crate_layout_emit — do not hand-edit. Authority: v2.compiler.self_host.frontier; regen via dag/tools/generated_artifact_gate.dag main_wet."

data generated_pub_mod_block: String = "\npub mod v1_interpreter;\npub mod cli_run;\npub mod coproduct_reflection;\npub mod resolved_graph_cache;\npub mod shared_typecheck_store;\npub mod recorded_fixture;\npub mod memory_governor;\npub mod module_path_index;\npub mod usv_pilot_v2_std_algebra;\npub mod usv_pilot_v2_std_collection;\npub mod usv_pilot_v2_std_node;\npub mod v2_compiler_resolve;\npub mod v2_compiler_program_assembly;\npub mod v2_compiler_program_partition;\npub mod v2_compiler_tokenize;\npub mod v2_compiler_body_producer;\npub mod v2_compiler_target_carriers;\npub mod v2_compiler_discovery_enumeration;\npub mod v2_compiler_parse_engine_hooks;\npub mod v2_compiler_use_site_verdict;"
data generated_pub_mod_block: String = "\npub mod v1_interpreter;\npub mod cli_run;\npub mod coproduct_reflection;\npub mod resolved_graph_cache;\npub mod shared_typecheck_store;\npub mod recorded_fixture;\npub mod memory_governor;\npub mod module_path_index;\npub mod usv_pilot_v2_std_algebra;\npub mod usv_pilot_v2_std_collection;\npub mod usv_pilot_v2_std_node;\npub mod v2_compiler_resolve;\npub mod v2_compiler_program_assembly;\npub mod v2_compiler_program_partition;\npub mod v2_compiler_tokenize;\npub mod v2_compiler_source_authority;\npub mod v2_compiler_compile;\npub mod v2_compiler_infer;\npub mod v2_compiler_body_producer;\npub mod v2_compiler_target_carriers;\npub mod v2_compiler_discovery_enumeration;\npub mod v2_compiler_parse_engine_hooks;\npub mod v2_compiler_use_site_verdict;"

data generated_pub_mod_basenames: List<String> = [
"v1_interpreter",
Expand All @@ -22,6 +22,9 @@ data generated_pub_mod_basenames: List<String> = [
"v2_compiler_program_assembly",
"v2_compiler_program_partition",
"v2_compiler_tokenize",
"v2_compiler_source_authority",
"v2_compiler_compile",
"v2_compiler_infer",
"v2_compiler_body_producer",
"v2_compiler_target_carriers",
"v2_compiler_discovery_enumeration",
Expand All @@ -48,6 +51,9 @@ data generated_stage0_filenames: List<String> = [
"v2_compiler_program_assembly.rs",
"v2_compiler_program_partition.rs",
"v2_compiler_tokenize.rs",
"v2_compiler_source_authority.rs",
"v2_compiler_compile.rs",
"v2_compiler_infer.rs",
"v2_compiler_body_producer.rs",
"v2_compiler_target_carriers.rs",
"v2_compiler_discovery_enumeration.rs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module test.claim.self_host_00_compile_behavioral_witness

import tools.self_host_00_compile_behavioral_transport { sc_behavioral_receipt_holds }

data self_host_00_compile_behavioral_witness_doc: String = "Wet self-host behavioral receipt probe for Wave 2 Gate-A flip (00_compile): compares gunbc-emitted vs seed required_lens_grain_note (00_compile.dag module authority constant); --inject-fault perturbs emitted comparison (not driver flag). Full compile-tree walk deferred until emit surface greens (#6775). Live host effects — enroll when frontier flips SelfEmitted with binding."

test fn self_host_00_compile_behavioral_receipt_holds() -> Bool {
sc_behavioral_receipt_holds()
}
9 changes: 9 additions & 0 deletions dag/test/claim/self_host_04_infer_behavioral_witness_test.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module test.claim.self_host_04_infer_behavioral_witness

import tools.self_host_04_infer_behavioral_transport { i4_behavioral_receipt_holds }

data self_host_04_infer_behavioral_witness_doc: String = "Wet self-host behavioral receipt probe for Gate-A flip prep (04_infer): compares gunbc-emitted vs seed infer_arrow_domain_binding_heuristic_note (04_infer.dag module authority constant); --inject-fault perturbs emitted comparison (not driver flag). Full infer-tree walk deferred until emit surface greens (#6775). Live host effects — enroll when frontier flips SelfEmitted with binding."

test fn self_host_04_infer_behavioral_receipt_holds() -> Bool {
i4_behavioral_receipt_holds()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module test.claim.self_host_source_authority_behavioral_witness

import tools.self_host_source_authority_behavioral_transport { ssa_behavioral_receipt_holds }

data self_host_source_authority_behavioral_witness_doc: String = "Wet self-host behavioral receipt probe for Wave 2 Gate-A flip lane (source_authority): compares gunbc-emitted vs seed source_authority_module_note (source_authority.dag module authority constant); --inject-fault perturbs emitted comparison (not driver flag). Full source-authority tree walk deferred until emit surface greens (#6775). Live host effects — enroll when frontier flips SelfEmitted with binding."

test fn self_host_source_authority_behavioral_receipt_holds() -> Bool {
ssa_behavioral_receipt_holds()
}
29 changes: 29 additions & 0 deletions dag/tools/self_host_00_compile_behavioral_transport.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module tools.self_host_00_compile_behavioral_transport

import tools.self_host_curated_seed_linked_harness { cssl_seed_linked_behavioral_receipt }
import v2.std.collection { List }
import std.logic { Bool }

data sc_doc: String = "Wave 2 Gate-A parallel flip (00_compile self-emit): curated seed-linked behavioral receipt via tools.self_host_curated_seed_linked_harness. Emit ONLY v2.compiler.compile via gunbc compile --entry; runtime gunbc closure (empty shim_lib + shim_writes) — no committed frozen dep snapshots. Seed oracle: v1_compiler::v2_compiler_compile in src/v1/stage0 (exported module-authority constants from 00_compile.dag). Witness compares emitted vs seed on required_lens_grain_note with inject-fault perturbing emitted side (parse_engine_hooks pattern). Full compile-tree behavioral oracle deferred until post-#6775 Rc/Optional emit surface greens. Frontier NOT flipped until rustc-green receipt."

data sc_emit_surface_note: String = "emit-surface rustc refusal probe (00_compile entry): gunbc compile --entry is clean (0 diagnostics); cargo is the honest gate. Runtime emit supplies dep closure."

data sc_source_rel: String = "src/v2/compiler/00_compile.dag"

data sc_shim_driver_rel: String = "dag/tools/self_host_00_compile_shims/witness_main.rs"

data sc_scaffold_dissolution_trigger: String = "dissolve-on: dag/tools/self_host_00_compile_shims/witness_main.rs + sc harness transport. DISSOLVES WHEN modeled self-host behavioral-equivalence harness emits comparison driver + manifest."

data sc_receipt_pass_marker: String = "SELF_HOST_00_COMPILE_BEHAVIORAL_RECEIPT: PASS"

fn sc_behavioral_receipt_holds() -> Bool {
cssl_seed_linked_behavioral_receipt(
source_rel: sc_source_rel,
shim_lib_rel: "",
shim_writes: [],
driver_rel: sc_shim_driver_rel,
pass_marker: sc_receipt_pass_marker,
claim_entry_rel: "",
claim_function: ""
)
}
32 changes: 32 additions & 0 deletions dag/tools/self_host_00_compile_shims/witness_main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use v1_compiled::v2_compiler_compile as emitted;
use v1_compiler::v2_compiler_compile as seed;

fn sym_eq(a: &str, b: &str) -> bool {
a == b
}

fn main() {
let inject_fault = std::env::args().any(|a| a == "--inject-fault");
let cases: [(&str, String, String); 1] = [(
"required_lens_grain_note",
emitted::required_lens_grain_note(),
seed::required_lens_grain_note(),
)];
let mut all_pass = true;
for (i, (label, e, s)) in cases.iter().enumerate() {
let e_cmp = if inject_fault && i == 0 {
"INJECTED_FAULT".to_string()
} else {
e.clone()
};
let ok = sym_eq(&e_cmp, s);
println!("{label} emitted_len={} seed_len={} eq={ok}", e_cmp.len(), s.len());
all_pass &= ok;
}
if all_pass {
println!("SELF_HOST_00_COMPILE_BEHAVIORAL_RECEIPT: PASS");
std::process::exit(0);
}
println!("SELF_HOST_00_COMPILE_BEHAVIORAL_RECEIPT: FAIL");
std::process::exit(1);
}
31 changes: 31 additions & 0 deletions dag/tools/self_host_04_infer_behavioral_transport.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module tools.self_host_04_infer_behavioral_transport

import tools.self_host_curated_seed_linked_harness { cssl_seed_linked_behavioral_receipt }
import v2.std.collection { List }
import std.logic { Bool }

data i4_doc: String = "Gate-A flip prep (04_infer self-emit): curated seed-linked behavioral receipt via tools.self_host_curated_seed_linked_harness (converged onto the shared cssl authority — DESIGN §3 — after #6791 was found to have clobbered it and #6801 restored it; do not re-fork a per-module copy). Emit ONLY v2.compiler.infer via gunbc compile --entry; runtime gunbc closure (empty shim_lib + shim_writes) — no committed frozen dep snapshots. Seed oracle: v1_compiler::v2_compiler_infer in src/v1/stage0 (hand-retained, independent of the emitted artifact). Behavioral bar: cargo-green witness pairs emitted vs seed on infer_arrow_domain_binding_heuristic_note (04_infer.dag module authority constant) with --inject-fault RED control, plus supplementary claim-run on pipeline_infer_add_fixture_relationship_green. NOTE (sharp-bee-290, cross-worker confirmed): gunbc --entry emits the WHOLE transitive closure, not entry-only, so a cargo refusal on a large closure (168 errors measured pre-convergence: missing generic params, duplicate std defs) is a HARNESS ARTIFACT of the current shim mechanism, not necessarily 04_infer's real Gate-A verdict — the real verdict awaits a generic seed-shim assembly (still-pike-676, in design) that auto re-exports every non-entry closure module against the seed crate. Frontier NOT flipped until a faithful rustc-green receipt exists — migration_trigger stays ^migrate_when_closure_self_emits_cargo_green (compiler_frontier_row_04_infer, src/v2/compiler/self_host/frontier.dag)."

data i4_seed_retained_note: String = "Seed oracle: v1_compiler::v2_compiler_infer in src/v1/stage0 (hand-retained, independent of emitted artifact). Dissolve-on: generic seed-shim assembly (still-pike-676) lands + #6775 Rc/Optional emit surface greens, giving a faithful cargo verdict; frontier flips SelfEmitted then."

data i4_source_rel: String = "src/v2/compiler/04_infer.dag"

data i4_test_entry_rel: String = "src/v2/test/compiler/pipeline/infer_stage_test.dag"

data i4_shim_driver_rel: String = "dag/tools/self_host_04_infer_shims/witness_main.rs"

data i4_scaffold_dissolution_trigger: String = "dissolve-on: dag/tools/self_host_04_infer_shims/witness_main.rs — hand-written equivalence driver. DISSOLVES WHEN a modeled self-host behavioral-equivalence harness producer emits the comparison driver without hand authoring (parallel to cssl_doc dissolution)."

data i4_receipt_pass_marker: String = "SELF_HOST_04_INFER_BEHAVIORAL_RECEIPT: PASS"

fn i4_behavioral_receipt_holds() -> Bool {
cssl_seed_linked_behavioral_receipt(
source_rel: i4_source_rel,
shim_lib_rel: "",
shim_writes: [],
driver_rel: i4_shim_driver_rel,
pass_marker: i4_receipt_pass_marker,
claim_entry_rel: i4_test_entry_rel,
claim_function: "pipeline_infer_add_fixture_relationship_green"
)
}
32 changes: 32 additions & 0 deletions dag/tools/self_host_04_infer_shims/witness_main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use v1_compiled::v2_compiler_infer as emitted;
use v1_compiler::v2_compiler_infer as seed;

fn sym_eq(a: &str, b: &str) -> bool {
a == b
}

fn main() {
let inject_fault = std::env::args().any(|a| a == "--inject-fault");
let cases: [(&str, String, String); 1] = [(
"infer_arrow_domain_binding_heuristic_note",
emitted::infer_arrow_domain_binding_heuristic_note(),
seed::infer_arrow_domain_binding_heuristic_note(),
)];
let mut all_pass = true;
for (i, (label, e, s)) in cases.iter().enumerate() {
let e_cmp = if inject_fault && i == 0 {
"INJECTED_FAULT".to_string()
} else {
e.clone()
};
let ok = sym_eq(&e_cmp, s);
println!("{label} emitted_len={} seed_len={} eq={ok}", e_cmp.len(), s.len());
all_pass &= ok;
}
if all_pass {
println!("SELF_HOST_04_INFER_BEHAVIORAL_RECEIPT: PASS");
std::process::exit(0);
}
println!("SELF_HOST_04_INFER_BEHAVIORAL_RECEIPT: FAIL");
std::process::exit(1);
}
29 changes: 29 additions & 0 deletions dag/tools/self_host_source_authority_behavioral_transport.dag
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module tools.self_host_source_authority_behavioral_transport

import tools.self_host_curated_seed_linked_harness { cssl_seed_linked_behavioral_receipt }
import v2.std.collection { List }
import std.logic { Bool }

data ssa_doc: String = "Wave 2 Gate-A flip lane (source_authority self-emit): curated seed-linked behavioral receipt via tools.self_host_curated_seed_linked_harness. Emit ONLY v2.compiler.source_authority via gunbc compile --entry; runtime gunbc closure (empty shim_lib + shim_writes) — no committed frozen dep snapshots. Seed oracle: v1_compiler::v2_compiler_source_authority in src/v1/stage0 (exported module-authority constant from source_authority.dag). Witness compares emitted vs seed on source_authority_module_note with inject-fault perturbing emitted side (03_resolve pattern). Full source-authority tree behavioral oracle deferred until post-#6775 Rc/Optional emit surface greens. Frontier NOT flipped until rustc-green receipt."

data ssa_emit_surface_note: String = "emit-surface rustc refusal probe (source_authority entry): gunbc compile --entry is clean (0 diagnostics); cargo is the honest gate. Runtime emit supplies dep closure."

data ssa_source_rel: String = "src/v2/compiler/source_authority.dag"

data ssa_shim_driver_rel: String = "dag/tools/self_host_source_authority_shims/witness_main.rs"

data ssa_scaffold_dissolution_trigger: String = "dissolve-on: dag/tools/self_host_source_authority_shims/witness_main.rs + ssa harness transport. DISSOLVES WHEN modeled self-host behavioral-equivalence harness emits comparison driver + manifest."

data ssa_receipt_pass_marker: String = "SELF_HOST_SOURCE_AUTHORITY_BEHAVIORAL_RECEIPT: PASS"

fn ssa_behavioral_receipt_holds() -> Bool {
cssl_seed_linked_behavioral_receipt(
source_rel: ssa_source_rel,
shim_lib_rel: "",
shim_writes: [],
driver_rel: ssa_shim_driver_rel,
pass_marker: ssa_receipt_pass_marker,
claim_entry_rel: "",
claim_function: ""
)
}
32 changes: 32 additions & 0 deletions dag/tools/self_host_source_authority_shims/witness_main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use v1_compiled::v2_compiler_source_authority as emitted;
use v1_compiler::v2_compiler_source_authority as seed;

fn sym_eq(a: &str, b: &str) -> bool {
a == b
}

fn main() {
let inject_fault = std::env::args().any(|a| a == "--inject-fault");
let cases: [(&str, String, String); 1] = [(
"source_authority_module_note",
emitted::source_authority_module_note(),
seed::source_authority_module_note(),
)];
let mut all_pass = true;
for (i, (label, e, s)) in cases.iter().enumerate() {
let e_cmp = if inject_fault && i == 0 {
"INJECTED_FAULT".to_string()
} else {
e.clone()
};
let ok = sym_eq(&e_cmp, s);
println!("{label} emitted_len={} seed_len={} eq={ok}", e_cmp.len(), s.len());
all_pass &= ok;
}
if all_pass {
println!("SELF_HOST_SOURCE_AUTHORITY_BEHAVIORAL_RECEIPT: PASS");
std::process::exit(0);
}
println!("SELF_HOST_SOURCE_AUTHORITY_BEHAVIORAL_RECEIPT: FAIL");
std::process::exit(1);
}
3 changes: 3 additions & 0 deletions src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ pub const HAND_MAINTAINED_STAGE0_FILES: &[&str] = &[
"v2_compiler_program_assembly.rs",
"v2_compiler_program_partition.rs",
"v2_compiler_tokenize.rs",
"v2_compiler_source_authority.rs",
"v2_compiler_compile.rs",
"v2_compiler_infer.rs",
"v2_compiler_body_producer.rs",
"v2_compiler_target_carriers.rs",
"v2_compiler_discovery_enumeration.rs",
Expand Down
Loading
Loading