Repository navigation
refactor(disposition): share the decision write between approving and rejecting a disposition - #5876
Merged
Merged
Conversation
…n before sharing the write Assisted-by: ClaudeCode:claude-opus-5-5
… rejecting a disposition approveDisposition() and rejectDisposition() repeated the same write: the approval status and the deciding user patched onto the stored disposition, the decision logged, the stored disposition answered. That write is now one private decide(), with the register reading in patchDisposition(). Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
November 11, 2026 15:19
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.
What changed
DispositionService::approveDisposition()andrejectDisposition()repeated the same write: refuse without OpenRegister, patchapprovalStatus(approved / rejected) andgoedkeurder(the deciding user) onto the stored disposition in the configured schema, log the decision, and answer the stored disposition, or the written fields with the id when the store answers no row.Both now call one private
decide(), with the register reading and the patch in a privatepatchDisposition()so each unit stays small. Public signatures, the patched fields, the log line (Disposition <id> approved|rejected by <user>), the exception and the answers are unchanged; the settings reads still happen before the patch.createDisposition()(changed by #5353) is not touched.Characterisation tests
tests/Unit/Service/DispositionDecisionGoldenTest.php, committed first and green on the old code: for both decisions, the refusal without OpenRegister (nothing read, nothing logged), the exact patch (id, fields, register, schema) with the exact log line and the stored disposition answered, and the fallback answer when the store answers no row. 6 cases.What ran
phpunit -c phpunit-unit.xmlon the new test,DispositionServiceTest, the two complaint controller test classes,CreatesIgnoreCallerIdentityTestandtests/Unit/Architecture: 149 tests, all green but one inherited failure.phpcsandphpstan analyseon the touched file: no findings.Inherited:
ServiceCatchReturnsNullTest::testEveryAllowlistEntryNamesALiveSiteis red on development too (a stale allowlist entry forlib/Service/Settings/OpenRegisterBridge.php), untouched here.Duplication figures
DispositionService: 18 -> 2 matching window pairs.AI-assisted: prepared with Claude Code (claude-opus-5-5); reviewed by a maintainer before merge.
Generated by Claude Code