[T-012] 补齐 Sense 对账安全闸、孤儿受控处置与多实例可观测性 #43

Closed
opened 2026-08-07 22:25:19 +08:00 by ila · 1 comment
Owner

任务映射

  • task_id: T-012
  • task_file: docs/tasks/T-012.md
  • context_ref: 领取时回填
  • deps: T-011
  • write_paths: 以任务文件 frontmatter 为准,覆盖 Sense 调和/孤儿/指标、PostgreSQL migration、测试和同步文档。

问题与方案

T-011 后的 PostgreSQL 多实例会重复读取 due row,且当前没有可证明的 MediaMTX Path 所有权、孤儿报告或比例安全闸。实施方案见 docs/tasks/T-012.md:短租约 fencing、历史归属、默认只读扫描、15 分钟二次确认、10% 不可绕过安全闸与低基数指标。

验收入口

  • ./init.ps1
  • ./scripts/test_postgres.ps1 -PgRoot D:\pgsql17
  • go test -race ./internal/metrics ./internal/mtx ./internal/orphan ./internal/reconcile ./internal/store

协作状态

  • expected_claim_branch: claims/T-012
  • work_branch: 领取后填写
  • claimed_by: 领取后填写
  • lease_until: 领取后填写
## 任务映射 - task_id: `T-012` - task_file: `docs/tasks/T-012.md` - context_ref: `领取时回填` - deps: `T-011` - write_paths: 以任务文件 frontmatter 为准,覆盖 Sense 调和/孤儿/指标、PostgreSQL migration、测试和同步文档。 ## 问题与方案 T-011 后的 PostgreSQL 多实例会重复读取 due row,且当前没有可证明的 MediaMTX Path 所有权、孤儿报告或比例安全闸。实施方案见 `docs/tasks/T-012.md`:短租约 fencing、历史归属、默认只读扫描、15 分钟二次确认、10% 不可绕过安全闸与低基数指标。 ## 验收入口 - `./init.ps1` - `./scripts/test_postgres.ps1 -PgRoot D:\pgsql17` - `go test -race ./internal/metrics ./internal/mtx ./internal/orphan ./internal/reconcile ./internal/store` ## 协作状态 - expected_claim_branch: `claims/T-012` - work_branch: `领取后填写` - claimed_by: `领取后填写` - lease_until: `领取后填写`
ila added the kind/task label 2026-08-07 22:25:19 +08:00
ila added the
priority
p0
status
todo
type
code
labels 2026-08-07 22:26:09 +08:00
Author
Owner

CLAIM
task: T-012
claimed_by: codex
allocated_by: ila
context_ref: 25357723a0
claim_branch: claims/T-012
work_branch: agent/codex/T-012
write_paths:

  • docs/tasks/T-012.md
  • Sense/README.md
  • Sense/cmd/sense-api/
  • Sense/cmd/sense-orphan/
  • Sense/internal/config/
  • Sense/internal/metrics/
  • Sense/internal/mtx/
  • Sense/internal/orphan/
  • Sense/internal/reconcile/
  • Sense/internal/store/
  • deploy/postgres/
  • scripts/test_postgres.ps1
  • 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
  • docs/runbooks/
  • tests/test_postgres_contract.py
  • tests/test_sense_reconcile_safety.py
    claimed_at: 2026-08-07T14:27:38.0643018+00:00
    lease_until: 2026-08-08T14:27:38.0643018+00:00
CLAIM task: T-012 claimed_by: codex allocated_by: ila context_ref: 25357723a09218bae58626a9934309abcda34899 claim_branch: claims/T-012 work_branch: agent/codex/T-012 write_paths: - docs/tasks/T-012.md - Sense/README.md - Sense/cmd/sense-api/ - Sense/cmd/sense-orphan/ - Sense/internal/config/ - Sense/internal/metrics/ - Sense/internal/mtx/ - Sense/internal/orphan/ - Sense/internal/reconcile/ - Sense/internal/store/ - deploy/postgres/ - scripts/test_postgres.ps1 - 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 - docs/runbooks/ - tests/test_postgres_contract.py - tests/test_sense_reconcile_safety.py claimed_at: 2026-08-07T14:27:38.0643018+00:00 lease_until: 2026-08-08T14:27:38.0643018+00:00
ila self-assigned this 2026-08-07 22:27:39 +08:00
ila added
status
doing
and removed
status
todo
labels 2026-08-07 22:27:41 +08:00
ila added
status
review
and removed
status
doing
labels 2026-08-07 23:00:41 +08:00
ila closed this issue 2026-08-07 23:01:20 +08:00
ila added
status
done
and removed
status
review
labels 2026-08-07 23:01:29 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: opc/yovision#43