项目工作表 / 发布决策
发布门禁规则模板
本页导航
| 字段 | 值 |
|---|---|
| 版本 | v1.0 |
| 最后更新 | 2026-07 |
| 使用时机 | 发布流程设计和门禁配置时 |
| 填写角色 | 评测负责人+技术负责人 |
| 下游消费者 | 发布系统、审批流程 |
适用场景
用于将评测指标转化为发布、灰度、阻断、审批和回滚动作。
字段说明
| 字段 | 说明 |
|---|---|
| gate_id / gate_version | 门禁策略标识与版本 |
| scope | 适用范围 |
| metrics | 指标和阈值 |
| metrics[].action | 每项指标对应的 block、approval 或 observe 动作 |
| dataset | 适用数据集 |
| owner | 负责人 |
| exemption_policy | 豁免规则 |
| rollback_condition | 回滚条件 |
| gate_result_id / run_id | Gate Result 标识及其对应 Run |
| audit_log | 策略变更、审批与时间戳,不覆盖历史 Gate Result |
Gate 是版本化策略,Gate Result 是一次计算事实,发布决策再引用一个或多个 Gate Result。三者不得合并成一个可被后续修改的 status 字段。
Gate Result 必须覆盖当前 Gate 版本要求的全部指标。只要存在缺失指标、计算错误或必要证据不可用,整体结果就不能是 passed;应根据策略写为 error 或 approval_required。
Gate 策略模板
gate_id:
gate_version:
scope:
trigger:
metrics:
- metric:
threshold:
action:
risk_level:
dataset:
-
owner:
exemption_policy:
allowed:
p0_allowed: false
conditions:
approver:
required_record:
rollback_condition:
-
audit_log:
policy_change_id:
changed_by:
changed_at:
Gate Result 模板
gate_result_id:
gate_id:
gate_version:
run_id:
completeness:
required_metric_count:
evaluated_metric_count:
missing_metrics: []
metric_results:
- metric:
value:
threshold:
action:
outcome: passed | blocked | approval_required | error
outcome: passed | blocked | approval_required | error
evidence_links:
evaluated_at:
填写示例
以下阈值、版本和线上回滚比例仅用于演示字段填写,不代表通用标准或真实运行结果。
gate_id: refund_agent_p0_safety_gate
gate_version: v5
scope: 客服 Agent 退款与订单场景
trigger: 发布前全量评测
metrics:
- metric: unauthorized_tool_call_event_count
threshold: 0
action: block
risk_level: P0
- metric: refund_policy_high_risk_error
threshold: 0
action: block
risk_level: P1
- metric: cost_per_session
threshold: <= budget_v3
action: approval
risk_level: P2
dataset:
- red_team_privacy_v4
- refund_regression_v8
owner: release_quality_owner
exemption_policy:
allowed: non_p0_only
p0_allowed: false
conditions: 仅适用于制度允许的非 P0 异常,并设置期限和补偿措施
approver: ai_quality_lead
required_record: risk_reason_owner_deadline
rollback_condition:
- 线上出现隐私泄露
- 退款投诉率超过基线 20%
audit_log:
policy_change_id: change_gate_20260708_01
changed_by: ai_quality_lead
changed_at: 2026-07-08T08:00:00Z
对应的 Gate Result 是另一条不可变记录:
gate_result_id: gate_result_refund_20260708_001
gate_id: refund_agent_p0_safety_gate
gate_version: v5
run_id: run_refund_release_20260708_001
completeness:
required_metric_count: 3
evaluated_metric_count: 3
missing_metrics: []
metric_results:
- metric: unauthorized_tool_call_event_count
value: 0
threshold: 0
action: block
outcome: passed
- metric: refund_policy_high_risk_error
value: 0
threshold: 0
action: block
outcome: passed
- metric: cost_per_session
value: 0.084
threshold: budget_v3
action: approval
outcome: passed
outcome: passed
evidence_links:
- artifact://run_refund_release_20260708_001/metric-results
evaluated_at: 2026-07-08T10:00:00Z
常见误区
| 误区 | 修正方式 |
|---|---|
| 所有指标都只观察 | P0 红线和按项目制度定义的 P1 风险设置独立门禁 |
| 门禁过多阻塞迭代 | 区分硬门禁、软门禁和观察指标 |
| 豁免没有留痕 | 记录原因、Owner、期限和补救动作 |
| 回滚条件临时决定 | 发布前定义回滚条件 |
| 部分指标未计算却整体通过 | 缺失指标时返回 error 或 approval_required,不得返回 passed |