From 637efa818b28c7d041d8799f4ecfbb78a82f4905 Mon Sep 17 00:00:00 2001 From: ila <2+ila@noreply.git.ilapage.cn> Date: Fri, 28 Aug 2026 17:19:17 +0800 Subject: [PATCH] docs: record Sense reliable outbox (#78) --- Business-Rules-and-Glossary.-.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Business-Rules-and-Glossary.-.md b/Business-Rules-and-Glossary.-.md index bd8cfb3..f76b5e8 100644 --- a/Business-Rules-and-Glossary.-.md +++ b/Business-Rules-and-Glossary.-.md @@ -202,3 +202,15 @@ - 跨分片迁移预检是只读操作,只检查源状态、全部受影响路径和候选目标容量;即使预检通过也不授予执行权限。实际迁移必须另建高风险工单并取得人工确认。 - 额外分片只能配置为 external,Control API 必须使用无用户信息、无查询参数、无路径的本机回环 HTTP 地址。Sense 不停止外部实例。 + + +## Sense 内部 Outbox 业务规则 + +- 领域记录与 outbox 必须在同一 PostgreSQL 事务中提交;任一写入失败时两者一起回滚。 +- 幂等键在消息表唯一,成功后还保留永久投递收据;重试和人工恢复沿用原业务记录与幂等键。 +- worker 只能领取到期的 pending/retry 或租约已过期的 processing 记录;同一记录不能被两个 worker 同时成功领取。 +- 失败保留脱敏错误与尝试历史,按退避等待;达到最大次数进入 dead。人工重新排队必须填写原因并记录操作者,不删除历史。 +- implementation_operator、site_admin、viewer 可查看;只有 implementation_operator、site_admin 可重新排队。 +- 未配置外部 connector 时保留内部记录且不阻断 Sense 核心功能。测试 sink 在 prod/production 模式禁止启用。 +- 管理 API 不返回内部 payload、外部凭据或机器身份;Brain/Bell 正式协议属于后续协调工单。 +