feat(risk): 申请单阶段风险可见性细化与规则表更新

- 申请单阶段将 policy/trip/amount 类风险对申请人可见、可自行修正,画像/审批流程类仍走领导可见
- 平台风险标记与语义推断统一采用该策略,更新对应单元测试
- 风险规则中 city_mismatch 等城市匹配规则移除 expense_application 阶段,仅保留 reimbursement
- 同步更新交通/通信/差旅/出差等财务规则表
This commit is contained in:
caoxiaozhu
2026-06-20 10:17:18 +08:00
parent 4d04f4e7af
commit 3d69f8501f
21 changed files with 23 additions and 50 deletions

View File

@@ -308,8 +308,9 @@ def test_platform_risk_rules_are_filtered_by_business_stage_and_category(
]
assert application_review["flags"][0]["message"] == "申请环节规则命中"
assert application_review["flags"][0]["business_stage"] == "expense_application"
assert application_review["flags"][0]["visibility_scope"] == "leader"
assert application_review["flags"][0]["actionability"] == "review_decision"
# 申请单阶段信息完整性policy 域)风险对申请人可见,便于申请时知晓并修正
assert application_review["flags"][0]["visibility_scope"] == "submitter"
assert application_review["flags"][0]["actionability"] == "fixable_by_submitter"
assert [flag["rule_code"] for flag in reimbursement_review["flags"]] == [
"reimbursement.stage.rule"
]
@@ -354,7 +355,8 @@ def test_expense_application_pre_review_runs_stage_rules(tmp_path, monkeypatch)
assert rule_flags[0]["message"] == "申请预审规则命中"
assert rule_flags[0]["business_stage"] == "expense_application"
assert rule_flags[0]["risk_domain"] == "policy"
assert rule_flags[0]["visibility_scope"] == "leader"
# 申请单阶段信息完整性风险对申请人可见
assert rule_flags[0]["visibility_scope"] == "submitter"
ai_pre_review = [
flag
for flag in reviewed.risk_flags_json