[T-016] 冻结并实现 Sense Outbox 到 Bell 全局审计幂等 relay #55

Closed
opened 2026-08-10 23:58:38 +08:00 by ila · 2 comments
Owner

任务映射

  • task_id: T-016
  • task_file: docs/tasks/T-016.md
  • deps: T-015
  • context_ref: aca22f4667f0da77a102eb7ba15a93c0128df656
  • claim_branch: claims/T-016
  • work_branch: agent/codex/T-016
  • claimed_by: codex
  • write_paths:
    • docs/tasks/T-016.md
    • docs/contracts/README.md
    • docs/contracts/sense-audit-relay-v1.openapi.json
    • Sense/cmd/sense-api/main.go
    • Sense/internal/config/config.go
    • Sense/internal/config/config_test.go
    • Sense/internal/auditrelay/
    • Sense/internal/store/audit_relay_postgres.go
    • Sense/internal/store/audit_relay_postgres_test.go
    • Sense/README.md
    • Bell/cmd/bell-api/
    • Bell/internal/audit/
    • Bell/internal/store/audit_postgres.go
    • Bell/internal/store/audit_postgres_test.go
    • Bell/README.md
    • deploy/postgres/014_audit_relay.sql
    • deploy/postgres/015_privileges_audit_relay.sql
    • deploy/postgres/tests/assertions.sql
    • deploy/postgres/README.md
    • scripts/test_postgres.ps1
    • tests/test_sense_audit_relay_contract.py
    • tests/test_postgres_contract.py
    • docs/00-ai-start-here.md
    • docs/03-tech-stack.md
    • docs/04-architecture.md
    • docs/06-tasks.md
    • docs/api.md
    • docs/current-state.md

目标

冻结并实现 Sense 设备操作 Outbox 到 Bell 全局审计的批量 HTTP/HMAC、nonce 幂等、数据库 lease/fencing、逐项确认与最小权限存储。

Brain 事件 transport、规则、Alert 和公共审计 UI/API 不在本任务内。

## 任务映射 - task_id: `T-016` - task_file: `docs/tasks/T-016.md` - deps: `T-015` - context_ref: `aca22f4667f0da77a102eb7ba15a93c0128df656` - claim_branch: `claims/T-016` - work_branch: `agent/codex/T-016` - claimed_by: `codex` - write_paths: - `docs/tasks/T-016.md` - `docs/contracts/README.md` - `docs/contracts/sense-audit-relay-v1.openapi.json` - `Sense/cmd/sense-api/main.go` - `Sense/internal/config/config.go` - `Sense/internal/config/config_test.go` - `Sense/internal/auditrelay/` - `Sense/internal/store/audit_relay_postgres.go` - `Sense/internal/store/audit_relay_postgres_test.go` - `Sense/README.md` - `Bell/cmd/bell-api/` - `Bell/internal/audit/` - `Bell/internal/store/audit_postgres.go` - `Bell/internal/store/audit_postgres_test.go` - `Bell/README.md` - `deploy/postgres/014_audit_relay.sql` - `deploy/postgres/015_privileges_audit_relay.sql` - `deploy/postgres/tests/assertions.sql` - `deploy/postgres/README.md` - `scripts/test_postgres.ps1` - `tests/test_sense_audit_relay_contract.py` - `tests/test_postgres_contract.py` - `docs/00-ai-start-here.md` - `docs/03-tech-stack.md` - `docs/04-architecture.md` - `docs/06-tasks.md` - `docs/api.md` - `docs/current-state.md` ## 目标 冻结并实现 Sense 设备操作 Outbox 到 Bell 全局审计的批量 HTTP/HMAC、nonce 幂等、数据库 lease/fencing、逐项确认与最小权限存储。 Brain 事件 transport、规则、Alert 和公共审计 UI/API 不在本任务内。
ila added the kind/task label 2026-08-10 23:58:38 +08:00
ila added the
type
code
status
todo
priority
p0
labels 2026-08-10 23:59:40 +08:00
ila self-assigned this 2026-08-11 00:00:13 +08:00
ila added
status
doing
and removed
status
todo
labels 2026-08-11 00:00:17 +08:00
Author
Owner

CLAIM
task: T-016
claimed_by: codex
allocated_by: ila
context_ref: aca22f4667
claim_branch: claims/T-016
work_branch: agent/codex/T-016
write_paths:

  • docs/tasks/T-016.md
  • docs/contracts/README.md
  • docs/contracts/sense-audit-relay-v1.openapi.json
  • Sense/cmd/sense-api/main.go
  • Sense/internal/config/config.go
  • Sense/internal/config/config_test.go
  • Sense/internal/auditrelay/
  • Sense/internal/store/audit_relay_postgres.go
  • Sense/internal/store/audit_relay_postgres_test.go
  • Sense/README.md
  • Bell/cmd/bell-api/
  • Bell/internal/audit/
  • Bell/internal/store/audit_postgres.go
  • Bell/internal/store/audit_postgres_test.go
  • Bell/README.md
  • deploy/postgres/014_audit_relay.sql
  • deploy/postgres/015_privileges_audit_relay.sql
  • deploy/postgres/tests/assertions.sql
  • deploy/postgres/README.md
  • scripts/test_postgres.ps1
  • tests/test_sense_audit_relay_contract.py
  • tests/test_postgres_contract.py
  • docs/00-ai-start-here.md
  • docs/03-tech-stack.md
  • docs/04-architecture.md
  • docs/06-tasks.md
  • docs/api.md
  • docs/current-state.md
    claimed_at: 2026-08-10T16:00:11.451Z
    lease_until: 2026-08-11T16:00:11.451Z
CLAIM task: T-016 claimed_by: codex allocated_by: ila 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 - docs/contracts/sense-audit-relay-v1.openapi.json - Sense/cmd/sense-api/main.go - Sense/internal/config/config.go - Sense/internal/config/config_test.go - Sense/internal/auditrelay/ - Sense/internal/store/audit_relay_postgres.go - Sense/internal/store/audit_relay_postgres_test.go - Sense/README.md - Bell/cmd/bell-api/ - Bell/internal/audit/ - Bell/internal/store/audit_postgres.go - Bell/internal/store/audit_postgres_test.go - Bell/README.md - deploy/postgres/014_audit_relay.sql - deploy/postgres/015_privileges_audit_relay.sql - deploy/postgres/tests/assertions.sql - deploy/postgres/README.md - scripts/test_postgres.ps1 - tests/test_sense_audit_relay_contract.py - tests/test_postgres_contract.py - docs/00-ai-start-here.md - docs/03-tech-stack.md - docs/04-architecture.md - docs/06-tasks.md - docs/api.md - docs/current-state.md claimed_at: 2026-08-10T16:00:11.451Z lease_until: 2026-08-11T16:00:11.451Z
ila added
status
review
and removed
status
doing
labels 2026-08-11 00:25:23 +08:00
Author
Owner

READY FOR REVIEW

PR: #57
commit: 4be2386421401e82db546c435ba6ab4b46588a79

验证证据:

  • ./init.ps1 通过
  • Python 68 tests 通过
  • Sense/Bell test、vet、build 通过
  • PostgreSQL 17.10 隔离集群 001~015 双重重放、两端 repository/权限/不可变性通过,临时资源已清理且 5432 未改变
  • git diff --check 通过

边界:未实现 Brain transport、规则/Alert、公共管理 API/JWT、客户网络/TLS 部署验收。

READY FOR REVIEW PR: #57 commit: `4be2386421401e82db546c435ba6ab4b46588a79` 验证证据: - `./init.ps1` 通过 - Python 68 tests 通过 - Sense/Bell test、vet、build 通过 - PostgreSQL 17.10 隔离集群 001~015 双重重放、两端 repository/权限/不可变性通过,临时资源已清理且 5432 未改变 - `git diff --check` 通过 边界:未实现 Brain transport、规则/Alert、公共管理 API/JWT、客户网络/TLS 部署验收。
ila closed this issue 2026-08-11 00:26:09 +08:00
ila added
status
done
and removed
status
review
labels 2026-08-11 00:26:28 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: opc/yovision#55