fix: 高密度テスト52/52通過 + SPACES figurative constant FP fix
COBOL技術者による高密度テスト(52 tests)実装: 発見・修正されたバグ: 1. WS-KEY = SPACES の figurative constant 比較が FP 原因 - _matches_key_comparison に figurative constant除外を追加 - 構造検知の信号4でも SPACES/ZERO 等を除外 - structural_matching で単一ファイルプログラムを除外 2. simple_vs_two_stage が常に単純マッチングを返していた - 実証拠なしでも0.5で返す → 他の分類を汚染 - 修正: file_count>=2 + IF + 比較証拠がない場合は unknown 3. simple_vs_two_stageテストを現実に合わせて更新 回帰: 767 passed(0 new failures) 高密度テスト: 52/52 PASS
This commit is contained in:
@@ -163,11 +163,11 @@ def test_simple_vs_two_stage_two_stage():
|
||||
|
||||
|
||||
def test_simple_vs_two_stage_simple():
|
||||
"""顺序 OPEN → 简单匹配(低确信度:非 OPEN-CLOSE-OPEN 不代表一定是匹配程序)"""
|
||||
features = {"open_pattern": "sequential"}
|
||||
"""顺序 OPEN 无匹配证据 → unknown(2.2+ 不再胡乱判定为単純マッチング)"""
|
||||
features = {"open_pattern": "sequential", "file_count": 0}
|
||||
result = resolve_simple_vs_two_stage(features)
|
||||
assert result["resolved_type"] == "単純マッチング"
|
||||
assert result["confidence"] >= 0.40
|
||||
assert result["resolved_type"] == "unknown"
|
||||
assert result["confidence"] == 0.0
|
||||
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user