接入 DSH 专用运行时和对话界面,保留模型原始回答,支持会话分页、连续追问与显式报告。 补齐组合筛选、各维度 Top100、分组查询到排名图的转换,图表故障静默省略并基于保存数据自动恢复。 优化报告风格、图表顺序和表格换行,更新接入说明及构建输入。 验证:独立目录前后端构建通过;118 项 Java、102 项前端、102 项图表、14 项 DSH 应用和 13 项组合筛选检查通过。 仅提交相关源码、锁定依赖与测试;不包含凭据、会话、业务数据或本地产物。
24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
"""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()
|