diff --git a/docs/plans/2026-06-02-scadabridge-audit-rearch.md b/docs/plans/2026-06-02-scadabridge-audit-rearch.md index e54993e..a71aecb 100644 --- a/docs/plans/2026-06-02-scadabridge-audit-rearch.md +++ b/docs/plans/2026-06-02-scadabridge-audit-rearch.md @@ -69,5 +69,6 @@ Delivery: `feat/adopt-zb-audit` (stacked on auth), local-only. Each stage = one - **✅ C1 DONE** `3d77dc0` (code ✅) — `AuditDetails` + deterministic `AuditDetailsCodec` (pinned byte-exact) + `AuditOutcomeProjector` + `AuditFieldBuilders` + Commons→`ZB.MOM.WW.Audit` ref; 56 tests. - **✅ C2 DONE** `adfb4d3` + fix `5aaf9e2` (spec ✅, code ✅ after fix) — `ScadaBridgeAuditRedactor`/`SafeDefaultAuditRedactor : IAuditRedactor` on the canonical record; redaction primitives extracted into shared `AuditRedactionPrimitives`/`AuditRegexCache` (old filter delegates, behaviour-preserved); cap-selection reads `d.Status` (faithful to legacy `IsErrorStatus`); fast-path + never-throws; review-fix hardened `OverRedact` to scrub ALL free-text fields + marker alignment + outer-catch never-leak test. 61 redaction + 44 payload + 88 commons-audit green. - **✅ C3 DONE** `db707bb` + fix `c27b2c3` (spec ✅, code ✅; independently re-verified build 0/0 + AuditLog 241/Communication 201). Atomic record swap across all seams/emitters/gRPC DTO/redactor-wiring (127 files); `ScadaBridgeAuditEventFactory` single emit point; `AuditRowProjection` Decompose/Recompose transitional 24-col shim (lossless round-trip verified); proto unchanged; old `IAuditPayloadFilter` classes deleted (C7 pulled forward). Fix: safe enum-parse fallback in `MapRow`+`FromDto`. -- **⏳ C4 IN PROGRESS** — site SQLite → `audit_event` (canonical) + `audit_forward_state` sidecar; forwarding on the sidecar; `IsCachedKind` drain split. -- ⏳ C5/C6/C7 pending. +- **✅ C4 DONE** `946d3e2` + fix `1737d15` (spec ✅, code ✅; independently re-verified diff scope = writer+tests only, build 0/0, AuditLog 249/1-preexisting). Site SQLite → `audit_event` (canonical) + `audit_forward_state` sidecar; forwarding marks/reads on the sidecar via JOIN; `IsCachedKind`={CachedSubmit,ApiCallCached,DbWriteCached,CachedResolve} precomputed drain split; old `AuditLog` table dropped (ephemeral reset). Fix: `PRAGMA foreign_keys=ON` + `MarkForwarded` no-demote guard. +- **⏳ C5 IN PROGRESS** — central SQL Server collapse to 10 canonical cols + persisted computed cols (for indexed queryability) via new-table-and-copy migration; retire C3 central shim. (Partition/SWITCH path is MSSQL-gated — not fully exercisable locally.) +- ⏳ C6/C7 pending.