"""Core safety requirements that must remain in the DSH planning contract.""" import sys import unittest from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts')) from nao_native_planning import NATIVE_ROOT_PROMPT, STATIC_NODE_CONTRACT class NativePlanningContractTests(unittest.TestCase): def test_ambiguous_catalog_prefix_requires_a_user_choice(self): self.assertIn('边界前缀对应多个候选时必须needsClarification=true', NATIVE_ROOT_PROMPT) self.assertIn('清除该产品filter', NATIVE_ROOT_PROMPT) self.assertIn('不能把前缀直接传为产品筛选值', NATIVE_ROOT_PROMPT) def test_source_receipts_do_not_substitute_for_formal_metric_reconciliation(self): self.assertIn('两者都不提供正式指标或正式缺陷分类', STATIC_NODE_CONTRACT) self.assertIn('还必须规划能返回对应正式值的metrics节点和/或正式defects节点', STATIC_NODE_CONTRACT) self.assertIn('不得用“原件核验通过”或“记录已读全”的回执代替对账结果', STATIC_NODE_CONTRACT) if __name__ == '__main__': unittest.main()