fix(infra): docker-compose.local self-seeds zaaktype, DMN + NRC abonnement (closes #110) #114

Merged
not merged 4 commits from fix/110-compose-local-flow into main 2026-07-22 12:44:30 +00:00
Contributor

What & why

The host-browser stack (make local) had drifted behind three slices, so a fresh bring-up couldn't complete the flow: registrations stuck at OpenZaakAanmaken, the behandel werkbak stayed empty, and the openbaar register showed nothing. The verify-* scripts do this setup for CI at test time; make local had no equivalent.

This makes the local stack self-seed at bring-up so it just works in a browser:

  • DMNflowable-init now also deploys diploma-eligibility.dmn (was BPMN-only), so completing WachtOpDocumenten routes through the DMN to Beoordelen instead of 404ing.
  • Zaaktype + ACL — a local-seed one-shot publishes the BIG zaaktype (whose UUID is server-assigned, hence not static in the compose file) and writes the real URLs to seed-env:/acl.env; the ACL sources it on startup via an entrypoint override.
  • NRC abonnement — an nrc-subscribe one-shot registers the zaken subscription at the event-subscriber callback, so notifications reach the projection/openbaar register.

Both one-shots reach OpenZaak/NRC by container IP (a single-label host fails their Django URLValidator), mirroring the CI verify scripts. Design + trade-offs in ADR-0020.

Closes #110

Definition of Done

  • Linked Gitea issue (#110).
  • Failing test committed before the implementation — test(infra): … adds infra/run-local-flow-check.sh / make verify-local; the three gaps' failures were observed live on a fresh make local (red), and the fix turns it green.
  • Implementation makes the test pass; docs commit follows.
  • Conventional Commits referencing the issue (refs #110).
  • CI green — running on the restored runner. Infra-only change; the CI verify-stack job uses docker-compose.yml (untouched). Also validated locally: make verify-local passes against a fresh make local (see below).
  • docker compose up from a fresh clone reaches green health checks — verified: make local healthy in ~2m20s, then make verify-local green.
  • Docs updated — ADR-0020 + demo-script note.
  • ADR added in docs/architecture/ — ADR-0020.
  • Demo note in docs/demo-script.md.

Notes for reviewers

  • Infra-only — no service code changes; the ACL image and the CI stack (docker-compose.yml) are untouched.
  • Verified end-to-end on a fresh stack (make local-down && make local && make verify-local):
    >> 2. zaak opened            (zaaktype seeded + wired)
    >> 3. documents accepted 204 (DMN deployed)
    >> 4. in the werkbak         (DMN routing → Beoordelen)
    >> 5. visible in the openbaar register (NRC abonnement)
    OK — a fresh local stack completed the flow with no manual seeding
    
  • Follow-up: the cleaner design — ACL resolving its zaaktype by identificatie instead of a pinned server-assigned URL — is split out as S-27 (#113); landing it would remove the acl.env injection here. ADR-0020 records this.
  • The seed-env volume carries the generated acl.env from local-seed to the ACL; a down --volumes (as make local-down does) resets it cleanly.
## What & why The host-browser stack (`make local`) had drifted behind three slices, so a fresh bring-up couldn't complete the flow: registrations stuck at `OpenZaakAanmaken`, the behandel werkbak stayed empty, and the openbaar register showed nothing. The `verify-*` scripts do this setup for CI at test time; `make local` had no equivalent. This makes the local stack **self-seed at bring-up** so it just works in a browser: - **DMN** — `flowable-init` now also deploys `diploma-eligibility.dmn` (was BPMN-only), so completing `WachtOpDocumenten` routes through the DMN to `Beoordelen` instead of 404ing. - **Zaaktype + ACL** — a `local-seed` one-shot publishes the BIG zaaktype (whose UUID is server-assigned, hence not static in the compose file) and writes the real URLs to `seed-env:/acl.env`; the ACL sources it on startup via an entrypoint override. - **NRC abonnement** — an `nrc-subscribe` one-shot registers the `zaken` subscription at the event-subscriber callback, so notifications reach the projection/openbaar register. Both one-shots reach OpenZaak/NRC by **container IP** (a single-label host fails their Django URLValidator), mirroring the CI verify scripts. Design + trade-offs in **ADR-0020**. Closes #110 ## Definition of Done - [x] Linked Gitea issue (#110). - [x] Failing test committed before the implementation — `test(infra): …` adds `infra/run-local-flow-check.sh` / `make verify-local`; the three gaps' failures were observed live on a fresh `make local` (red), and the fix turns it green. - [x] Implementation makes the test pass; docs commit follows. - [x] Conventional Commits referencing the issue (`refs #110`). - [ ] CI green — running on the restored runner. Infra-only change; the CI `verify-stack` job uses `docker-compose.yml` (untouched). Also validated locally: `make verify-local` passes against a fresh `make local` (see below). - [x] `docker compose up` from a fresh clone reaches green health checks — verified: `make local` healthy in ~2m20s, then `make verify-local` green. - [x] Docs updated — ADR-0020 + demo-script note. - [x] ADR added in `docs/architecture/` — ADR-0020. - [x] Demo note in `docs/demo-script.md`. ## Notes for reviewers - **Infra-only** — no service code changes; the ACL image and the CI stack (`docker-compose.yml`) are untouched. - **Verified end-to-end on a fresh stack** (`make local-down && make local && make verify-local`): ``` >> 2. zaak opened (zaaktype seeded + wired) >> 3. documents accepted 204 (DMN deployed) >> 4. in the werkbak (DMN routing → Beoordelen) >> 5. visible in the openbaar register (NRC abonnement) OK — a fresh local stack completed the flow with no manual seeding ``` - **Follow-up:** the cleaner design — ACL resolving its zaaktype by `identificatie` instead of a pinned server-assigned URL — is split out as **S-27 (#113)**; landing it would remove the `acl.env` injection here. ADR-0020 records this. - The `seed-env` volume carries the generated `acl.env` from `local-seed` to the ACL; a `down --volumes` (as `make local-down` does) resets it cleanly.
not added 3 commits 2026-07-22 09:35:39 +00:00
Adds infra/run-local-flow-check.sh (+ `make verify-local`): submits a
registration against a fresh local stack and asserts it opens a zaak, reaches
the werkbak after documents, and appears in the openbaar register — all with no
manual seeding. Fails today (ACL points at a placeholder zaaktype; the DMN is
undeployed; no NRC abonnement is registered), covering the three S-B04 gaps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A fresh `make local` now completes the whole flow with no manual seeding, closing
the three S-B04 gaps in the host-browser stack:

- flowable-init also deploys diploma-eligibility.dmn (was BPMN-only), so completing
  WachtOpDocumenten routes through the DMN to Beoordelen instead of 404ing.
- a local-seed one-shot seeds + publishes the BIG zaaktype (server-assigned URL) and
  writes it to seed-env:/acl.env; the ACL sources it on startup (entrypoint override),
  since the UUID isn't knowable at compose-write time.
- an nrc-subscribe one-shot registers the `zaken` abonnement at the event-subscriber
  callback, so notifications reach the projection and the openbaar register.

Both one-shots reach OpenZaak/NRC by container IP (a single-label host fails their
Django URLValidator), mirroring the CI verify scripts. Asserted by `make verify-local`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs(infra): ADR-0020 + demo note for the local-stack self-seed (refs #110)
CI / lint (pull_request) Successful in 1m19s
CI / build (pull_request) Successful in 56s
CI / unit (pull_request) Successful in 1m6s
CI / frontend (pull_request) Successful in 2m31s
CI / mutation (pull_request) Successful in 6m0s
CI / verify-stack (pull_request) Failing after 10m33s
a693137c7c
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not scheduled this pull request to auto merge when all checks succeed 2026-07-22 09:51:37 +00:00
not canceled auto merging this pull request when all checks succeed 2026-07-22 10:03:17 +00:00
not added 1 commit 2026-07-22 12:04:34 +00:00
Merge branch 'main' into fix/110-compose-local-flow
CI / unit (pull_request) Successful in 1m12s
CI / lint (pull_request) Successful in 1m17s
CI / build (pull_request) Successful in 59s
CI / frontend (pull_request) Successful in 2m39s
CI / mutation (pull_request) Successful in 5m43s
CI / verify-stack (pull_request) Successful in 7m57s
dcd24d17a3
not merged commit 183d0bce31 into main 2026-07-22 12:44:30 +00:00
Sign in to join this conversation.