--- id: enhance-detections-table name: Add Resolution Tracking and Dedup to Detections status: completed depends_on: [] scope: narrow risk: low impact: isolated level: implementation --- ## Description W21: The `detections` table has no resolution tracking (resolved/acknowledged/false-positive), no deduplication (persistent `MODEL_DEGRADATION` creates new row every check interval), no session end correlation, and `anomalyType` value set is unclear. Add `resolvedAt` timestamp column. Add a UNIQUE constraint on `(sessionId, anomalyType)` with upsert semantics, or document that deduplication is handled at the application level. Specify whether `anomalyType` is extensible. ## Acceptance Criteria - [ ] `coordination.md` detections table includes nullable `resolvedAt` column - [ ] Deduplication strategy documented: UNIQUE on `(sessionId, anomalyType)` with upsert, OR application-level dedup with rationale - [ ] `anomalyType` documented as extensible or closed enum with initial values - [ ] Relationship to session end noted (auto-resolve on session close?) ## References - docs/reviews/storage-architecture-review-2026-04-21.md#W21 - docs/architecture/storage/coordination.md:29-39 ## Notes > To be filled by implementation agent ## Summary > To be filled on completion