Commit Graph

2 Commits

Author SHA1 Message Date
OG T
0afaea63f8 fix(api): Phase 16 R4 測試修復 - ParsedOperation 向後兼容
問題:
- test_action_parsing.py 導入路徑未更新 (舊: approvals.py)
- ParsedOperation dataclass 不支援 tuple 解包

修復:
- 更新測試導入至 src.services.operation_parser
- 新增 ParsedOperation.__iter__() 支援 tuple 解包

測試: 24/24 passed (100%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 23:00:03 +08:00
OG T
31cf2ddbe7 feat(api): Phase 16 R4.1 抽取 OperationParser 模組
Strangler Fig Pattern: 從 approvals.py 抽取操作解析邏輯

新增:
- src/services/operation_parser.py
- ParsedOperation dataclass
- 支援中英文指令解析 (kubectl/自然語言)

瘦身 approvals.py: 移除 117 行內嵌邏輯

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 21:52:27 +08:00