refactor: share INFRA stop-reason set from core.evolution
This commit is contained in:
@@ -199,6 +199,15 @@ def _make_all_infra_mock(log: HarnessLog, stop_reason: str):
|
||||
return mock_fn, call_log
|
||||
|
||||
|
||||
def test_infra_stop_reasons_single_source() -> None:
|
||||
"""app 侧 INFRA_STOP_REASONS 复用 core 常量(同一对象),杜绝未来漂移(M-2)。"""
|
||||
from app.harness import validate
|
||||
from core.evolution import diagnose
|
||||
|
||||
assert validate.INFRA_STOP_REASONS is diagnose.INFRA_STOP_REASONS
|
||||
assert frozenset({"error", "parse_error"}) == diagnose.INFRA_STOP_REASONS
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# 数据类型测试
|
||||
# ===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user