[T-009] 建立 PostgreSQL 双 Schema 与 Bell 配额投影基础 #33

Merged
ila merged 2 commits from agent/codex/T-009 into main 2026-08-07 17:54:46 +08:00
Owner

Closes #31

Coordination

  • task_file: docs/tasks/T-009.md
  • context_ref: 8a4514076e9921b12bc26380b2aceee9334e947d
  • claim_branch: claims/T-009
  • work_branch: agent/codex/T-009
  • write_paths:
    • docs/tasks/T-009.md
    • deploy/postgres/
    • scripts/test_postgres.ps1
    • Sense/internal/store/
    • Sense/internal/config/
    • Sense/cmd/sense-api/main.go
    • Sense/go.mod
    • Sense/go.sum
    • Sense/README.md
    • docs/03-tech-stack.md
    • docs/04-architecture.md
    • docs/06-tasks.md
    • docs/api.md
    • docs/current-state.md
    • tests/test_postgres_contract.py

Summary

  • 使用本机 D:\pgsql17 的 PostgreSQL 17.10 二进制建立可重放的 Bell/Sense 双 Schema migration 与最小权限边界。
  • 增加 pgx PostgreSQL repository、配额投影版本检查和事务级 advisory lock,默认 SQLite 路径保持不变。
  • 增加隔离临时集群测试;不读取或修改现有 D:\pgsql17\data 与 5432 服务。

Validation

  • ./init.ps1
  • ./scripts/test_postgres.ps1 -PgRoot D:\pgsql17
  • python scripts/validate_agent_context.py
  • python -m unittest discover -s tests -p "test_*.py"(33 项通过)
  • python scripts/validate_harness_governance.py
  • go -C Sense test ./...
  • go -C Sense vet ./...
  • go -C Sense build ./...
  • git diff --check

Risks

  • 本任务只建立数据库基础,不包含 Sense HTTP handler、认证或 Bell 管理服务。
  • 共享/生产实例仍需管理员提供专用数据库、登录角色、秘密和备份方案。
Closes #31 ## Coordination - task_file: `docs/tasks/T-009.md` - context_ref: `8a4514076e9921b12bc26380b2aceee9334e947d` - claim_branch: `claims/T-009` - work_branch: `agent/codex/T-009` - write_paths: - `docs/tasks/T-009.md` - `deploy/postgres/` - `scripts/test_postgres.ps1` - `Sense/internal/store/` - `Sense/internal/config/` - `Sense/cmd/sense-api/main.go` - `Sense/go.mod` - `Sense/go.sum` - `Sense/README.md` - `docs/03-tech-stack.md` - `docs/04-architecture.md` - `docs/06-tasks.md` - `docs/api.md` - `docs/current-state.md` - `tests/test_postgres_contract.py` ## Summary - 使用本机 `D:\pgsql17` 的 PostgreSQL 17.10 二进制建立可重放的 Bell/Sense 双 Schema migration 与最小权限边界。 - 增加 pgx PostgreSQL repository、配额投影版本检查和事务级 advisory lock,默认 SQLite 路径保持不变。 - 增加隔离临时集群测试;不读取或修改现有 `D:\pgsql17\data` 与 5432 服务。 ## Validation - `./init.ps1` - `./scripts/test_postgres.ps1 -PgRoot D:\pgsql17` - `python scripts/validate_agent_context.py` - `python -m unittest discover -s tests -p "test_*.py"`(33 项通过) - `python scripts/validate_harness_governance.py` - `go -C Sense test ./...` - `go -C Sense vet ./...` - `go -C Sense build ./...` - `git diff --check` ## Risks - 本任务只建立数据库基础,不包含 Sense HTTP handler、认证或 Bell 管理服务。 - 共享/生产实例仍需管理员提供专用数据库、登录角色、秘密和备份方案。
ila added 2 commits 2026-08-07 17:53:31 +08:00
chore(task): claim T-009
Harness governance / validate (push) Has been cancelled
04231d006a
feat(store): add PostgreSQL foundation [T-009]
Harness governance / validate (push) Has been cancelled
Harness governance / validate (pull_request) Has been cancelled
2ff7ff5618
ila merged commit b6a752c014 into main 2026-08-07 17:54:46 +08:00
Sign in to join this conversation.