fix(governance): 收斂前端 redaction 語彙
This commit is contained in:
@@ -220,10 +220,10 @@ def _require_frontend_redaction_contract(payload: dict[str, Any], label: str) ->
|
||||
|
||||
forbidden = set(contract.get("forbidden_frontend_content") or [])
|
||||
required_forbidden = {
|
||||
"內部對話內容",
|
||||
"Codex / 使用者訊息逐字稿",
|
||||
"提示詞 / 思考鏈",
|
||||
"工作階段識別碼 / 瀏覽器脈絡",
|
||||
"未核准內部內容",
|
||||
"未脫敏操作紀錄",
|
||||
"未核准決策細節",
|
||||
"工作階段脈絡",
|
||||
"機密 / 權杖 / 授權標頭",
|
||||
}
|
||||
if not required_forbidden.issubset(forbidden):
|
||||
|
||||
@@ -180,10 +180,10 @@ def _snapshot(
|
||||
"conversation_transcript_display_allowed": False,
|
||||
"redaction_required": True,
|
||||
"forbidden_frontend_content": [
|
||||
"內部對話內容",
|
||||
"Codex / 使用者訊息逐字稿",
|
||||
"提示詞 / 思考鏈",
|
||||
"工作階段識別碼 / 瀏覽器脈絡",
|
||||
"未核准內部內容",
|
||||
"未脫敏操作紀錄",
|
||||
"未核准決策細節",
|
||||
"工作階段脈絡",
|
||||
"機密 / 權杖 / 授權標頭",
|
||||
],
|
||||
"allowed_frontend_fields": ["已提交證據參照", "政策規則摘要"],
|
||||
|
||||
@@ -42,7 +42,7 @@ def test_service_health_failure_notification_policy_endpoint_returns_committed_s
|
||||
assert "work_window_transcript" in data["message_template_contract"]["forbidden_fields"]
|
||||
assert data["display_redaction_contract"]["conversation_transcript_display_allowed"] is False
|
||||
assert data["display_redaction_contract"]["redaction_required"] is True
|
||||
assert "內部對話內容" in data["display_redaction_contract"]["forbidden_frontend_content"]
|
||||
assert "未核准內部內容" in data["display_redaction_contract"]["forbidden_frontend_content"]
|
||||
assert all(
|
||||
rule["decision"] == "suppress_immediate_success"
|
||||
for rule in data["policy_rules"]
|
||||
|
||||
Reference in New Issue
Block a user