RuleArena 运行时门禁

一次退款调用经过的每一道检查,以及裁决为什么不属于门禁

RuleArena 运行时门禁 一次退款调用经过的每一道检查,以及裁决为什么不属于门禁 客服工单 · 用户诉求 · Architecture component 客服工单 用户诉求 Refund Agent · 确定性策略 · Architecture component Refund Agent 确定性策略 ToolGateway · 唯一对外通道 · Architecture component ToolGateway 唯一对外通道 RuntimeGate · 三段确定性检查 · Architecture component · 只读 RuntimeGate 三段确定性检查 只读 Commerce Sandbox · 真实 HTTP · Architecture component Commerce Sandbox 真实 HTTP PostgreSQL · 权威状态 · Architecture component PostgreSQL 权威状态 Oracle · 独立裁决 8 条不变量 · Architecture component Oracle 独立裁决 8 条不变量 写入 放行后写入 读快照 / 查回执 快照 / 回执 / 事件 Legend Backend Database Security External

三段检查,只做确定性算术

  • • retry_check:按幂等键查回执,命中就直接用,不重放
  • • pre_check:累计已退 + 本次 > 实付,拦住
  • • post_check:重读快照,确认这笔动作真的发生了
  • • 任何一段读不到权威状态:UNKNOWN,一律不当作成功

为什么裁决不属于门禁

  • • 门禁只回答「会不会超预算」「有没有生效」
  • • 「这笔钱确实多退了」必须由 Oracle 在权威状态上算出来
  • • 门禁不写业务状态,不做语义判断,不调用模型

Agent 看不见门禁

  • • Agent 包不 import 门禁任何符号,含 TYPE_CHECKING
  • • 门禁的理由码只留在网关的调用记录里
  • • Agent 只知道「这次调用没发生」或「结果不确定」