diff --git a/dag/gunbc/ci_layer_roots.dag b/dag/gunbc/ci_layer_roots.dag index 87cbafc8113..cafe7eb047e 100644 --- a/dag/gunbc/ci_layer_roots.dag +++ b/dag/gunbc/ci_layer_roots.dag @@ -41,7 +41,9 @@ data witness_exclusion_substrings: List = [ "self_host_target_carriers_behavioral_witness_test.dag", "self_host_body_producer_behavioral_witness_test.dag", "self_host_03_resolve_behavioral_witness_test.dag", + "self_host_01_tokenize_behavioral_witness_test.dag", "self_host_program_assembly_behavioral_witness_test.dag", + "self_host_program_partition_behavioral_witness_test.dag", "dag_collect_fingerprint_witness_test.dag", "dag_compile_clean_perturb_receipts_test.dag", "test/claim/diagnostics_test.dag", diff --git a/dag/gunbc/stage0_crate_layout_generated.dag b/dag/gunbc/stage0_crate_layout_generated.dag index 519807181ab..97f3680a002 100644 --- a/dag/gunbc/stage0_crate_layout_generated.dag +++ b/dag/gunbc/stage0_crate_layout_generated.dag @@ -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_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_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 = [ "v1_interpreter", @@ -20,6 +20,8 @@ data generated_pub_mod_basenames: List = [ "usv_pilot_v2_std_node", "v2_compiler_resolve", "v2_compiler_program_assembly", + "v2_compiler_program_partition", + "v2_compiler_tokenize", "v2_compiler_body_producer", "v2_compiler_target_carriers", "v2_compiler_discovery_enumeration", @@ -44,6 +46,8 @@ data generated_stage0_filenames: List = [ "usv_pilot_v2_std_node.rs", "v2_compiler_resolve.rs", "v2_compiler_program_assembly.rs", + "v2_compiler_program_partition.rs", + "v2_compiler_tokenize.rs", "v2_compiler_body_producer.rs", "v2_compiler_target_carriers.rs", "v2_compiler_discovery_enumeration.rs", diff --git a/dag/test/claim/self_host_01_tokenize_behavioral_witness_test.dag b/dag/test/claim/self_host_01_tokenize_behavioral_witness_test.dag new file mode 100644 index 00000000000..fe4ea62cab5 --- /dev/null +++ b/dag/test/claim/self_host_01_tokenize_behavioral_witness_test.dag @@ -0,0 +1,9 @@ +module test.claim.self_host_01_tokenize_behavioral_witness + +import tools.self_host_01_tokenize_behavioral_transport { st_behavioral_receipt_holds } + +data self_host_01_tokenize_behavioral_witness_doc: String = "Wet self-host behavioral receipt probe for Wave 2 Gate-A flip lane (01_tokenize): compares gunbc-emitted vs seed tokenize_module_authority_note (01_tokenize.dag module authority constant); --inject-fault perturbs emitted comparison (not driver flag). Full token-stream walk deferred until emit surface greens (#6775). Live host effects — enroll when frontier flips SelfEmitted with binding." + +test fn self_host_01_tokenize_behavioral_receipt_holds() -> Bool { + st_behavioral_receipt_holds() +} diff --git a/dag/test/claim/self_host_program_partition_behavioral_witness_test.dag b/dag/test/claim/self_host_program_partition_behavioral_witness_test.dag new file mode 100644 index 00000000000..aeba76c6b1b --- /dev/null +++ b/dag/test/claim/self_host_program_partition_behavioral_witness_test.dag @@ -0,0 +1,9 @@ +module test.claim.self_host_program_partition_behavioral_witness + +import tools.self_host_program_partition_behavioral_transport { spp_behavioral_receipt_holds } + +data self_host_program_partition_behavioral_witness_doc: String = "Wet self-host behavioral receipt probe for Wave 2 parallel flip (program_partition): compares gunbc-emitted vs seed partition_structural_value_carriers_dissolution_trigger (program_partition.dag module authority constant); --inject-fault perturbs emitted comparison (not driver flag). Full partition-tree walk deferred until emit surface greens (#6775). Live host effects — enroll when frontier flips SelfEmitted with binding." + +test fn self_host_program_partition_behavioral_receipt_holds() -> Bool { + spp_behavioral_receipt_holds() +} diff --git a/dag/tools/self_host_01_tokenize_behavioral_transport.dag b/dag/tools/self_host_01_tokenize_behavioral_transport.dag new file mode 100644 index 00000000000..4ba3c4fb469 --- /dev/null +++ b/dag/tools/self_host_01_tokenize_behavioral_transport.dag @@ -0,0 +1,29 @@ +module tools.self_host_01_tokenize_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 st_doc: String = "Wave 2 Gate-A flip lane (01_tokenize self-emit): curated seed-linked behavioral receipt via tools.self_host_curated_seed_linked_harness. Emit ONLY v2.compiler.tokenize via gunbc compile --entry; runtime gunbc closure (empty shim_lib + shim_writes) — no committed frozen dep snapshots. Seed oracle: v1_compiler::v2_compiler_tokenize in src/v1/stage0 (exported module-authority constant from 01_tokenize.dag). Witness compares emitted vs seed on tokenize_module_authority_note with inject-fault perturbing emitted side (parse_engine_hooks pattern). Full token-stream behavioral oracle deferred until post-#6775 Rc/Optional emit surface greens. Frontier NOT flipped until rustc-green receipt." + +data st_emit_surface_note: String = "emit-surface rustc refusal probe (01_tokenize entry): gunbc compile --entry is clean (0 diagnostics); cargo is the honest gate. Curated-cargo probe sweep confirmed Gate A (Witness/Rc/Optional duplication) — #6775." + +data st_source_rel: String = "src/v2/compiler/01_tokenize.dag" + +data st_shim_driver_rel: String = "dag/tools/self_host_01_tokenize_shims/witness_main.rs" + +data st_scaffold_dissolution_trigger: String = "dissolve-on: dag/tools/self_host_01_tokenize_shims/witness_main.rs + st harness transport. DISSOLVES WHEN modeled self-host behavioral-equivalence harness emits comparison driver + manifest." + +data st_receipt_pass_marker: String = "SELF_HOST_01_TOKENIZE_BEHAVIORAL_RECEIPT: PASS" + +fn st_behavioral_receipt_holds() -> Bool { + cssl_seed_linked_behavioral_receipt( + source_rel: st_source_rel, + shim_lib_rel: "", + shim_writes: [], + driver_rel: st_shim_driver_rel, + pass_marker: st_receipt_pass_marker, + claim_entry_rel: "", + claim_function: "" + ) +} diff --git a/dag/tools/self_host_01_tokenize_shims/witness_main.rs b/dag/tools/self_host_01_tokenize_shims/witness_main.rs new file mode 100644 index 00000000000..443ae30b04a --- /dev/null +++ b/dag/tools/self_host_01_tokenize_shims/witness_main.rs @@ -0,0 +1,32 @@ +use v1_compiled::v2_compiler_tokenize as emitted; +use v1_compiler::v2_compiler_tokenize 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] = [( + "tokenize_module_authority_note", + emitted::tokenize_module_authority_note(), + seed::tokenize_module_authority_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_01_TOKENIZE_BEHAVIORAL_RECEIPT: PASS"); + std::process::exit(0); + } + println!("SELF_HOST_01_TOKENIZE_BEHAVIORAL_RECEIPT: FAIL"); + std::process::exit(1); +} diff --git a/dag/tools/self_host_program_partition_behavioral_transport.dag b/dag/tools/self_host_program_partition_behavioral_transport.dag new file mode 100644 index 00000000000..5bf915fa1ea --- /dev/null +++ b/dag/tools/self_host_program_partition_behavioral_transport.dag @@ -0,0 +1,29 @@ +module tools.self_host_program_partition_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 spp_doc: String = "Wave 2 parallel flip (program_partition self-emit): curated seed-linked behavioral receipt via tools.self_host_curated_seed_linked_harness. Emit ONLY v2.compiler.program_partition via gunbc compile --entry; runtime gunbc closure (empty shim_lib + shim_writes) — no committed frozen dep snapshots. Seed oracle: v1_compiler::v2_compiler_program_partition in src/v1/stage0 (exported module-authority constants from program_partition.dag). Witness compares emitted vs seed on partition_structural_value_carriers_dissolution_trigger with inject-fault perturbing emitted side (03_resolve pattern). Full partition-tree behavioral oracle deferred until post-#6775 Rc/Optional emit surface greens. Frontier NOT flipped until rustc-green receipt." + +data spp_emit_surface_note: String = "emit-surface rustc refusal probe (program_partition entry): gunbc compile --entry is clean (0 diagnostics); cargo is the honest gate. Runtime emit supplies dep closure." + +data spp_source_rel: String = "src/v2/compiler/program_partition.dag" + +data spp_shim_driver_rel: String = "dag/tools/self_host_program_partition_shims/witness_main.rs" + +data spp_scaffold_dissolution_trigger: String = "dissolve-on: dag/tools/self_host_program_partition_shims/witness_main.rs + spp harness transport. DISSOLVES WHEN modeled self-host behavioral-equivalence harness emits comparison driver + manifest." + +data spp_receipt_pass_marker: String = "SELF_HOST_PROGRAM_PARTITION_BEHAVIORAL_RECEIPT: PASS" + +fn spp_behavioral_receipt_holds() -> Bool { + cssl_seed_linked_behavioral_receipt( + source_rel: spp_source_rel, + shim_lib_rel: "", + shim_writes: [], + driver_rel: spp_shim_driver_rel, + pass_marker: spp_receipt_pass_marker, + claim_entry_rel: "", + claim_function: "" + ) +} diff --git a/dag/tools/self_host_program_partition_shims/witness_main.rs b/dag/tools/self_host_program_partition_shims/witness_main.rs new file mode 100644 index 00000000000..d21e2e5432d --- /dev/null +++ b/dag/tools/self_host_program_partition_shims/witness_main.rs @@ -0,0 +1,32 @@ +use v1_compiled::v2_compiler_program_partition as emitted; +use v1_compiler::v2_compiler_program_partition 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] = [( + "partition_structural_value_carriers_dissolution_trigger", + emitted::partition_structural_value_carriers_dissolution_trigger(), + seed::partition_structural_value_carriers_dissolution_trigger(), + )]; + 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_PROGRAM_PARTITION_BEHAVIORAL_RECEIPT: PASS"); + std::process::exit(0); + } + println!("SELF_HOST_PROGRAM_PARTITION_BEHAVIORAL_RECEIPT: FAIL"); + std::process::exit(1); +} diff --git a/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs b/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs index 76e0aee78e7..62950b46a3a 100644 --- a/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs +++ b/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs @@ -19,6 +19,8 @@ pub const HAND_MAINTAINED_STAGE0_FILES: &[&str] = &[ "usv_pilot_v2_std_node.rs", "v2_compiler_resolve.rs", "v2_compiler_program_assembly.rs", + "v2_compiler_program_partition.rs", + "v2_compiler_tokenize.rs", "v2_compiler_body_producer.rs", "v2_compiler_target_carriers.rs", "v2_compiler_discovery_enumeration.rs", diff --git a/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs b/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs index 4d6b59f9a33..eb26673375d 100644 --- a/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs +++ b/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs @@ -23,7 +23,7 @@ pub fn stage0_crate_layout_generated_note() -> String { pub fn generated_pub_mod_block() -> String { thread_local! { static CACHED: 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_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;".to_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;".to_string() }; } CACHED.with(|c: &String| c.clone()) @@ -32,7 +32,7 @@ pub fn generated_pub_mod_block() -> String { pub fn generated_pub_mod_basenames() -> Rc> { thread_local! { static CACHED: Rc> = { - Rc::new(vec!["v1_interpreter".to_string(), "cli_run".to_string(), "coproduct_reflection".to_string(), "resolved_graph_cache".to_string(), "shared_typecheck_store".to_string(), "recorded_fixture".to_string(), "memory_governor".to_string(), "module_path_index".to_string(), "usv_pilot_v2_std_algebra".to_string(), "usv_pilot_v2_std_collection".to_string(), "usv_pilot_v2_std_node".to_string(), "v2_compiler_resolve".to_string(), "v2_compiler_program_assembly".to_string(), "v2_compiler_body_producer".to_string(), "v2_compiler_target_carriers".to_string(), "v2_compiler_discovery_enumeration".to_string(), "v2_compiler_parse_engine_hooks".to_string(), "v2_compiler_use_site_verdict".to_string()]) + Rc::new(vec!["v1_interpreter".to_string(), "cli_run".to_string(), "coproduct_reflection".to_string(), "resolved_graph_cache".to_string(), "shared_typecheck_store".to_string(), "recorded_fixture".to_string(), "memory_governor".to_string(), "module_path_index".to_string(), "usv_pilot_v2_std_algebra".to_string(), "usv_pilot_v2_std_collection".to_string(), "usv_pilot_v2_std_node".to_string(), "v2_compiler_resolve".to_string(), "v2_compiler_program_assembly".to_string(), "v2_compiler_program_partition".to_string(), "v2_compiler_tokenize".to_string(), "v2_compiler_body_producer".to_string(), "v2_compiler_target_carriers".to_string(), "v2_compiler_discovery_enumeration".to_string(), "v2_compiler_parse_engine_hooks".to_string(), "v2_compiler_use_site_verdict".to_string()]) }; } CACHED.with(|c: &Rc>| c.clone()) @@ -41,7 +41,7 @@ pub fn generated_pub_mod_basenames() -> Rc> { pub fn generated_stage0_filenames() -> Rc> { thread_local! { static CACHED: Rc> = { - Rc::new(vec!["v1_interpreter.rs".to_string(), "cli_run.rs".to_string(), "coproduct_reflection.rs".to_string(), "resolved_graph_cache.rs".to_string(), "shared_typecheck_store.rs".to_string(), "recorded_fixture.rs".to_string(), "main.rs".to_string(), "phase_profile.rs".to_string(), "pre_push.rs".to_string(), "memory_governor.rs".to_string(), "std_lens_verdict.rs".to_string(), "usv_pilot_v2_std_algebra.rs".to_string(), "usv_pilot_v2_std_collection.rs".to_string(), "usv_pilot_v2_std_node.rs".to_string(), "v2_compiler_resolve.rs".to_string(), "v2_compiler_program_assembly.rs".to_string(), "v2_compiler_body_producer.rs".to_string(), "v2_compiler_target_carriers.rs".to_string(), "v2_compiler_discovery_enumeration.rs".to_string(), "v2_compiler_parse_engine_hooks.rs".to_string(), "v2_compiler_use_site_verdict.rs".to_string()]) + Rc::new(vec!["v1_interpreter.rs".to_string(), "cli_run.rs".to_string(), "coproduct_reflection.rs".to_string(), "resolved_graph_cache.rs".to_string(), "shared_typecheck_store.rs".to_string(), "recorded_fixture.rs".to_string(), "main.rs".to_string(), "phase_profile.rs".to_string(), "pre_push.rs".to_string(), "memory_governor.rs".to_string(), "std_lens_verdict.rs".to_string(), "usv_pilot_v2_std_algebra.rs".to_string(), "usv_pilot_v2_std_collection.rs".to_string(), "usv_pilot_v2_std_node.rs".to_string(), "v2_compiler_resolve.rs".to_string(), "v2_compiler_program_assembly.rs".to_string(), "v2_compiler_program_partition.rs".to_string(), "v2_compiler_tokenize.rs".to_string(), "v2_compiler_body_producer.rs".to_string(), "v2_compiler_target_carriers.rs".to_string(), "v2_compiler_discovery_enumeration.rs".to_string(), "v2_compiler_parse_engine_hooks.rs".to_string(), "v2_compiler_use_site_verdict.rs".to_string()]) }; } CACHED.with(|c: &Rc>| c.clone()) diff --git a/src/v1/stage0/src/lib.rs b/src/v1/stage0/src/lib.rs index fa1b9987976..1697e333e08 100644 --- a/src/v1/stage0/src/lib.rs +++ b/src/v1/stage0/src/lib.rs @@ -121,8 +121,10 @@ pub mod v2_compiler_body_producer; pub mod v2_compiler_discovery_enumeration; pub mod v2_compiler_parse_engine_hooks; pub mod v2_compiler_program_assembly; +pub mod v2_compiler_program_partition; pub mod v2_compiler_resolve; pub mod v2_compiler_target_carriers; +pub mod v2_compiler_tokenize; pub mod v2_compiler_use_site_verdict; pub mod wt_a; pub mod wt_b; diff --git a/src/v1/stage0/src/v2_compiler_program_partition.rs b/src/v1/stage0/src/v2_compiler_program_partition.rs new file mode 100644 index 00000000000..0e92c440d7f --- /dev/null +++ b/src/v1/stage0/src/v2_compiler_program_partition.rs @@ -0,0 +1,9 @@ +// Seed realization for v2.compiler.program_partition (Wave 2 parallel flip). +// Hand-retained Rust oracle — independent of the self-emitted artifact under test. +// Dissolve-on: self-emit cutover retires this module when v2.compiler.program_partition +// is emitted-only and the behavioral harness is modeled (spp_scaffold_dissolution_trigger). + +/// Mirrors `data partition_structural_value_carriers_dissolution_trigger` in src/v2/compiler/program_partition.dag. +pub fn partition_structural_value_carriers_dissolution_trigger() -> String { + "🟡 dissolve-on: the whole-program emit applies use-site ownership to the module-surface wrapper node (carrier ^dag_surface_module), which is always by-value (a module is never reference-wrapped) — this returns the fixed set of such structural surface carriers. Currently one entry (module surface); expand as further synthetic surface carriers surface. DISSOLVES WHEN the emit stops running use-site ownership over non-value structural surfaces (06_translate scopes the ownership fold to genuine type carriers), at which point no structural-surface value-carrier enrollment is needed.".to_string() +} diff --git a/src/v1/stage0/src/v2_compiler_tokenize.rs b/src/v1/stage0/src/v2_compiler_tokenize.rs new file mode 100644 index 00000000000..daf8dea8598 --- /dev/null +++ b/src/v1/stage0/src/v2_compiler_tokenize.rs @@ -0,0 +1,9 @@ +// Seed realization for v2.compiler.tokenize (Wave 2 Gate-A flip lane). +// Hand-retained Rust oracle — independent of the self-emitted artifact under test. +// Dissolve-on: self-emit cutover retires this module when v2.compiler.tokenize +// is emitted-only and the behavioral harness is modeled (st_scaffold_dissolution_trigger). + +/// Mirrors `data tokenize_module_authority_note` in src/v2/compiler/01_tokenize.dag. +pub fn tokenize_module_authority_note() -> String { + "Wave 2 Gate-A flip lane (01_tokenize self-emit): data-driven lexing via ModeledLexRules/LexRuleSet fold — no hand-rolled tokenizer. Curated seed-linked behavioral receipt compares emitted vs seed oracle constant; full token-stream equivalence oracle deferred until emit Rc/Optional surface greens (#6775).".to_string() +} diff --git a/src/v2/compiler/01_tokenize.dag b/src/v2/compiler/01_tokenize.dag index adecff3b4fa..72690dd3cbf 100644 --- a/src/v2/compiler/01_tokenize.dag +++ b/src/v2/compiler/01_tokenize.dag @@ -552,3 +552,5 @@ fn tokenize(text: String, file: Symbol, rules: LexRules) -> Outcome lex_walk(source: text, file: file, rules: rule_set) } } + +data tokenize_module_authority_note: String = "Wave 2 Gate-A flip lane (01_tokenize self-emit): data-driven lexing via ModeledLexRules/LexRuleSet fold — no hand-rolled tokenizer. Curated seed-linked behavioral receipt compares emitted vs seed oracle constant; full token-stream equivalence oracle deferred until emit Rc/Optional surface greens (#6775)." diff --git a/src/v2/compiler/self_host/frontier.dag b/src/v2/compiler/self_host/frontier.dag index a06ba52cc0f..527cd23eb23 100644 --- a/src/v2/compiler/self_host/frontier.dag +++ b/src/v2/compiler/self_host/frontier.dag @@ -218,7 +218,7 @@ data compiler_frontier_row_00_compile: CompilerModuleFrontierRow = knowledge_att data compiler_frontier_row_01_tokenize: CompilerModuleFrontierRow = knowledge_attributed_blocker_class_seed_retained_row( module_path: "src/v2/compiler/01_tokenize.dag", closure_reads: 17, - measured_blocker: NameResolutionGap, + measured_blocker: EmitSurfaceGap, migration_trigger: ^migrate_when_closure_self_emits_cargo_green ) @@ -456,6 +456,7 @@ data compiler_frontier_sweep_order: List = [ "src/v2/compiler/parse_engine_hooks.dag", "src/v2/compiler/use_site_verdict.dag", "src/v2/compiler/discovery_enumeration.dag", + "src/v2/compiler/01_tokenize.dag", "src/v2/compiler/self_host.dag", "src/v2/compiler/materialization_carriers.dag", "src/v2/compiler/07_target_carriers.dag", @@ -477,7 +478,6 @@ data compiler_frontier_sweep_order: List = [ "src/v2/compiler/source_authority.dag", "src/v2/compiler/program_assembly.dag", "src/v2/compiler/03_ingest.dag", - "src/v2/compiler/01_tokenize.dag", "src/v2/compiler/03_body_producer.dag", "src/v2/compiler/00_compile.dag" ] @@ -912,7 +912,9 @@ data seed_retained_scaffold_registrations: List List { diff --git a/src/v2/test/claim/long/compiler_frontier_measured_roster_test.dag b/src/v2/test/claim/long/compiler_frontier_measured_roster_test.dag index 30c87602f9d..1ab82cdb77b 100644 --- a/src/v2/test/claim/long/compiler_frontier_measured_roster_test.dag +++ b/src/v2/test/claim/long/compiler_frontier_measured_roster_test.dag @@ -13,6 +13,7 @@ import v2.compiler.self_host.frontier { compiler_frontier_sweep_order_matches_tractability_rank_holds } import v2.compiler.self_host.frontier_probe_types { + EmitSurfaceGap, NameResolutionGap, SelfEmitReady } @@ -33,9 +34,9 @@ test fn compiler_frontier_measured_parse_engine_hooks_self_emit_ready_holds() -> } } -test fn compiler_frontier_measured_tokenize_name_resolution_holds() -> Bool { +test fn compiler_frontier_measured_tokenize_emit_surface_holds() -> Bool { match compiler_frontier_row_01_tokenize.measured_probe.blocker_class { - NameResolutionGap => true + EmitSurfaceGap => true _ => false } }