Commit Graph

3 Commits

Author SHA1 Message Date
b028aa791e feat(phase72): HAKO_JOINIR_IF_SELECT SSOT consolidation - Test helpers
Phase 72-B: Created SSOT helper functions for HAKO_JOINIR_IF_SELECT ENV control.

Changes:
- Added set_if_select_on() and set_if_select_off() helpers to joinir_env.rs
- Replaced 13 direct std::env calls with helper functions in src/tests/mir_joinir_if_select.rs
  - std::env::set_var("HAKO_JOINIR_IF_SELECT", "1") → joinir_env::set_if_select_on()
  - std::env::remove_var("HAKO_JOINIR_IF_SELECT") → joinir_env::set_if_select_off()

Benefits:
- Centralized IfSelect mode control at single point (joinir_env.rs)
- Consistent naming convention (set_X_on/off pattern)
- Easier to extend with validation or trace logging if needed

Tests verified: cargo check --tests passed with no errors

Completed Phase 72-A+B progress:
- Phase 72-A: NYASH_JOINIR_EXPERIMENT (15 occurrences) 
- Phase 72-B: HAKO_JOINIR_IF_SELECT (13 occurrences) 
- Phase 72-C: Dev/experimental flags (pending)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:42:22 +09:00
3a529b1d68 feat(phase72): NYASH_JOINIR_EXPERIMENT SSOT consolidation - Test files
Phase 72-A: Created SSOT helper function for NYASH_JOINIR_EXPERIMENT ENV checks.

Changes:
- Added `is_experiment_enabled()` helper in src/tests/helpers/joinir_env.rs
- Replaced 15 direct ENV reads with helper function calls across 10 test files:
  - src/tests/joinir_runner_min.rs
  - src/tests/joinir_runner_standalone.rs
  - src/tests/mir_joinir_funcscanner_append_defs.rs
  - src/tests/mir_joinir_funcscanner_trim.rs
  - src/tests/mir_joinir_min.rs
  - src/tests/mir_joinir_skip_ws.rs
  - src/tests/mir_joinir_stage1_using_resolver_min.rs
  - src/tests/mir_joinir_stageb_body.rs
  - src/tests/mir_joinir_stageb_funcscanner.rs
  - src/tests/joinir_json_min.rs

Pattern replaced:
  std::env::var("NYASH_JOINIR_EXPERIMENT").ok().as_deref() != Some("1")
  → !joinir_env::is_experiment_enabled()

Benefits:
- Centralized ENV check logic at single point (joinir_env.rs)
- Easier to maintain and modify experiment mode checking
- Foundation for Phase 72-B (HAKO_JOINIR_IF_SELECT SSOT)

Tests verified: cargo check --tests passed with no errors

Next: Phase 72-B (HAKO_JOINIR_IF_SELECT consolidation with 13 occurrences)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:41:14 +09:00
8633224061 JoinIR/SSA/Stage-3: sync CURRENT_TASK and dev env 2025-12-01 11:10:46 +09:00