feat: deliver Sense audits to Bell (T-016)
Harness governance / validate (push) Has been cancelled
Harness governance / validate (pull_request) Has been cancelled

This commit is contained in:
QiuSW
2026-08-11 00:24:32 +08:00
parent aca22f4667
commit 4be2386421
35 changed files with 2188 additions and 42 deletions
+8 -4
View File
@@ -3,12 +3,12 @@ id: T-016
title: 冻结并实现 Sense Outbox 到 Bell 全局审计幂等 relay
phase: 3
deps: [T-015]
status: TODO
status: DONE
created: 2026-08-10
issue: 55
context_ref: null
claim_branch: null
work_branch: null
context_ref: aca22f4667f0da77a102eb7ba15a93c0128df656
claim_branch: claims/T-016
work_branch: agent/codex/T-016
write_paths:
- docs/tasks/T-016.md
- docs/contracts/README.md
@@ -94,3 +94,7 @@ T-015 已提供 Bell 的独立运行角色和不可变事实模式。本任务
## 执行记录
- 2026-08-10:在 T-015 合并并关闭后拆出本任务;实现尚未开始。
- 2026-08-11:冻结 `sense-audit-relay-v1.openapi.json`,实现 Sense 外部 key/HMAC client、30 秒数据库 lease/fencing worker、逐项结果/dead letter/1~300 秒退避,以及 PostgreSQL v6 Outbox relay repository;默认关闭且远端 URL 强制 HTTPS。
- 2026-08-11:实现 Bell 最小 `cmd/bell-api`、300 秒时间窗与 constant-time HMAC 校验、600 秒 nonce 幂等收据、逐项 v1/v2 校验,以及 PostgreSQL v4 不可变 `bell.audit_events`;Sense/Bell 登录权限保持单向隔离,只有 Bell 可清理过期收据。
- 2026-08-11:`./init.ps1`、三条 Python 治理命令、Sense/Bell `test/vet/build` 与 `git diff --check` 全部通过;Python 共 68 项测试通过。
- 2026-08-11:`./scripts/test_postgres.ps1 -PgRoot D:\pgsql17` 通过;PostgreSQL 17.10 临时集群将 `001`~`015` 重放两次,Sense fencing、Bell receipt/重复/冲突/不可变性和双方权限断言通过,随机端口与临时目录已清理,现有 5432 listener 未改变。