fix(governance): enforce P2-105 redaction guard
This commit is contained in:
@@ -112,6 +112,16 @@ def test_rejects_candidate_route_write(tmp_path):
|
||||
load_latest_ai_agent_critic_reviewer_result_capture(tmp_path)
|
||||
|
||||
|
||||
def test_rejects_forbidden_display_terms(tmp_path):
|
||||
data = load_latest_ai_agent_critic_reviewer_result_capture()
|
||||
bad = copy.deepcopy(data)
|
||||
bad["agent_scorecards"][0]["failure_if_missing"] = "不得顯示工作視窗對話內容"
|
||||
_write_snapshot(tmp_path, bad)
|
||||
|
||||
with pytest.raises(ValueError, match="forbidden display terms"):
|
||||
load_latest_ai_agent_critic_reviewer_result_capture(tmp_path)
|
||||
|
||||
|
||||
def test_rejects_rollup_mismatch(tmp_path):
|
||||
data = load_latest_ai_agent_critic_reviewer_result_capture()
|
||||
bad = copy.deepcopy(data)
|
||||
|
||||
Reference in New Issue
Block a user