Surface DoH reconciliation proposals via audit and a persisted snapshot (D-0055) #135
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/doh-reconciliation-proposals"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Makes the propose-only output of the DoH reconciliation worker (D-0054) visible to the operator instead of only a count in the pipeline container log. Two additions (D-0055):
Audit on dry-run.
DohReconciliationWorkernow records an audit entry on any cycle with changes, in dry-run as well as applied cycles. The cycle result gainedHasChanges/ProposedAdded/ProposedRemoved/ProposedCommentUpdated, counted from the per-router add/remove/comment lists regardless of mode; the audit gate usesHasChanges, and the Summary and DetailJson distinguish dry-run from applied. Previously the append was gated on an applied-changes flag that is always zero in dry-run, so propose-only cycles produced no audit record.Persisted snapshot + API + panel. The worker persists the latest full proposal each cycle to the new single-row
doh_reconciliation_proposaltable (fixed id 1,detail_jsonholding the serializedDohReconciliationProposalwith per-router add/remove/comment-update address lists) through the newIDohReconciliationProposalStore(in-memory + Postgres). Exposed read-only atGET /api/v1/doh/proposalsand rendered in a "Latest reconciliation proposal" panel on/configuration#doh-blocklist. The snapshot is persisted because the reconciliation worker runs in the PipelineHost while the Admin UI and API run in the AdminApi, so the two processes share only Postgres.EF migration
AddDohReconciliationProposalauto-applies on the next deploy. The store follows the config-store single-row convention (FixedId=1,id = 1check constraint) but is a plain upsert: noRowVersionand no NOTIFY, since it is a most-recent-wins snapshot read on demand.How was this tested?
dotnet build- 0 errors, 0 warningsdotnet test- Application (581), AdminApi (225), and Postgres integration (89, incl. new proposal round-trip) all pass/api/v1/doh/proposalscompile clean; not yet browser-verified against a live cycle)Checklist