Audit batch 6: B1 zero-gate sentinel, I1 known-to-lack marker, I2 wire error returns row status, M1 max-rounds label, M2 chosen-last convention, M5 escalate write retry, M6/M7 clear/pass CAS tests

This commit is contained in:
host committed 2026-11-04 18:02:23 +00:00
1 parent 2adc605373
commit bc19f09dff
5 files changed
+683 -26

No files matched your search

+13 -6
View File
@@ -345,6 +345,19 @@ def evaluate(state, task_id, gate_results, findings=None, fixed=None):
"regression": [], "missing_gates": [], "weakened": [],
}
# 审计批 6(M1):轮次耗尽的标签优先——max_rounds 分支
# 必须排在 gate_failed_without_finding 分支之前,否则
# 轮次耗尽 + 无 finding 时 reason 会被后者掩盖(决策同
# 为 escalate、轮次不变,只是原因标签变化;交换顺序不
# 改变任何决策,只改标签)。本支不要求 findings 非空,
# 但注意它在 pass 分支之后:无 finding、无失败门时已在
# 上面返回 pass,不会误升级。
if prev_round >= MAX_PUSHBACKS:
return _escalate(
task_id, prev_round, passed_now, new_criteria,
"max_rounds_exceeded",
regression=[f.to_dict() for f in regression])
# 有 finding 但门全过、finding 为空的矛盾态:门说通过、发现说有
# 问题,以 finding 为准(finding 是审计的直接证据)。
# 审计批 4(I-11):有失败门但无 finding 时,旧代码走到
@@ -364,12 +377,6 @@ def evaluate(state, task_id, gate_results, findings=None, fixed=None):
"gate_failed_without_finding",
regression=[f.to_dict() for f in regression])
if prev_round >= MAX_PUSHBACKS:
return _escalate(
task_id, prev_round, passed_now, new_criteria,
"max_rounds_exceeded",
regression=[f.to_dict() for f in regression])
new_round = prev_round + 1
packet = PushbackPacket(task_id, new_round, all_findings, new_criteria)
new_state = LoopState(