Files
hakorune/tools
tomoaki 095213c580 refactor(smoke): Clarify auto_detect.conf responsibilities with profile parameter
**Problem**:
- detect_optimal_config() took no arguments (line 11)
- Quick profile SSOT forcing scattered outside function (line 134-137)
- Profile-specific logic split between detect_optimal_config() and auto_configure()
- Hard to understand flow: "why is this logic duplicated?"

**Solution** (Task 4 - Low Priority):
- Accept profile parameter: `detect_optimal_config(profile)`
- Move quick profile SSOT forcing inside function (top priority)
- Eliminate duplicate logic in auto_configure()
- Update show_auto_config() to pass profile parameter

**Changes**:
- detect_optimal_config(): Add `local profile="${1:-quick}"`
- Quick SSOT check: Move to function top (early return)
- auto_configure(): Pass `"$profile"` to detect_optimal_config
- show_auto_config(): Pass `"${SMOKES_CURRENT_PROFILE:-quick}"`
- Remove 6 lines of duplicate quick forcing logic

**Benefits**:
- Single responsibility: Profile logic inside detect_optimal_config
- Clearer flow: All detection in one function
- Maintainability: One place to modify profile behavior
- Readability: Intent is explicit (profile parameter)

**Verification**:
-  detect_optimal_config "quick": returns rust_vm_dynamic (SSOT)
-  detect_optimal_config "integration": returns llvm_static
-  Quick profile: 154/154 PASS

**Note**: This is a low-impact refactoring (code organization only)
- Behavior unchanged (same logic, better location)
- No performance impact
- Future-proof for profile-specific detection

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 17:32:48 +09:00
..