feat(acl,domain): cancel the ZGW zaak on document-timeout expiry (S-10c, closes #106) #109

Merged
not merged 11 commits from feat/106-close-zaak-on-timeout into main 2026-07-21 13:58:16 +00:00
11 Commits
Author SHA1 Message Date
notandClaude Opus 4.8 5fdfd4f843 fix(verify): attach stdin (-i) so the zaak-status read-back runs (refs #106)
CI / lint (pull_request) Successful in 1m22s
CI / build (pull_request) Successful in 1m4s
CI / unit (pull_request) Successful in 1m14s
CI / frontend (pull_request) Successful in 2m41s
CI / mutation (pull_request) Successful in 5m43s
CI / verify-stack (pull_request) Successful in 7m54s
The cancellation reaches OpenZaak correctly (Geannuleerd status_created), but
the verify read-back ran 'docker run python:3-slim python -' without -i, so the
heredoc never reached the container's stdin and the script was empty — the check
always saw an empty status. Add -i so the read actually queries OpenZaak.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 15:37:29 +02:00
notandClaude Opus 4.8 e5eef71a57 test(acl): kill cancellation-path mutants to clear the mutation ratchet (refs #106)
CI / lint (pull_request) Successful in 1m29s
CI / build (pull_request) Successful in 1m3s
CI / unit (pull_request) Successful in 1m19s
CI / frontend (pull_request) Successful in 5m12s
CI / mutation (pull_request) Successful in 5m26s
CI / verify-stack (pull_request) Failing after 6m27s
The new SetZaakToCancellationStatusAsync added surviving mutants (uncovered
null-guards and the failure-action messages) that dropped the ACL mutation
score below the 90% break threshold. Add null-argument and rejected-POST tests
for the cancellation path; score back to 93.46%.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 15:13:36 +02:00
notandClaude Opus 4.8 ca287eb13e docs(acl): ADR-0019 + demo/backlog for zaak cancellation on timeout (S-10c) (refs #106)
CI / lint (pull_request) Successful in 1m22s
CI / build (pull_request) Successful in 1m2s
CI / unit (pull_request) Successful in 1m14s
CI / frontend (pull_request) Successful in 2m46s
CI / mutation (pull_request) Failing after 2m30s
CI / verify-stack (pull_request) Has been cancelled
Records the ZGW cancellation-modelling decision (distinct non-terminal
Geannuleerd status + Vervallen resultaat, resolved by name) and documents the
end-to-end timeout-cancellation path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:48:58 +02:00
notandClaude Opus 4.8 d3c0ad5d11 test(acl,verify): cancellation reaches Geannuleerd live (refs #106)
Adds an ACL↔OpenZaak integration test asserting SetZaakToCancellationStatusAsync
records the Geannuleerd status + a resultaat against real OpenZaak, and extends
the domain verify script to confirm a timed-out registration's zaak is cancelled
to Geannuleerd end-to-end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:46:43 +02:00
notandClaude Opus 4.8 1cd171d1e3 feat(infra): seed Geannuleerd statustype + Vervallen resultaattype (refs #106)
S-10c needs a distinct cancellation status/resultaat. Adds a non-terminal
Geannuleerd statustype (between Ontvangen and the Afgehandeld eindstatus) and a
second Vervallen resultaattype, both idempotent by omschrijving. Both
resultaattypen draw their selectielijstklasse from the zaaktype's single
procestype so they validate on publish.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:42:10 +02:00
notandClaude Opus 4.8 c1e48c90e0 test(acceptance): document-timeout scenario asserts the zaak is cancelled (refs #106)
Extends the S-10a feature to S-10c: a timed-out registration's zaak is
cancelled via the ACL, while documents-in-time leave the zaak untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:39:48 +02:00
notandClaude Opus 4.8 f95ee623f4 feat(domain): cancel the zaak via the ACL when a registration times out (refs #106)
The expiry worker asks the ACL to cancel the zaak before advancing the
aggregate to VERLOPEN, so a lapsed document term is reflected in ZGW and not
only in the domain. Ordered ACL-first for redelivery safety; guarded so a
redelivered job neither re-saves nor re-cancels.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:37:47 +02:00
notandClaude Opus 4.8 e31297bd4c test(domain): expiry worker cancels the zaak via the ACL on timeout (refs #106)
S-10c: expiring the aggregate to VERLOPEN is not enough — the ZGW zaak must
also be cancelled through the ACL (§8.1). Adds IAclClient.CancelZaakAsync and
its client/fakes, and asserts the worker cancels a still-open registration's
zaak but leaves an already-resolved one untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:36:33 +02:00
notandClaude Opus 4.8 9275cfeecd feat(acl): CancelZaakAsync service + POST /annuleringen endpoint (S-10c) (refs #106)
The ACL exposes zaak cancellation as a service operation the domain calls on
document-timeout expiry; it default-fills the zaaktype and dates the status
today, translating the domain intent to the ZGW cancellation status/resultaat.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:32:01 +02:00
notandClaude Opus 4.8 64b924fe3a feat(acl): gateway cancels a zaak via Geannuleerd status + Vervallen resultaat (refs #106)
SetZaakToCancellationStatusAsync resolves the cancellation statustype and
resultaat by omschrijving and posts resultaat-then-status, mirroring the
approval path. Approval now resolves its Geregistreerd resultaat by name too,
since a second resultaattype now exists.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:29:47 +02:00
notandClaude Opus 4.8 a985284b71 test(acl): cancellation gateway posts Geannuleerd + Vervallen; approval picks resultaat by name (refs #106)
S-10c: the document-timeout branch must set the zaak to a distinct
cancellation statustype (Geannuleerd) + resultaat (Vervallen), resolved by
omschrijving. With a second resultaattype present, approval must also
resolve its resultaat (Geregistreerd) by name rather than taking the first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:27:32 +02:00