nyash-codex
c85d67c92e
feat(hako_check): Phase 153 - Dead code detection revival (JoinIR version)
Implement comprehensive dead code detection for hako_check with JoinIR
integration, following Phase 133/134/152 box-based modularity pattern.
## Key Achievements
1. **Comprehensive Inventory** (`phase153_hako_check_inventory.md`):
- Documented current hako_check architecture (872 lines)
- Analyzed existing HC011/HC012 rules
- Confirmed JoinIR-only pipeline (Phase 124)
- Identified Phase 153 opportunities
2. **DeadCodeAnalyzerBox** (`rule_dead_code.hako`):
- Unified HC019 rule (570+ lines)
- Method-level + box-level dead code detection
- DFS reachability from entrypoints
- Text-based analysis (no MIR JSON dependency for MVP)
- Heuristic-based false positive reduction
3. **CLI Integration** (`cli.hako`):
- Added `--dead-code` flag for comprehensive mode
- Added `--rules dead_code` for selective execution
- Compatible with --format (text/json-lsp/dot)
4. **Test Infrastructure**:
- HC019_dead_code test directory (ng/ok/expected.json)
- `hako_check_deadcode_smoke.sh` with 4 test cases
## Technical Details
- **Input**: Analysis IR (MapBox with methods/calls/boxes/entrypoints)
- **Output**: HC019 diagnostics
- **Algorithm**: Graph-based DFS reachability
- **Pattern**: Box-based modular architecture
- **No ENV vars**: CLI flags only
## Files Modified
- NEW: docs/development/current/main/phase153_hako_check_inventory.md
- NEW: tools/hako_check/rules/rule_dead_code.hako
- MOD: tools/hako_check/cli.hako
- NEW: tools/hako_check/tests/HC019_dead_code/
- NEW: tools/hako_check_deadcode_smoke.sh
- MOD: CURRENT_TASK.md
## Next Steps
- Phase 154+: MIR CFG integration for block-level detection
- Phase 160+: Integration with .hako JoinIR/MIR migration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 14:19:48 +09:00
..
2025-12-03 13:42:05 +09:00
2025-09-17 10:58:12 +09:00
2025-09-17 10:58:12 +09:00
2025-09-17 10:58:12 +09:00
2025-12-04 10:52:10 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-03 13:59:06 +09:00
2025-12-02 21:52:18 +09:00
2025-12-04 06:26:59 +09:00
2025-12-04 06:02:03 +09:00
2025-12-03 14:33:04 +09:00
2025-12-04 06:02:03 +09:00
2025-11-27 17:05:46 +09:00
2025-11-27 17:05:46 +09:00
2025-11-29 15:57:14 +09:00
2025-11-29 15:57:14 +09:00
2025-11-29 15:57:14 +09:00
2025-11-30 08:54:18 +09:00
2025-12-02 09:45:54 +09:00
2025-11-30 10:10:45 +09:00
2025-12-02 10:19:07 +09:00
2025-12-02 11:16:01 +09:00
2025-12-02 12:36:28 +09:00
2025-12-02 19:37:01 +09:00
2025-12-02 19:37:01 +09:00
2025-12-02 19:37:01 +09:00
2025-12-02 19:37:01 +09:00
2025-12-02 20:18:13 +09:00
2025-12-02 20:18:13 +09:00
2025-12-02 20:18:13 +09:00
2025-12-02 20:30:22 +09:00
2025-12-02 20:18:13 +09:00
2025-12-02 19:37:01 +09:00
2025-12-02 19:37:01 +09:00
2025-12-02 21:09:15 +09:00
2025-12-02 21:09:15 +09:00
2025-12-03 18:16:49 +09:00
2025-12-03 19:37:32 +09:00
2025-12-03 19:37:32 +09:00
2025-12-03 19:22:55 +09:00
2025-12-03 21:32:14 +09:00
2025-12-03 21:12:37 +09:00
2025-12-03 22:03:16 +09:00
2025-12-04 03:35:25 +09:00
2025-12-04 03:58:02 +09:00
2025-12-04 04:30:30 +09:00
2025-12-04 04:30:30 +09:00
2025-12-04 04:42:32 +09:00
2025-12-04 06:26:59 +09:00
2025-12-04 04:42:32 +09:00
2025-12-04 04:42:32 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:17:10 +09:00
2025-12-04 06:24:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 11:04:29 +09:00
2025-12-04 10:57:13 +09:00
2025-12-04 11:28:55 +09:00
2025-12-04 11:44:55 +09:00
2025-12-04 12:06:34 +09:00
2025-12-04 12:22:55 +09:00
2025-12-04 12:27:44 +09:00
2025-12-04 13:07:12 +09:00
2025-12-04 13:07:12 +09:00
2025-12-04 13:33:44 +09:00
2025-12-04 13:54:45 +09:00
2025-12-04 14:10:51 +09:00
2025-12-04 14:19:48 +09:00
2025-11-23 05:53:27 +09:00
2025-12-04 03:58:02 +09:00
2025-12-04 12:40:01 +09:00
2025-11-21 07:00:05 +09:00
2025-11-21 08:03:03 +09:00
2025-11-21 08:03:03 +09:00
2025-11-20 17:10:03 +09:00
2025-11-20 17:10:03 +09:00
2025-11-20 17:10:03 +09:00