S-09b: Approval flow — temp admin endpoint + status transition to projection #77
Reference in New Issue
Block a user
Delete Branch "feat/75-approval-flow"
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 & why
S-09b (#75, split from #10) — the approval flow that completes the walking skeleton. A behandelaar can now approve a submitted registration; the entry flips from
INGEDIENDtoINGESCHREVENin the public register. Flow:POST /registrations/{id}/approve(domain) → ACL sets the zaak eindstatus (ZGW/statussen) → OpenZaak → NRC → event-subscriber → projection → openbaar.Changes (bottom-up, each red→green TDD)
RegistrationStatus.Ingeschreven+Registration.Approve()(guards: opened zaak, only from INGEDIEND);ApproveRegistrationuse case (idempotent) + tempPOST /registrations/{id}/approveendpoint;IAclClient.ApproveZaakAsync.isEindstatus/ highest volgnummer) and POSTs a ZGW status; exposed asPOST /statussen. Unit + real-OpenZaak integration test.hoofdObject, projects astatus/createasINGESCHREVENkeyed on the zaak (updates the existing row), without reading OpenZaak (§8.1). Retains the ZGWresourcein the log (new column + EF migration) so a rebuild reproduces the status.Key decisions (see ADR-0011)
Verification
dotnet formatclean.verify-stack(live NRC→projection + selectielijst egress, not reproducible locally).closes #75
verify-up failed: the event-subscriber and projection-api both migrate the shared projection DB on start, and EF releases its migrations-history lock between individual migrations — harmless with one migration, but the new AddNotificationResource made a second, so a migrator re-applied it in the window between the other's two migrations ("column resource already exists"). Hold a session pg_advisory_lock across the whole MigrateAsync so the sequence runs exactly once; the second migrator then finds nothing pending. Verified by starting both images simultaneously against a fresh Postgres: both reach health, the resource column is created once, and __EFMigrationsHistory has both rows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>