diff --git a/dsl/gunbc/ci_floor_measurement.dag b/dsl/gunbc/ci_floor_measurement.dag index 1166de16e34..ad25aa044f3 100644 --- a/dsl/gunbc/ci_floor_measurement.dag +++ b/dsl/gunbc/ci_floor_measurement.dag @@ -84,6 +84,14 @@ fn gunbc_ci_floor_executor_base_overhead_bytes() -> ByteSize { } } +fn gunbc_ci_execution_corpus_available_width(each: ByteSize) -> Int { + let available = byte_size_saturating_sub( + total: gunbc_ci_runner_cgroup_memory_cap, + reserved: gunbc_ci_floor_executor_base_overhead_bytes() + ) + byte_size_count(b: available) / byte_size_count(b: each) +} + fn gunbc_ci_floor_usable_shard_budget(cap: ByteSize) -> ByteSize { byte_size_saturating_sub( total: measure_scale_fraction_floor( diff --git a/dsl/gunbc/ci_layer_roots.dag b/dsl/gunbc/ci_layer_roots.dag index 3364f4213cf..5b53f629579 100644 --- a/dsl/gunbc/ci_layer_roots.dag +++ b/dsl/gunbc/ci_layer_roots.dag @@ -4,6 +4,20 @@ data witness_layer_roots: List = ["dsl", "src/v2"] data witness_discovery_scan_dirs: List = ["dsl/test/claim", "src/v2/test/claim/manual"] +data witness_exclusion_substrings: List = [ + "impossible_bug", + "test/manual/", + "glob_discovery.dag", + "glob_discovery_law.dag", + "host_discovered_owned_data_manifest.dag", + "host_source_root_ingest_manifest.dag", + "program_assembly/real_ingest_test.dag", + "self_host/compiler_closure_emit_from_ingest_test.dag", + "unified_test_claim_substrate_equivalence.dag", + "ci_exclusion_proof_test.dag", + "test/claim/execution/" +] + fn witness_layer_source_flags(roots: List) -> String { fold(roots, init: "", f: (acc, r) => concat(acc, concat(" --source-root ", r))) } diff --git a/dsl/std/realization_schedule.dag b/dsl/std/realization_schedule.dag index ad211dc5a1a..882a9e50926 100644 --- a/dsl/std/realization_schedule.dag +++ b/dsl/std/realization_schedule.dag @@ -154,13 +154,13 @@ fn runnable_predicted_space(profile: RunnableResourceProfile) -> ByteSize { fn runnable_profile(r: Runnable) -> RunnableResourceProfile { match r { RunnableSingleClaim { entry: _, function: _, profile: p } => p - RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, profile: p } => p + RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, exclude_substrings: _, discovery_scope_dirs: _, spawn_width_cap: _, profile: p } => p } } fn runnable_forbids_corpus_co_residence(r: Runnable) -> Bool { match r { - RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, profile: _ } => false + RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, exclude_substrings: _, discovery_scope_dirs: _, spawn_width_cap: _, profile: _ } => false RunnableSingleClaim { entry: _, function: _, profile: p } => runnable_excludes_corpus_co_residence(profile: p) } } @@ -172,6 +172,9 @@ type Runnable scan_dirs: List explicit_entries: List skip_unaffected_node_frontier: Bool + exclude_substrings: List + discovery_scope_dirs: List + spawn_width_cap: Int profile: RunnableResourceProfile } @@ -188,7 +191,7 @@ type RealizationPlan { fn runnable_step_label(r: Runnable) -> String { match r { RunnableSingleClaim { entry: _, function: f, profile: _ } => f - RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, profile: _ } => "__discovery_corpus__" + RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, exclude_substrings: _, discovery_scope_dirs: _, spawn_width_cap: _, profile: _ } => "__discovery_corpus__" } } @@ -317,15 +320,18 @@ fn runnable_eq(left: Runnable, right: Runnable) -> Bool { RunnableSingleClaim { entry: le, function: lf, profile: lp } => match right { RunnableSingleClaim { entry: re, function: rf, profile: rp } => (le == re) && (lf == rf) && runnable_resource_profile_eq(left: lp, right: rp) - RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, profile: _ } => false + RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, exclude_substrings: _, discovery_scope_dirs: _, spawn_width_cap: _, profile: _ } => false } - RunnableDiscoveryBatch { source_roots: lsr, scan_dirs: lsd, explicit_entries: lex, skip_unaffected_node_frontier: lskip, profile: lp } => match right { + RunnableDiscoveryBatch { source_roots: lsr, scan_dirs: lsd, explicit_entries: lex, skip_unaffected_node_frontier: lskip, exclude_substrings: lex2, discovery_scope_dirs: lsc, spawn_width_cap: lwc, profile: lp } => match right { RunnableSingleClaim { entry: _, function: _, profile: _ } => false - RunnableDiscoveryBatch { source_roots: rsr, scan_dirs: rsd, explicit_entries: rex, skip_unaffected_node_frontier: rskip, profile: rp } => + RunnableDiscoveryBatch { source_roots: rsr, scan_dirs: rsd, explicit_entries: rex, skip_unaffected_node_frontier: rskip, exclude_substrings: rex2, discovery_scope_dirs: rsc, spawn_width_cap: rwc, profile: rp } => string_list_eq(left: lsr, right: rsr) && string_list_eq(left: lsd, right: rsd) && schedule_witness_entry_list_eq(left: lex, right: rex) && (lskip == rskip) + && string_list_eq(left: lex2, right: rex2) + && string_list_eq(left: lsc, right: rsc) + && (lwc == rwc) && runnable_resource_profile_eq(left: lp, right: rp) } } diff --git a/dsl/test/claim/ci_exclusion_proof_test.dag b/dsl/test/claim/ci_exclusion_proof_test.dag new file mode 100644 index 00000000000..14c88d282e0 --- /dev/null +++ b/dsl/test/claim/ci_exclusion_proof_test.dag @@ -0,0 +1,5 @@ +module test.claim.ci_exclusion_proof + +import std.types { Bool } + +test fn ci_exclusion_proof_sentinel() -> Bool = false diff --git a/src/v1/stage0/src/bin/claim_batch.rs b/src/v1/stage0/src/bin/claim_batch.rs index 248f3ea3d89..e2a1a848631 100644 --- a/src/v1/stage0/src/bin/claim_batch.rs +++ b/src/v1/stage0/src/bin/claim_batch.rs @@ -10,7 +10,7 @@ use v1_compiler::cli_run::{ build_multi_entry_index, check_floor_filename_hygiene, closure_subject_for_entry, discover_floor_corpus_rows, make_eval_context_with_runtime_options, peak_rss_vhwm_bytes, precompute_whole_tree_published_mock_keys, resolve_entry_with_index, run_claim_measured, - ClaimOutcome, DiscoveryRow, MultiEntryIndex, + ClaimOutcome, DiscoveryRow, MultiEntryIndex, FLOOR_DISCOVERY_EXCLUDES, }; use v1_compiler::recorded_fixture::RecordedFixtureStore; use v1_compiler::v1_compiler_compile::ResolvedGraph; @@ -462,7 +462,11 @@ fn run() -> Result { eprintln!("claim_batch: {e}"); return Err(ExitCode::from(2)); } - let mut rows = match discover_floor_corpus_rows(&source_roots, &disc.scan_dirs) { + let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(); + let mut rows = match discover_floor_corpus_rows(&source_roots, &disc.scan_dirs, &excludes) { Ok(r) => r, Err(e) => { eprintln!("claim_batch: discovery roster failed: {e}"); diff --git a/src/v1/stage0/src/bin/claim_executor.rs b/src/v1/stage0/src/bin/claim_executor.rs index df046109b0c..60c9ec5765f 100644 --- a/src/v1/stage0/src/bin/claim_executor.rs +++ b/src/v1/stage0/src/bin/claim_executor.rs @@ -28,6 +28,9 @@ enum Runnable { scan_dirs: Vec, explicit_entries: Vec<(String, String)>, skip_unaffected_node_frontier: bool, + exclude_substrings: Vec, + discovery_scope_dirs: Vec, + spawn_width_cap: usize, }, } @@ -177,11 +180,28 @@ fn runnable_from_value(value: &Value, ctx: &InterpContext) -> Result false, }; + let exclude_substrings = match ctx.field(fields, "exclude_substrings") { + Some(v) => str_list_from_value(v, ctx)?, + // Field absent means the plan author specified no exclusions — default is empty, + // not the Rust constant (the model is the sole authority on the plan path). + None => Vec::new(), + }; + let discovery_scope_dirs = match ctx.field(fields, "discovery_scope_dirs") { + Some(v) => str_list_from_value(v, ctx)?, + None => Vec::new(), + }; + let spawn_width_cap = match ctx.field(fields, "spawn_width_cap") { + Some(Value::Int(n)) => (*n).max(0) as usize, + Some(_) | None => 0, + }; Ok(Runnable::DiscoveryBatch { source_roots, scan_dirs, explicit_entries, skip_unaffected_node_frontier, + exclude_substrings, + discovery_scope_dirs, + spawn_width_cap, }) } other => Err(format!( @@ -243,6 +263,9 @@ enum BatchUnit { scan_dirs: Vec, explicit_entries: Vec<(String, String)>, skip_unaffected_node_frontier: bool, + exclude_substrings: Vec, + discovery_scope_dirs: Vec, + spawn_width_cap: usize, }, } @@ -278,11 +301,17 @@ fn group_batch_units(batch: &[Runnable]) -> Vec { scan_dirs, explicit_entries, skip_unaffected_node_frontier, + exclude_substrings, + discovery_scope_dirs, + spawn_width_cap, } => units.push(BatchUnit::Discovery { source_roots: source_roots.clone(), scan_dirs: scan_dirs.clone(), explicit_entries: explicit_entries.clone(), skip_unaffected_node_frontier: *skip_unaffected_node_frontier, + exclude_substrings: exclude_substrings.clone(), + discovery_scope_dirs: discovery_scope_dirs.clone(), + spawn_width_cap: *spawn_width_cap, }), } } @@ -361,12 +390,18 @@ fn run_batch_unit( scan_dirs, explicit_entries, skip_unaffected_node_frontier, + exclude_substrings, + discovery_scope_dirs, + spawn_width_cap, } => vec![run_discovery_batch_node( roots, scan_dirs, explicit_entries, skip_unaffected_node_frontier, + exclude_substrings, + discovery_scope_dirs, spawn_width, + spawn_width_cap, )], BatchUnit::SharedClaims { entry, functions } => { run_shared_entry_claims(&source_roots, &entry, &functions) @@ -622,12 +657,16 @@ fn emit_slowest_witness_attribution(source_roots: &[String], summary: &Discovery } } +#[allow(clippy::too_many_arguments)] fn run_discovery_batch_node( source_roots: Vec, scan_dirs: Vec, explicit_entries: Vec<(String, String)>, skip_unaffected_node_frontier: bool, + exclude_substrings: Vec, + discovery_scope_dirs: Vec, spawn_width: usize, + spawn_width_cap: usize, ) -> ClaimResult { let label = format!( "discovery-corpus[{} root(s)+{} explicit, width={}]", @@ -644,6 +683,9 @@ fn run_discovery_batch_node( DiscoveryCorpusOptions { skip_unaffected_node_frontier, explicit_roster_only: false, + exclude_substrings, + discovery_scope_dirs, + spawn_width_cap, }, ) { Ok(summary) if summary.failures.is_empty() => { @@ -1412,11 +1454,17 @@ fn run_perturb_check( scan_dirs, explicit_entries, skip_unaffected_node_frontier, + exclude_substrings, + discovery_scope_dirs, + spawn_width_cap, } => Runnable::DiscoveryBatch { source_roots: roots.iter().map(|r| remap_root(r)).collect(), scan_dirs: scan_dirs.iter().map(|d| remap_root(d)).collect(), explicit_entries: explicit_entries.clone(), skip_unaffected_node_frontier: *skip_unaffected_node_frontier, + exclude_substrings: exclude_substrings.clone(), + discovery_scope_dirs: discovery_scope_dirs.clone(), + spawn_width_cap: *spawn_width_cap, }, }) .collect() @@ -1633,6 +1681,9 @@ mod tests { scan_dirs: vec![], explicit_entries: vec![], skip_unaffected_node_frontier: true, + exclude_substrings: vec![], + discovery_scope_dirs: vec![], + spawn_width_cap: 0, } } diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index 87897e07cd3..67d8f977aec 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -2559,6 +2559,15 @@ pub fn peak_rss_vhwm_bytes() -> Option { Some(kb.saturating_mul(1024)) } +/// Mirror of `gunbc.ci_layer_roots.witness_exclusion_substrings` — the .dag model is the +/// single authority; plan-driven paths (`claim_executor` + `ci_floor_plan.dag`) read from +/// `RunnableDiscoveryBatch.exclude_substrings`. SCAFFOLD — two remaining consumers to migrate: +/// (a) `claim_batch.rs`: pre-push hook runner reads this constant directly (not plan-driven); +/// dissolve when pre-push hooks fold over a `RunnableDiscoveryBatch` from the model, or +/// when `claim_batch` reads `witness_exclusion_substrings` from the v2 evaluator; +/// (b) `DiscoveryCorpusOptions::default()` + test call sites in `pipeline.rs` / +/// `wet_hermetic_equivalence_test.rs`: pass explicit excludes from the model authority. +/// Dissolution trigger: FLOOR_DISCOVERY_EXCLUDES has zero call sites outside this comment. pub const FLOOR_DISCOVERY_EXCLUDES: &[&str] = &[ "impossible_bug", "test/manual/", @@ -2569,6 +2578,8 @@ pub const FLOOR_DISCOVERY_EXCLUDES: &[&str] = &[ "program_assembly/real_ingest_test.dag", "self_host/compiler_closure_emit_from_ingest_test.dag", "unified_test_claim_substrate_equivalence.dag", + "ci_exclusion_proof_test.dag", + "test/claim/execution/", ]; pub fn floor_discovery_path_excluded(path: &str) -> bool { @@ -2694,11 +2705,32 @@ pub fn check_floor_filename_hygiene(source_roots: &[String]) -> Result<(), Strin pub fn discover_floor_corpus_rows( source_roots: &[String], scan_dirs: &[String], + exclude_substrings: &[String], ) -> Result, String> { - let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES - .iter() - .map(|s| s.to_string()) - .collect(); + discover_floor_corpus_rows_inner(source_roots, scan_dirs, exclude_substrings, &[]) +} + +pub fn discover_floor_corpus_rows_scoped( + source_roots: &[String], + scan_dirs: &[String], + exclude_substrings: &[String], + discovery_scope_dirs: &[String], +) -> Result, String> { + discover_floor_corpus_rows_inner( + source_roots, + scan_dirs, + exclude_substrings, + discovery_scope_dirs, + ) +} + +fn discover_floor_corpus_rows_inner( + source_roots: &[String], + scan_dirs: &[String], + exclude_substrings: &[String], + discovery_scope_dirs: &[String], +) -> Result, String> { + let excludes: Vec = exclude_substrings.to_vec(); let mut rows: Vec = Vec::new(); let mut seen: std::collections::BTreeSet<(String, String)> = std::collections::BTreeSet::new(); for scan_dir in scan_dirs { @@ -2755,7 +2787,14 @@ pub fn discover_floor_corpus_rows( module_to_path.insert(m, rel.clone()); } path_imports.insert(rel, extract_import_paths(&content)); - if floor_discovery_path_excluded(&entry) { + if excludes.iter().any(|sub| entry.contains(sub.as_str())) { + continue; + } + if !discovery_scope_dirs.is_empty() + && !discovery_scope_dirs + .iter() + .any(|d| entry.contains(d.as_str())) + { continue; } let rule_decls: Vec> = SIDECAR_PLACEMENT_RULES @@ -2976,10 +3015,21 @@ fn inert_lens_modules( let mut queue: Vec = Vec::new(); let path_to_module: std::collections::HashMap<&String, &String> = module_to_path.iter().map(|(m, p)| (p, m)).collect(); - let entry_paths: std::collections::BTreeSet = rows - .iter() - .map(|r| repo_relative_dag_path(&r.entry)) - .collect(); + // Seed reachability from ALL *_test.dag files found in the source tree (not + // just enrolled rows), so that witnesses in the execution corpus also count + // for lens coverage even though they are excluded from the main corpus rows. + let entry_paths: std::collections::BTreeSet = { + let mut s: std::collections::BTreeSet = rows + .iter() + .map(|r| repo_relative_dag_path(&r.entry)) + .collect(); + for path in path_imports.keys() { + if path.ends_with("_test.dag") { + s.insert(path.clone()); + } + } + s + }; for ep in &entry_paths { if let Some(module) = path_to_module.get(ep) { if reached.insert((*module).clone()) { @@ -3018,6 +3068,16 @@ fn inert_lens_modules( pub struct DiscoveryCorpusOptions { pub skip_unaffected_node_frontier: bool, pub explicit_roster_only: bool, + /// Path-substring exclusion list. Non-plan callers default to FLOOR_DISCOVERY_EXCLUDES; + /// plan-driven paths supply this from RunnableDiscoveryBatch.exclude_substrings (the model authority). + pub exclude_substrings: Vec, + /// When non-empty, scopes the source-root `test fn` tree walk to files under one of these + /// directories. Import resolution still uses the full source_roots. Empty = full walk. + pub discovery_scope_dirs: Vec, + /// When > 0, caps the effective spawn_width for this discovery corpus to this value. + /// Derived from RunnableDiscoveryBatch.spawn_width_cap (provisioned from runner alloc ÷ + /// per-witness memory reservation). 0 = use the batch-wide spawn_width. + pub spawn_width_cap: usize, } impl Default for DiscoveryCorpusOptions { @@ -3025,6 +3085,12 @@ impl Default for DiscoveryCorpusOptions { Self { skip_unaffected_node_frontier: false, explicit_roster_only: false, + exclude_substrings: FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(), + discovery_scope_dirs: vec![], + spawn_width_cap: 0, } } } @@ -3412,7 +3478,12 @@ pub fn run_discovery_corpus_with_options( if options.explicit_roster_only || (scan_dirs.is_empty() && !explicit_entries.is_empty()) { Vec::new() } else { - discover_floor_corpus_rows(source_roots, scan_dirs)? + discover_floor_corpus_rows_scoped( + source_roots, + scan_dirs, + &options.exclude_substrings, + &options.discovery_scope_dirs, + )? }; let mut seen: std::collections::BTreeSet<(String, String)> = rows .iter() @@ -3480,7 +3551,12 @@ pub fn run_discovery_corpus_with_options( (false, NodeFrontierSeeds::default()) }; - let width = parallel_width.max(1); + let capped_width = if options.spawn_width_cap > 0 { + parallel_width.min(options.spawn_width_cap) + } else { + parallel_width + }; + let width = capped_width.max(1); if width == 1 { return run_discovery_rows( &rows, @@ -4279,6 +4355,7 @@ pub fn emit_source_root_ingest_manifest( mod inert_lens_hygiene_tests { use super::{ discover_floor_corpus_rows, inert_lens_modules, is_top_level_lens_module, DiscoveryRow, + FLOOR_DISCOVERY_EXCLUDES, }; use std::collections::HashMap; use std::path::PathBuf; @@ -4366,7 +4443,11 @@ mod inert_lens_hygiene_tests { "dsl/test/claim".to_string(), "src/v2/test/claim/manual".to_string(), ]; - let result = discover_floor_corpus_rows(&roots, &scan_dirs); + let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(); + let result = discover_floor_corpus_rows(&roots, &scan_dirs, &excludes); assert!( result.is_ok(), "floor discovery must succeed — every v2.lens.* is wired or deleted: {}", @@ -4380,7 +4461,7 @@ mod construction_justification_hygiene_tests { use super::{ construction_authority_graph_unresolved, construction_authority_unresolved, declares_construction_justification, discover_floor_corpus_rows, unjustified_lens_modules, - wall_now_authority_refs, + wall_now_authority_refs, FLOOR_DISCOVERY_EXCLUDES, }; use std::collections::{BTreeSet, HashMap}; use std::path::PathBuf; @@ -4450,7 +4531,11 @@ mod construction_justification_hygiene_tests { "dsl/test/claim".to_string(), "src/v2/test/claim/manual".to_string(), ]; - let result = discover_floor_corpus_rows(&roots, &scan_dirs); + let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(); + let result = discover_floor_corpus_rows(&roots, &scan_dirs, &excludes); assert!( result.is_ok(), "floor discovery must succeed — every v2.lens.* records a construction-justification: {}", @@ -4592,7 +4677,7 @@ mod sidecar_placement_hygiene_tests { ) .expect("write temp file"); let root = dir.to_string_lossy().into_owned(); - let result = discover_floor_corpus_rows(&[root], &[]); + let result = discover_floor_corpus_rows(&[root], &[], &[]); let _ = std::fs::remove_dir_all(&dir); let msg = result .err() diff --git a/src/v1/stage0/src/std_realization_schedule.rs b/src/v1/stage0/src/std_realization_schedule.rs index 7f291d849f6..f615461d79c 100644 --- a/src/v1/stage0/src/std_realization_schedule.rs +++ b/src/v1/stage0/src/std_realization_schedule.rs @@ -234,6 +234,9 @@ pub enum Runnable { scan_dirs: Rc>, explicit_entries: Rc>>, skip_unaffected_node_frontier: bool, + exclude_substrings: Rc>, + discovery_scope_dirs: Rc>, + spawn_width_cap: i64, profile: Rc, }, } @@ -483,6 +486,9 @@ pub fn runnable_eq(left: Rc, right: Rc) -> bool { scan_dirs: lsd, explicit_entries: lex, skip_unaffected_node_frontier: lskip, + exclude_substrings: lex2, + discovery_scope_dirs: lsc, + spawn_width_cap: lwc, profile: lp, .. } => match (*right).clone() { @@ -492,13 +498,19 @@ pub fn runnable_eq(left: Rc, right: Rc) -> bool { scan_dirs: rsd, explicit_entries: rex, skip_unaffected_node_frontier: rskip, + exclude_substrings: rex2, + discovery_scope_dirs: rsc, + spawn_width_cap: rwc, profile: rp, .. } => { - ((((string_list_eq(lsr.clone(), rsr.clone()) + (((((((string_list_eq(lsr.clone(), rsr.clone()) && string_list_eq(lsd.clone(), rsd.clone())) && schedule_witness_entry_list_eq(lex.clone(), rex.clone())) && (lskip.clone() == rskip.clone())) + && string_list_eq(lex2.clone(), rex2.clone())) + && string_list_eq(lsc.clone(), rsc.clone())) + && (lwc.clone() == rwc.clone())) && runnable_resource_profile_eq(lp.clone(), rp.clone())) } }, diff --git a/src/v1/tests/src/floor_skip_discovery_host_test.rs b/src/v1/tests/src/floor_skip_discovery_host_test.rs index 704629394da..6d16f19e5a0 100644 --- a/src/v1/tests/src/floor_skip_discovery_host_test.rs +++ b/src/v1/tests/src/floor_skip_discovery_host_test.rs @@ -38,6 +38,7 @@ fn discovery_options(skip: bool) -> DiscoveryCorpusOptions { DiscoveryCorpusOptions { skip_unaffected_node_frontier: skip, explicit_roster_only: true, + ..Default::default() } } diff --git a/src/v1/tests/src/pipeline.rs b/src/v1/tests/src/pipeline.rs index 3c5b35eeee0..9b14c6e8ba2 100644 --- a/src/v1/tests/src/pipeline.rs +++ b/src/v1/tests/src/pipeline.rs @@ -1229,7 +1229,7 @@ fn parse_resilience_unmasked_typecheck_debt_receipt() { use std::collections::BTreeSet; use v1_compiler::cli_run::{ build_multi_entry_index, discover_floor_corpus_rows, - resolve_entry_with_index_for_discovery_corpus, + resolve_entry_with_index_for_discovery_corpus, FLOOR_DISCOVERY_EXCLUDES, }; use v1_compiler::v1_std_core::{ is_discovery_corpus_advisory_typecheck_diagnostic, is_interpreter_blocking_diagnostic, @@ -1245,7 +1245,11 @@ fn parse_resilience_unmasked_typecheck_debt_receipt() { "dsl/test/claim".to_string(), "src/v2/test/claim/manual".to_string(), ]; - let rows = discover_floor_corpus_rows(&roots, &scan_dirs).expect("discover roster"); + let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(); + let rows = discover_floor_corpus_rows(&roots, &scan_dirs, &excludes).expect("discover roster"); let unique_entries: BTreeSet = rows.into_iter().map(|r| r.entry).collect(); let index = build_multi_entry_index(&roots); diff --git a/src/v1/tests/src/wet_hermetic_equivalence_test.rs b/src/v1/tests/src/wet_hermetic_equivalence_test.rs index cb8432a4ead..57095b54f7a 100644 --- a/src/v1/tests/src/wet_hermetic_equivalence_test.rs +++ b/src/v1/tests/src/wet_hermetic_equivalence_test.rs @@ -1,7 +1,7 @@ use v1_compiler::cli_run::{ discover_floor_corpus_rows, is_governed_service_representative_row, run_discovery_corpus, wet_hermetic_discovery_outcome_divergences, wet_hermetic_scaffold_roster_entry_prefix, - ClaimOutcome, DiscoveryRow, DiscoveryWitnessOutcome, + ClaimOutcome, DiscoveryRow, DiscoveryWitnessOutcome, FLOOR_DISCOVERY_EXCLUDES, }; use v1_compiler::v1_interpreter::ExecutionMode; @@ -81,7 +81,11 @@ fn governed_service_representative_explicit_entries() -> Vec<(String, String)> { let prefix = wet_hermetic_scaffold_roster_entry_prefix(&roots) .expect("load scaffold roster prefix from witness .dag authority"); let scan_dirs = ci_witness_scan_dirs(); - let rows = discover_floor_corpus_rows(&roots, &scan_dirs) + let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(); + let rows = discover_floor_corpus_rows(&roots, &scan_dirs, &excludes) .expect("discover floor corpus for governed-service representative roster"); let rep: Vec<(String, String)> = rows .iter() @@ -105,7 +109,11 @@ fn wet_hermetic_scaffold_roster_filter_uses_dag_prefix_authority() { "dag authority prefix must select lens_mock_totality tree: {prefix}" ); let scan_dirs = ci_witness_scan_dirs(); - let rows = discover_floor_corpus_rows(&roots, &scan_dirs) + let excludes: Vec = FLOOR_DISCOVERY_EXCLUDES + .iter() + .map(|s| s.to_string()) + .collect(); + let rows = discover_floor_corpus_rows(&roots, &scan_dirs, &excludes) .expect("discover floor corpus for prefix authority check"); let rep: Vec<&DiscoveryRow> = rows .iter() diff --git a/src/v2/test/claim/ci_floor_plan_witness_test.dag b/src/v2/test/claim/ci_floor_plan_witness_test.dag index 035c4314195..30069995447 100644 --- a/src/v2/test/claim/ci_floor_plan_witness_test.dag +++ b/src/v2/test/claim/ci_floor_plan_witness_test.dag @@ -98,7 +98,7 @@ fn witness_corpus_skip_node_frontier_enabled() -> Bool { fn witness_source_ingest_serialized_after_corpus() -> Bool { let batches = gunbc_ci_floor_batches() let corpus_layer = batches.skip(n: 1).first() - let ingest_layer = batches.skip(n: 2).first() + let ingest_layer = batches.skip(n: 3).first() list_contains_str(xs: batch_functions(b: corpus_layer), target: corpus_sentinel) && !list_contains_str(xs: batch_functions(b: corpus_layer), target: "source_root_ingest_gate_passes") && list_contains_str(xs: batch_functions(b: ingest_layer), target: "source_root_ingest_gate_passes") diff --git a/src/v2/test/claim/manual/add_arrow_eval_by_execution_test.dag b/src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/add_arrow_eval_by_execution_test.dag rename to src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag index 2ccee6919ba..5d128813428 100644 --- a/src/v2/test/claim/manual/add_arrow_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.add_arrow_eval_by_execution +module v2.test.execution.add_arrow_eval_by_execution import v2.compiler.body_producer { produce_mvp1_add_arrow_with_body } import v2.test.complexity_gate.source_bridged_add_subject_producer { diff --git a/src/v2/test/claim/manual/bind_eval_by_execution_test.dag b/src/v2/test/claim/execution/bind_eval_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/bind_eval_by_execution_test.dag rename to src/v2/test/claim/execution/bind_eval_by_execution_test.dag index 08ce5d86e94..dd5c5572114 100644 --- a/src/v2/test/claim/manual/bind_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/bind_eval_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.bind_eval_by_execution +module v2.test.execution.bind_eval_by_execution import v2.compiler.body_producer { produce_mvp1_bind_arrow_with_body, diff --git a/src/v2/test/claim/manual/bind_round_trip_test.dag b/src/v2/test/claim/execution/bind_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/bind_round_trip_test.dag rename to src/v2/test/claim/execution/bind_round_trip_test.dag index 7f6b43f8e53..8f7566b306a 100644 --- a/src/v2/test/claim/manual/bind_round_trip_test.dag +++ b/src/v2/test/claim/execution/bind_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.bind_round_trip +module v2.test.execution.bind_round_trip import v2.compiler.emit { emit } import v2.compiler.infer { InferredFacts, InferredTree } diff --git a/src/v2/test/claim/manual/branch_eval_by_execution_test.dag b/src/v2/test/claim/execution/branch_eval_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/branch_eval_by_execution_test.dag rename to src/v2/test/claim/execution/branch_eval_by_execution_test.dag index 6d0013f5b58..e4c3635a03d 100644 --- a/src/v2/test/claim/manual/branch_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/branch_eval_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.branch_eval_by_execution +module v2.test.execution.branch_eval_by_execution import v2.compiler.body_producer { produce_mvp1_pick_if_arrow_with_body, diff --git a/src/v2/test/claim/manual/branch_if_then_else_round_trip_test.dag b/src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/branch_if_then_else_round_trip_test.dag rename to src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag index 927285a132e..336e8be9e8d 100644 --- a/src/v2/test/claim/manual/branch_if_then_else_round_trip_test.dag +++ b/src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.branch_if_then_else_round_trip +module v2.test.execution.branch_if_then_else_round_trip import v2.compiler.emit { emit } import v2.compiler.infer { InferredFacts, InferredTree } diff --git a/src/v2/test/claim/manual/dag_add_emit_round_trip_test.dag b/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/dag_add_emit_round_trip_test.dag rename to src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag index 98be58e39db..5545f767714 100644 --- a/src/v2/test/claim/manual/dag_add_emit_round_trip_test.dag +++ b/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.dag_add_emit_round_trip +module v2.test.execution.dag_add_emit_round_trip import v2.compiler.emit { emit } import v2.compiler.infer { InferredFacts, InferredTree } diff --git a/src/v2/test/claim/manual/effect_io_eval_by_execution_test.dag b/src/v2/test/claim/execution/effect_io_eval_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/effect_io_eval_by_execution_test.dag rename to src/v2/test/claim/execution/effect_io_eval_by_execution_test.dag index 4410bfd5fa8..9702049e5af 100644 --- a/src/v2/test/claim/manual/effect_io_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/effect_io_eval_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.effect_io_eval_by_execution +module v2.test.execution.effect_io_eval_by_execution import v2.compiler.eval { EvalContext, diff --git a/src/v2/test/claim/manual/emit_ingest_grammar_relation_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag similarity index 98% rename from src/v2/test/claim/manual/emit_ingest_grammar_relation_round_trip_test.dag rename to src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag index 3c6086a2a07..5f7b31dd094 100644 --- a/src/v2/test/claim/manual/emit_ingest_grammar_relation_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.emit_ingest_grammar_relation_round_trip +module v2.test.execution.emit_ingest_grammar_relation_round_trip import v2.compiler.ingest { grammar_relation_row_forward_selection, diff --git a/src/v2/test/claim/manual/emit_ingest_python_same_language_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/emit_ingest_python_same_language_round_trip_test.dag rename to src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag index 2e40c999168..13a91d8acfc 100644 --- a/src/v2/test/claim/manual/emit_ingest_python_same_language_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.emit_ingest_python_same_language_round_trip +module v2.test.execution.emit_ingest_python_same_language_round_trip import v2.compiler.ingest { cross_language_compile, diff --git a/src/v2/test/claim/manual/emit_ingest_type_decl_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_type_decl_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/emit_ingest_type_decl_round_trip_test.dag rename to src/v2/test/claim/execution/emit_ingest_type_decl_round_trip_test.dag index ef44421653d..486a8fd8bc0 100644 --- a/src/v2/test/claim/manual/emit_ingest_type_decl_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_type_decl_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.emit_ingest_type_decl_round_trip +module v2.test.execution.emit_ingest_type_decl_round_trip import v2.compiler.ingest { grammar_relation_row_forward_selection, diff --git a/src/v2/test/claim/manual/emit_ingest_typescript_same_language_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag similarity index 98% rename from src/v2/test/claim/manual/emit_ingest_typescript_same_language_round_trip_test.dag rename to src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag index 484a6c6c87e..059e6312cae 100644 --- a/src/v2/test/claim/manual/emit_ingest_typescript_same_language_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.emit_ingest_typescript_same_language_round_trip +module v2.test.execution.emit_ingest_typescript_same_language_round_trip import v2.compiler.ingest { cross_language_compile, @@ -252,7 +252,7 @@ fn emit_ingest_typescript_same_language_round_trip_holds() -> Bool { data claim_emit_ingest_typescript_same_language_round_trip: UnifiedTestClaim = BoolWitnessClaim { label: "S4: TypeScript same-language emit↔ingest round-trip (selector bijectivity + parse bridge + source round-trip)", witness: BoolWitness { - entry: "src/v2/test/claim/manual/emit_ingest_typescript_same_language_round_trip_test.dag" + entry: "src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag" function: emit_ingest_typescript_same_language_round_trip_holds } } diff --git a/src/v2/test/claim/fold_assembly/round_trip_test.dag b/src/v2/test/claim/execution/fold_assembly_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/fold_assembly/round_trip_test.dag rename to src/v2/test/claim/execution/fold_assembly_round_trip_test.dag index 44e39003f62..4da2d0579ac 100644 --- a/src/v2/test/claim/fold_assembly/round_trip_test.dag +++ b/src/v2/test/claim/execution/fold_assembly_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.fold_assembly.round_trip +module v2.test.execution.fold_assembly_round_trip import v2.std.fold_assembly { apply_fills, assemble_fold, expand_fold, diff --git a/src/v2/test/claim/manual/loop_eval_by_execution_test.dag b/src/v2/test/claim/execution/loop_eval_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/loop_eval_by_execution_test.dag rename to src/v2/test/claim/execution/loop_eval_by_execution_test.dag index 5f87fa327fe..38e6f1ab7d8 100644 --- a/src/v2/test/claim/manual/loop_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/loop_eval_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.loop_eval_by_execution +module v2.test.execution.loop_eval_by_execution import v2.compiler.body_producer { produce_mvp1_loop_arrow_with_body, diff --git a/src/v2/test/claim/manual/loop_round_trip_test.dag b/src/v2/test/claim/execution/loop_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/loop_round_trip_test.dag rename to src/v2/test/claim/execution/loop_round_trip_test.dag index 09ee81c301d..b56c6b4b0f8 100644 --- a/src/v2/test/claim/manual/loop_round_trip_test.dag +++ b/src/v2/test/claim/execution/loop_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.loop_round_trip +module v2.test.execution.loop_round_trip import v2.compiler.emit { emit } import v2.compiler.infer { InferredFacts, InferredTree } diff --git a/src/v2/test/claim/manual/match_bool_round_trip_test.dag b/src/v2/test/claim/execution/match_bool_round_trip_test.dag similarity index 99% rename from src/v2/test/claim/manual/match_bool_round_trip_test.dag rename to src/v2/test/claim/execution/match_bool_round_trip_test.dag index f2e08176738..2122c0a8ef7 100644 --- a/src/v2/test/claim/manual/match_bool_round_trip_test.dag +++ b/src/v2/test/claim/execution/match_bool_round_trip_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.match_bool_round_trip +module v2.test.execution.match_bool_round_trip import v2.compiler.emit { emit } import v2.compiler.infer { InferredFacts, InferredTree } diff --git a/src/v2/test/claim/self_host/candidate_generation_test.dag b/src/v2/test/claim/execution/self_host_candidate_generation_test.dag similarity index 98% rename from src/v2/test/claim/self_host/candidate_generation_test.dag rename to src/v2/test/claim/execution/self_host_candidate_generation_test.dag index 84afc4b65f7..f0d1641ecc6 100644 --- a/src/v2/test/claim/self_host/candidate_generation_test.dag +++ b/src/v2/test/claim/execution/self_host_candidate_generation_test.dag @@ -1,4 +1,4 @@ -module v2.test.self_host.candidate_generation +module v2.test.execution.self_host_candidate_generation import v2.compiler.self_host.candidate_generation { generate_translate_self_emit_candidate @@ -18,7 +18,7 @@ import v2.extdeps.languages.dag { dag_mvp1_emitted_add_fn_node, dag_mvp1_target_model } -import v2.test.manual.dag_add_emit_round_trip { +import v2.test.execution.dag_add_emit_round_trip { dag_add_emitted_root, dag_add_target_model } diff --git a/src/v2/test/claim/self_host/compiler_closure_emit_test.dag b/src/v2/test/claim/execution/self_host_compiler_closure_emit_test.dag similarity index 78% rename from src/v2/test/claim/self_host/compiler_closure_emit_test.dag rename to src/v2/test/claim/execution/self_host_compiler_closure_emit_test.dag index 2b03b356170..8f95b3f2f80 100644 --- a/src/v2/test/claim/self_host/compiler_closure_emit_test.dag +++ b/src/v2/test/claim/execution/self_host_compiler_closure_emit_test.dag @@ -1,4 +1,4 @@ -module v2.test.self_host.compiler_closure_emit +module v2.test.execution.self_host_compiler_closure_emit import v2.test.fixture.compiler_closure_scope_receipt { scoped_closure_scope_scalar_receipt_holds diff --git a/src/v2/test/claim/self_host/fixed_point_test.dag b/src/v2/test/claim/execution/self_host_fixed_point_test.dag similarity index 98% rename from src/v2/test/claim/self_host/fixed_point_test.dag rename to src/v2/test/claim/execution/self_host_fixed_point_test.dag index f6055e20948..4cfd6c4e8fb 100644 --- a/src/v2/test/claim/self_host/fixed_point_test.dag +++ b/src/v2/test/claim/execution/self_host_fixed_point_test.dag @@ -1,4 +1,4 @@ -module v2.test.self_host.fixed_point +module v2.test.execution.self_host_fixed_point import v2.std.logic { Bool } import v2.std.node { diff --git a/src/v2/test/claim/manual/typescript_closure_emit_by_execution_test.dag b/src/v2/test/claim/execution/typescript_closure_emit_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/typescript_closure_emit_by_execution_test.dag rename to src/v2/test/claim/execution/typescript_closure_emit_by_execution_test.dag index c14e3cdb4be..f40daccc4be 100644 --- a/src/v2/test/claim/manual/typescript_closure_emit_by_execution_test.dag +++ b/src/v2/test/claim/execution/typescript_closure_emit_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.typescript_closure_emit_by_execution +module v2.test.execution.typescript_closure_emit_by_execution import v2.std.host_transport { target_emit_host_runtime_row_unconfigured } import v2.std.diagnostic { Accepted, Outcome, Rejected, bind_outcome } diff --git a/src/v2/test/claim/manual/typescript_enum_union_emit_by_execution_test.dag b/src/v2/test/claim/execution/typescript_enum_union_emit_by_execution_test.dag similarity index 98% rename from src/v2/test/claim/manual/typescript_enum_union_emit_by_execution_test.dag rename to src/v2/test/claim/execution/typescript_enum_union_emit_by_execution_test.dag index 0cc4be03734..c828090b168 100644 --- a/src/v2/test/claim/manual/typescript_enum_union_emit_by_execution_test.dag +++ b/src/v2/test/claim/execution/typescript_enum_union_emit_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.typescript_enum_union_emit_by_execution +module v2.test.execution.typescript_enum_union_emit_by_execution import v2.compiler.translate { translate_type_expression_project, diff --git a/src/v2/test/claim/manual/typescript_import_emit_by_execution_test.dag b/src/v2/test/claim/execution/typescript_import_emit_by_execution_test.dag similarity index 99% rename from src/v2/test/claim/manual/typescript_import_emit_by_execution_test.dag rename to src/v2/test/claim/execution/typescript_import_emit_by_execution_test.dag index 9270db33ebd..98a68e7c85f 100644 --- a/src/v2/test/claim/manual/typescript_import_emit_by_execution_test.dag +++ b/src/v2/test/claim/execution/typescript_import_emit_by_execution_test.dag @@ -1,4 +1,4 @@ -module v2.test.manual.typescript_import_emit_by_execution +module v2.test.execution.typescript_import_emit_by_execution import v2.std.host_transport { target_emit_host_runtime_row_unconfigured } import v2.std.diagnostic { Accepted, Outcome, Rejected, bind_outcome, outcome_accepted } diff --git a/src/v2/test/claim/manual/bind_emit_test.dag b/src/v2/test/claim/manual/bind_emit_test.dag index e4c058ebe6b..457d0fe6f23 100644 --- a/src/v2/test/claim/manual/bind_emit_test.dag +++ b/src/v2/test/claim/manual/bind_emit_test.dag @@ -4,7 +4,7 @@ import v2.compiler.body_producer { produce_mvp1_bind_arrow_with_body, produce_mvp1_bind_arrow_with_body_wrong_value } -import v2.test.manual.bind_round_trip { +import v2.test.execution.bind_round_trip { bind_round_trip_inferred_facts_for, bind_inferred_tree } diff --git a/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag b/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag index 6419b7490f1..afc82d52cf2 100644 --- a/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag +++ b/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag @@ -4,7 +4,7 @@ import v2.compiler.body_producer { produce_mvp1_pick_if_arrow_with_body, produce_mvp1_pick_if_arrow_with_body_swapped_arms } -import v2.test.manual.branch_if_then_else_round_trip { +import v2.test.execution.branch_if_then_else_round_trip { branch_if_then_else_inferred_facts_for, branch_if_then_else_inferred_tree } diff --git a/src/v2/test/claim/manual/loop_emit_test.dag b/src/v2/test/claim/manual/loop_emit_test.dag index ec2c4132e32..f0941c12bd8 100644 --- a/src/v2/test/claim/manual/loop_emit_test.dag +++ b/src/v2/test/claim/manual/loop_emit_test.dag @@ -4,7 +4,7 @@ import v2.compiler.body_producer { produce_mvp1_loop_arrow_with_body, produce_mvp1_loop_arrow_with_body_wrong_value } -import v2.test.manual.loop_round_trip { +import v2.test.execution.loop_round_trip { loop_round_trip_inferred_facts_for, loop_inferred_tree } diff --git a/src/v2/test/claim/manual/match_bool_emit_test.dag b/src/v2/test/claim/manual/match_bool_emit_test.dag index a03c467fe15..6888e6257be 100644 --- a/src/v2/test/claim/manual/match_bool_emit_test.dag +++ b/src/v2/test/claim/manual/match_bool_emit_test.dag @@ -4,7 +4,7 @@ import v2.compiler.body_producer { produce_mvp1_match_arrow_with_body, produce_mvp1_match_arrow_with_body_swapped_arms } -import v2.test.manual.match_bool_round_trip { +import v2.test.execution.match_bool_round_trip { match_bool_inferred_facts_for, match_bool_inferred_tree } diff --git a/src/v2/workflow/ci_floor_plan.dag b/src/v2/workflow/ci_floor_plan.dag index 0b361421b94..5e4affc99c9 100644 --- a/src/v2/workflow/ci_floor_plan.dag +++ b/src/v2/workflow/ci_floor_plan.dag @@ -1,6 +1,6 @@ module v2.workflow.ci_floor_plan -import gunbc.ci_layer_roots { witness_layer_roots, witness_discovery_scan_dirs } +import gunbc.ci_layer_roots { witness_layer_roots, witness_discovery_scan_dirs, witness_exclusion_substrings } import gunbc.ci_spec { gunbc_ci_spec, CiSpec, Gate, RustMonolithGate, EmitHostGate, LayeringImportsGate, @@ -27,6 +27,7 @@ import gunbc.ci_floor_measurement { gunbc_ci_floor_conservative_fallback_width, gunbc_ci_floor_memory_derived_width, gunbc_ci_runner_cgroup_memory_cap, + gunbc_ci_execution_corpus_available_width, } import gunbc.ci_budget_tree { srv1_floor_memory_budget } import extdeps.cpu.ampere { altra_max_m12830_catalog } @@ -89,7 +90,7 @@ fn floor_compile_root_node() -> Node { } fn floor_resource_anchor_node(node: Node) -> Bool { - (node == floor_compile_root_node()) || (node == floor_corpus_node) + (node == floor_compile_root_node()) || (node == floor_corpus_node) || (node == execution_corpus_node) } fn gate_runnable_profile(g: Gate) -> RunnableResourceProfile { @@ -162,6 +163,9 @@ fn corpus_runnable() -> Runnable { scan_dirs: witness_discovery_scan_dirs, explicit_entries: [], skip_unaffected_node_frontier: true, + exclude_substrings: witness_exclusion_substrings, + discovery_scope_dirs: [], + spawn_width_cap: 0, profile: runnable_resource_profile( heavy_whole_tree_resolve: true, spawns_host_compiler: false, @@ -170,8 +174,36 @@ fn corpus_runnable() -> Runnable { } } +data execution_corpus_node: Node = Node { + kind: TypeNode { connective: Atom { identity: ^gunbc_floor_execution_corpus } }, + children: [] +} + +data execution_witness_memory_reservation: ByteSize = byte_size(2147483648) + +fn execution_corpus_spawn_width() -> Int { + gunbc_ci_execution_corpus_available_width(each: execution_witness_memory_reservation) +} + +fn execution_corpus_runnable() -> Runnable { + RunnableDiscoveryBatch { + source_roots: corpus_source_roots(), + scan_dirs: [], + explicit_entries: [], + skip_unaffected_node_frontier: true, + exclude_substrings: [], + discovery_scope_dirs: ["src/v2/test/claim/execution"], + spawn_width_cap: execution_corpus_spawn_width(), + profile: runnable_resource_profile( + heavy_whole_tree_resolve: true, + spawns_host_compiler: false, + memory: runnable_memory_substantial(predicted_peak: execution_witness_memory_reservation) + ) + } +} + fn floor_nodes(spec: CiSpec) -> List { - fold(spec.gates, init: [floor_corpus_node], f: fn(acc, g) { + fold(spec.gates, init: [floor_corpus_node, execution_corpus_node], f: fn(acc, g) { list_snoc_item(xs: acc, item: gate_node(g: g)) }) } @@ -195,14 +227,18 @@ fn floor_resource_depends_on(source: Node, dependent: Node) -> DependencyView { } fn floor_corpus_exclusion_resource_edges(spec: CiSpec) -> List { - fold(spec.gates, init: [], f: fn(acc, g) { + let execution_after_floor = [floor_resource_depends_on(source: floor_corpus_node, dependent: execution_corpus_node)] + fold(spec.gates, init: execution_after_floor, f: fn(acc, g) { let node = gate_node(g: g) if floor_resource_anchor_node(node: node) { acc } else if runnable_excludes_corpus_co_residence(profile: gate_runnable_profile(g: g)) { list_snoc_item( - xs: acc, - item: floor_resource_depends_on(source: floor_corpus_node, dependent: node) + xs: list_snoc_item( + xs: acc, + item: floor_resource_depends_on(source: floor_corpus_node, dependent: node) + ), + item: floor_resource_depends_on(source: execution_corpus_node, dependent: node) ) } else { acc @@ -231,15 +267,22 @@ fn floor_heavy_resolve_chain_resource_edges(spec: CiSpec) -> List List { - fold(spec.gates, init: [floor_depends_on_compile(dependent: floor_corpus_node)], f: fn(acc, g) { - match g { - DslCompileCleanGate => acc - _ => list_snoc_item( - xs: acc, - item: floor_depends_on_compile(dependent: gate_node(g: g)) - ) + fold( + spec.gates, + init: [ + floor_depends_on_compile(dependent: floor_corpus_node), + floor_depends_on_compile(dependent: execution_corpus_node) + ], + f: fn(acc, g) { + match g { + DslCompileCleanGate => acc + _ => list_snoc_item( + xs: acc, + item: floor_depends_on_compile(dependent: gate_node(g: g)) + ) + } } - }) + ) } fn floor_resource_dependencies(spec: CiSpec) -> List { @@ -273,6 +316,8 @@ fn floor_unrunnable_sentinel() -> Runnable { fn runnable_for_node(node: Node, spec: CiSpec) -> Runnable { if node == floor_corpus_node { corpus_runnable() + } else if node == execution_corpus_node { + execution_corpus_runnable() } else { fold(spec.gates, init: floor_unrunnable_sentinel(), f: fn(acc, g) { if node == gate_node(g: g) { gate_runnable(g: g) } else { acc } @@ -422,7 +467,7 @@ fn witness_floor_spawn_width_zero_budget_falls_back() -> Bool { fn floor_batch_heavy_gate_resolve_count(batch: List) -> Int { fold(batch, init: 0, f: fn(acc, r) { match r { - RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, profile: _ } => acc + RunnableDiscoveryBatch { source_roots: _, scan_dirs: _, explicit_entries: _, skip_unaffected_node_frontier: _, exclude_substrings: _, discovery_scope_dirs: _, spawn_width_cap: _, profile: _ } => acc RunnableSingleClaim { entry: _, function: f, profile: p } => if f == ci_floor_compile_gate_fn { acc