[T-010] 建立 Area 准入投影与设备操作审计 Outbox 基础 #37

Merged
ila merged 2 commits from agent/codex/T-010 into main 2026-08-07 18:24:47 +08:00
Owner

Closes #35

Coordination

  • task_file: docs/tasks/T-010.md
  • context_ref: 0b40cf16c3e72f4670c33a497e7d533d663ba135
  • claim_branch: claims/T-010
  • work_branch: agent/codex/T-010
  • write_paths:
    • docs/tasks/T-010.md
    • docs/contracts/
    • deploy/postgres/
    • scripts/test_postgres.ps1
    • Sense/internal/device/
    • Sense/internal/store/
    • Sense/README.md
    • docs/04-architecture.md
    • docs/06-tasks.md
    • docs/api.md
    • docs/current-state.md
    • tests/test_postgres_contract.py
    • tests/test_area_audit_contract.py

Summary

  • 增量增加 Bell Area/capture_policy 源表、六列只读视图、单调版本和 Sense 最小权限。
  • PostgreSQL repository 在成像设备创建/启用时执行 tenant/Site/Area 准入,并记录投影版本。
  • 设备创建及期望态受理与脱敏 sense.device_operation_outbox 同事务;失败回滚业务写入。
  • SQLite 保持 M1 实验室路径,不宣称生产 Area/Outbox 语义。

验证证据

  • ./init.ps1
  • ./scripts/test_postgres.ps1 -PgRoot D:\pgsql17(18 个 TestPostgres* 通过,临时集群已清理)
  • python scripts/validate_agent_context.py
  • python -m unittest discover -s tests -p "test_*.py"(40 项通过)
  • python scripts/validate_harness_governance.py
  • go -C Sense test ./...
  • go -C Sense vet ./...
  • go -C Sense build ./...
  • git diff --check

Risks / boundaries

  • 未实现 Sense HTTP handler、认证、幂等/ETag/cursor、批量 operation 或 Bell Area 管理服务。
  • Outbox relay 的 transport、签名、确认、重放窗口与留存仍待独立契约。
  • 自动测试未读取或修改现有 D:\pgsql17\data 和 5432 服务。
Closes #35 ## Coordination - task_file: `docs/tasks/T-010.md` - context_ref: `0b40cf16c3e72f4670c33a497e7d533d663ba135` - claim_branch: `claims/T-010` - work_branch: `agent/codex/T-010` - write_paths: - `docs/tasks/T-010.md` - `docs/contracts/` - `deploy/postgres/` - `scripts/test_postgres.ps1` - `Sense/internal/device/` - `Sense/internal/store/` - `Sense/README.md` - `docs/04-architecture.md` - `docs/06-tasks.md` - `docs/api.md` - `docs/current-state.md` - `tests/test_postgres_contract.py` - `tests/test_area_audit_contract.py` ## Summary - 增量增加 Bell Area/`capture_policy` 源表、六列只读视图、单调版本和 Sense 最小权限。 - PostgreSQL repository 在成像设备创建/启用时执行 tenant/Site/Area 准入,并记录投影版本。 - 设备创建及期望态受理与脱敏 `sense.device_operation_outbox` 同事务;失败回滚业务写入。 - SQLite 保持 M1 实验室路径,不宣称生产 Area/Outbox 语义。 ## 验证证据 - `./init.ps1` - `./scripts/test_postgres.ps1 -PgRoot D:\pgsql17`(18 个 `TestPostgres*` 通过,临时集群已清理) - `python scripts/validate_agent_context.py` - `python -m unittest discover -s tests -p "test_*.py"`(40 项通过) - `python scripts/validate_harness_governance.py` - `go -C Sense test ./...` - `go -C Sense vet ./...` - `go -C Sense build ./...` - `git diff --check` ## Risks / boundaries - 未实现 Sense HTTP handler、认证、幂等/ETag/cursor、批量 operation 或 Bell Area 管理服务。 - Outbox relay 的 transport、签名、确认、重放窗口与留存仍待独立契约。 - 自动测试未读取或修改现有 `D:\pgsql17\data` 和 5432 服务。
ila added 2 commits 2026-08-07 18:23:47 +08:00
chore(task): claim T-010
Harness governance / validate (push) Has been cancelled
8abff0a566
feat(store): add Area admission and audit outbox [T-010]
Harness governance / validate (push) Has been cancelled
Harness governance / validate (pull_request) Has been cancelled
36786723e3
ila merged commit 31ac2c40ac into main 2026-08-07 18:24:47 +08:00
Sign in to join this conversation.