Repository navigation
fix(zgw): drop the case read that scoping made unreachable - #677
Merged
Merged
Conversation
Cleaning up after myself. #663 was mine and it was the shallower of two fixes for the same 500. #665 found the real defect: the ZGW listener subscribed on schema slug alone, so this app's whole cascade ran against another app's rows. Reading the key dossiq writes only made the wrong thing succeed further, into a register that does not exist on that instance. #665 left the branch in place with a comment and the decision to me, and named the question to answer first: does any producer in THIS app's registers write `case`? It does not. ZaakInformatieObjectenController is the only producer and validateZioUrls rejects a body without `zaak` with a 400. The `case` spelling only ever came from dossiq, whose objects ZGWObjectScopeService now skips. Removed rather than commented out, because it was worse than dead. The scope check treats an ABSENT application stamp as ours, deliberately, so hand-built ZGW registers keep working; a foreign row can therefore still arrive wherever a producer stops stamping. Accepting `case` there would write an OIO into a register that may not exist. Failing names the missing property and reports the scoping bug instead, which is what that situation is. testCreateObjectInformatieObjectZaakAcceptsTheCaseKey goes with it: #665 correctly identified it as the one thing holding the branch alive, and it called the method directly rather than through the listener, so it said nothing about live behaviour. The neither-key test stays, with its message assertion narrowed. Verified: 299 tests exit 0 at 47 MB, phpcs exit 0.
Contributor
Quality Report — ConductionNL/zaakafhandelapp @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 546/546 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-09-08 15:13 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleaning up after myself
#663 was mine and it was the shallower of two fixes for the same 500. #665 found the real defect: the ZGW listener subscribed on schema slug alone, so this app's whole cascade ran against another app's rows. Teaching the service to read the key dossiq writes only made the wrong thing succeed further, into a register that does not exist on that instance.
#665 left my branch in place with a comment and the decision to me, which was the right call and more courtesy than it owed me. It also named the question to answer first.
Answering that question
It does not.
ZaakInformatieObjectenControlleris the only producer in this app, andvalidateZioUrlsrejects a body withoutzaakwith a 400. Thecasespelling only ever came from dossiq, whose objectsZGWObjectScopeServicenow skips before any rule runs.Why removed rather than left commented
Because it was worse than dead code.
The scope check treats an absent
applicationstamp as ours, deliberately, so hand-built ZGW registers keep working. That is the right call, and it means a foreign row can still arrive wherever a producer stops stamping.In that situation the
caseread is actively harmful. It accepts the row and writes an OIO into a register that may not exist. Removing it means the cascade fails there naming the missing property, which reports the scoping bug instead of quietly acting on it. A guard that turns a loud symptom into a silent wrong write is not a guard.The exception message now says so directly: if a record carries
case, it belongs to another app and should not have reached this cascade.Tests
testCreateObjectInformatieObjectZaakAcceptsTheCaseKeygoes with the branch. #665 correctly identified it as the one thing holding it alive, and it called the method directly rather than through the listener, so it asserted nothing about live behaviour.The neither-key test stays, with its message assertion narrowed to the one spelling. That test is not about dossiq: it stops null reaching a parameter typed
string, and it stays true under scoping.Verified
phpcs --standard=phpcs.xml🤖 Generated with Claude Code