diff --git a/src/v3/compiler/src/r3_gate_87_cementing_regen_runner_suites.rs b/src/v3/compiler/src/r3_gate_87_cementing_regen_runner_suites.rs index 88a856e107f..b0f4c1790eb 100644 --- a/src/v3/compiler/src/r3_gate_87_cementing_regen_runner_suites.rs +++ b/src/v3/compiler/src/r3_gate_87_cementing_regen_runner_suites.rs @@ -101,6 +101,12 @@ pub const R3_GATE_87_CEMENTING_REGEN_SUITES: &[(&str, &str, &str, &[&str])] = &[ "r3_gate_87_cementing_regen_lower_helpers_suite", &["cementing_regen_lower_helpers"], ), + ( + include_str!("../tests/dag/t_r3_gate_87_cementing_regen_parallelism.dag"), + "src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_parallelism.dag", + "r3_gate_87_cementing_regen_parallelism_suite", + &["cementing_regen_parallelism"], + ), ( include_str!("../tests/dag/t_r3_gate_87_cementing_regen_provenance.dag"), "src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_provenance.dag", diff --git a/src/v3/compiler/src/test_runner.rs b/src/v3/compiler/src/test_runner.rs index 7a078c47db0..06f38b1782e 100644 --- a/src/v3/compiler/src/test_runner.rs +++ b/src/v3/compiler/src/test_runner.rs @@ -6,7 +6,8 @@ use std::time::{Duration, Instant}; use crate::cementing_dispatch; use crate::dag::{ AtomPayload, Behavior, BindNode, Dag, Declaration, DeclarationId, FieldValue, LiteralBits, - NodeId, Path, PortId, PortState, SymbolicCost, TypeConnective, ValueBody, + NodeId, ParallelismUnsupportedKind, Path, PortId, PortState, SymbolicCost, TypeConnective, + ValueBody, WorkflowParallelismReport, }; use crate::diagnostics::Diagnostic; use crate::emit::python_target::last_emit_python_program_top_level_value_bind_name; @@ -31,8 +32,9 @@ use crate::lens_structural_resolution; use crate::lens_unused_parameters::{UnusedParametersConfig, UnusedParametersLens}; use crate::types::TypeShape; use crate::{ - analyze_symbolic_cost_dimension, compare_stage_snapshots, compile_stage_snapshots, - compile_to_dag, default_fixed_point_source, CompileError, DimensionReport, + analyze_parallelism, analyze_symbolic_cost_dimension, compare_stage_snapshots, + compile_stage_snapshots, compile_to_dag, default_fixed_point_source, CompileError, + DimensionReport, }; const SG0_CENSUS_SOURCE: &str = include_str!(concat!( @@ -3151,6 +3153,19 @@ impl<'a> TestRunner<'a> { .query(&UnusedParametersConfig::default()) .is_empty(), ), + "gate87_parallelism_literal_no_workflow_projection" => { + let Some(bind) = find_bind(program_dag, "lit", file_name) else { + return Some(ClaimResult::Fail(format!( + "LensOutputEquals({lens_name}): bind `lit` not found in `{file_name}`" + ))); + }; + let report = analyze_parallelism(program_dag, bind.id); + i64::from(matches!( + report, + WorkflowParallelismReport::ParallelismUnsupported(detail) + if detail.kind == ParallelismUnsupportedKind::NoWorkflowProjection + )) + } _ => return None, }; diff --git a/src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_parallelism.dag b/src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_parallelism.dag new file mode 100644 index 00000000000..57afd8c45b0 --- /dev/null +++ b/src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_parallelism.dag @@ -0,0 +1,38 @@ +// R3 gate #87 — `LensRegistryEntry` `parallelism` (PARTIAL / v3-native per `verification.dag`). +// **INVARIANTS §P5(b) / `docs/r3-program-plan.md` §1.8 row #87** (`lens_cementing_test_discipline_complete`, +// T-Tests-As-Data-Completeness): this harness + `r3_gate_87_cementing_regen_runner_suites.rs` + +// `test_runner::eval_gate_87_cementing_projection` + `r3_gate_87_lens_cementing_regen_receipts_test` +// are the single merge-visible receipt bundle for the new registry row (no parallel hand list). +// Narrow Int projection: a literal bind without Lane-2 workflow staging yields +// `ParallelismUnsupportedKind::NoWorkflowProjection` from `analyze_parallelism` (runner seam: +// `eval_gate_87_cementing_projection`). Dissolution: widen to a full `WorkflowParallelismReport` +// `LensOutputEquals` once report literals are authorable as `.dag` data (T-PB-B tests-as-data +// carrier lane; full behavioral completion remains `parallelism_lens_behaviorally_complete` / row #81). + +module v3.compiler.tests.t_r3.gate_87_cementing_regen_parallelism + +import std.substrate { Dag } +import std.verification { LensOutputEquals, ProgramInput, TestClaim, TestSuite } + +fn gate87_parallelism_literal_no_workflow_projection(d: Dag) -> Int = 0 + +data gate87_program_input: ProgramInput = {} + +data gate87_expected_true: Int = 1 + +data cementing_regen_parallelism_claim: TestClaim = { + name: "cementing_regen_parallelism", + source: "let lit: Int = 7", + file_name: "r3_gate_87_parallelism_smoke.v3", + predicate: LensOutputEquals( + gate87_parallelism_literal_no_workflow_projection, + gate87_program_input, + gate87_expected_true + ), + requires: [] +} + +data r3_gate_87_cementing_regen_parallelism_suite: TestSuite = { + name: "r3-gate-87/cementing/regen/parallelism", + claims: [Enumerated(cementing_regen_parallelism_claim)] +} diff --git a/src/v3/compiler/tests/integration/r3_gate_87_lens_cementing_regen_receipts_test.rs b/src/v3/compiler/tests/integration/r3_gate_87_lens_cementing_regen_receipts_test.rs index 3af95961b11..9d279582102 100644 --- a/src/v3/compiler/tests/integration/r3_gate_87_lens_cementing_regen_receipts_test.rs +++ b/src/v3/compiler/tests/integration/r3_gate_87_lens_cementing_regen_receipts_test.rs @@ -40,8 +40,12 @@ use std::path::PathBuf; use v3_compiler::r3_gate_87_cementing_regen_runner_suites::r3_gate_87_cementing_regen_lens_names_for_runner_table; +use v3_compiler::analyze_parallelism; use v3_compiler::compile_to_dag; -use v3_compiler::dag::{Behavior, Declaration, FieldValue, LiteralBits, ValueBody}; +use v3_compiler::dag::{ + Behavior, Declaration, FieldValue, LiteralBits, ParallelismUnsupportedKind, ValueBody, + WorkflowParallelismReport, +}; use v3_compiler::lens_cost_target_realization::type_realization_meta; use v3_compiler::lens_effect_enumeration::{enumerate_effects, TransactionalPattern}; use v3_compiler::lens_provenance::{origin_of, Origin}; @@ -158,6 +162,29 @@ fn r3_gate_87_effect_enumeration_rust_receipt_on_minimal_program() { ); } +#[test] +fn r3_gate_87_parallelism_rust_receipt_literal_no_workflow_projection() { + let dag = + compile_to_dag("let lit: Int = 7", "r3_gate_87_parallelism_receipt.v3").expect("compile"); + let bind = dag + .nodes() + .iter() + .find_map(|n| match n { + Behavior::Bind(b) if b.name == "lit" => Some(b), + _ => None, + }) + .expect("lit bind"); + let report = analyze_parallelism(&dag, bind.id); + assert!( + matches!( + &report, + WorkflowParallelismReport::ParallelismUnsupported(detail) + if detail.kind == ParallelismUnsupportedKind::NoWorkflowProjection + ), + "unstaged literal should classify as NoWorkflowProjection, got {report:?}" + ); +} + #[test] fn r3_gate_87_provenance_origin_rust_receipt_on_literal_bind() { let dag =