refactor(joinir): Phase 82-83 - Debug flag SSOT + Fallback verification
Phase 82: Centralized JoinIR debug flag reading - Added is_joinir_debug() SSOT function in joinir_flags.rs - Replaced 16 direct env::var() calls across 8 files - Updated docs to recommend HAKO_JOINIR_DEBUG (NYASH_ deprecated) - Backward compat: Both env vars work Phase 83: Verified promoted carrier fallback behavior - Confirmed NO fallback to name-based lookup for DigitPos/Trim - Documented fallback expectations in Phase 80/81 docs - Added verification commands and expected output Changes: - src/config/env/joinir_flags.rs: +187 lines (new SSOT module) - 8 files: env var reads → is_joinir_debug() calls - 3 docs: HAKO_JOINIR_DEBUG examples + fallback sections - 1 summary doc: phase82-83-debug-flag-ssot-summary.md Tests: 970/970 lib PASS, 58/58 normalized_dev PASS Impact: Dev-only (zero production changes)
This commit is contained in:
@ -64,9 +64,10 @@ pub struct JoinLoopTrace {
|
||||
impl JoinLoopTrace {
|
||||
/// Create a new tracer, reading environment variables.
|
||||
pub fn new() -> Self {
|
||||
use crate::config::env::is_joinir_debug;
|
||||
Self {
|
||||
varmap_enabled: std::env::var("NYASH_TRACE_VARMAP").is_ok(),
|
||||
joinir_enabled: std::env::var("NYASH_JOINIR_DEBUG").is_ok(),
|
||||
joinir_enabled: is_joinir_debug(),
|
||||
phi_enabled: std::env::var("NYASH_OPTION_C_DEBUG").is_ok(),
|
||||
mainline_enabled: std::env::var("NYASH_JOINIR_MAINLINE_DEBUG").is_ok(),
|
||||
loopform_enabled: std::env::var("NYASH_LOOPFORM_DEBUG").is_ok(),
|
||||
|
||||
Reference in New Issue
Block a user