39 lines
1.3 KiB
Rust
39 lines
1.3 KiB
Rust
|
|
//! Phase 121: StepTree → Normalized shadow lowering (dev-only)
|
||
|
|
//!
|
||
|
|
//! ## Purpose
|
||
|
|
//!
|
||
|
|
//! Establish minimal route from StepTree (structure SSOT) to Normalized form,
|
||
|
|
//! verifying parity with existing router for if-only patterns.
|
||
|
|
//!
|
||
|
|
//! ## Scope
|
||
|
|
//!
|
||
|
|
//! - **if-only**: Support if statements without loops
|
||
|
|
//! - **loop rejection**: Reject loops via capability guard
|
||
|
|
//!
|
||
|
|
//! ## Design Rules
|
||
|
|
//!
|
||
|
|
//! **Input SSOT**:
|
||
|
|
//! - `StepTree` + `StepTreeContract` (no facts re-analysis)
|
||
|
|
//! - Lowering decisions based only on contract information
|
||
|
|
//!
|
||
|
|
//! **Output**:
|
||
|
|
//! - `JoinModule` (Normalized dialect)
|
||
|
|
//! - Or "Normalized-equivalent intermediate" expressed in existing JoinIR types
|
||
|
|
//!
|
||
|
|
//! **Execution conditions**:
|
||
|
|
//! - dev-only: Only runs when `joinir_dev_enabled()` returns true
|
||
|
|
//! - strict: Only fail-fast on mismatch when `joinir_strict_enabled()` returns true
|
||
|
|
//!
|
||
|
|
//! **Prohibitions**:
|
||
|
|
//! - No fallback: Shadow conversion failure logs reason in dev-only, fail-fast in strict
|
||
|
|
//! - No direct env reads (must go through `src/config/env/*`)
|
||
|
|
//! - No hardcoding (no branching on fixture names or variable names)
|
||
|
|
|
||
|
|
pub mod builder;
|
||
|
|
pub mod contracts;
|
||
|
|
pub mod parity;
|
||
|
|
|
||
|
|
pub use builder::StepTreeNormalizedShadowLowererBox;
|
||
|
|
pub use contracts::{CapabilityCheckResult, UnsupportedCapability};
|
||
|
|
pub use parity::{MismatchKind, ShadowParityResult};
|