Phase 33 NORM canon test: enforce normalized dev route for P1/P2/JP mini

This commit is contained in:
nyash-codex
2025-12-11 20:54:33 +09:00
parent 59a985b7fa
commit af6f95cd4b
170 changed files with 4423 additions and 1897 deletions

View File

@ -99,6 +99,24 @@ pub fn read_quoted_ifmerge_enabled() -> bool {
env_bool("HAKO_JOINIR_READ_QUOTED_IFMERGE")
}
/// NYASH_JOINIR_NORMALIZED_DEV_RUN=1 - Run JoinIR runner through Normalized roundtrip (dev only)
pub fn joinir_normalized_dev_run_enabled() -> bool {
// Feature gate at call sites still applies; this helper just centralizes the env read.
env_bool("NYASH_JOINIR_NORMALIZED_DEV_RUN")
}
/// Unified switch for Normalized dev experiments (feature + env).
///
/// - Requires `--features normalized_dev`
/// - Requires `NYASH_JOINIR_NORMALIZED_DEV_RUN=1`
pub fn normalized_dev_enabled() -> bool {
if cfg!(feature = "normalized_dev") {
joinir_normalized_dev_run_enabled()
} else {
false
}
}
/// Phase 82: NYASH_PHI_FALLBACK_DISABLED=1 - Disable if_phi fallback (dev mode)
///
/// lifecycle.rs の infer_type_from_phi* callsite を封じて、
@ -124,7 +142,7 @@ pub fn read_quoted_ifmerge_enabled() -> bool {
/// Phase 84-5: if_phi.rs 削除後は常に true
/// 環境変数は統計目的でのみ残す
pub fn phi_fallback_disabled() -> bool {
true // Phase 84-5: Always disabled after if_phi.rs deletion
true // Phase 84-5: Always disabled after if_phi.rs deletion
}
/// Phase 84-5: 統計・メトリクス用(オプション)