Repository navigation
refactor(transitions): the status engine asks two facades instead of fourteen collaborators - #3858
Merged
Merged
Conversation
Decision 224. The case type delete check, drc-004 and drc-007 let a request through when their lookup failed. They now refuse with 503 check-not-completed, name the rule, and log the rule and the object. drc-003 gives the same answer instead of claiming a duplicate, and the controller's relation check before a document delete (drc-008a) follows. Two sites leave the catch-return-null list, ceiling 263 to 261.
… facades method-decomposition slice 8h. The engine couples to 18 classes against 13 and takes 14 constructor arguments. The design gives it one facade over what a case declares and one over what a move writes; the engine keeps the order of the checks.
Characterisation before the StatusTransitionService split (method-decomposition slice 8h), green on the single class: the order of the five refusals, the conflict check, the one save of a closing move with the version it read, the timer after the save, the record that cannot be written back, the free-form refusals and the shape of the available transitions. Seven mutations of the engine turn it red.
…fourteen collaborators method-decomposition slice 8h. StatusTransitionService coupled to 18 classes against 13 and took 14 constructor arguments. Transitions/CaseDeclarations reads what a case declares about its status and its moves, and Transitions/CaseMoveLedger holds what a move writes. The engine keeps the decision and the order of the checks, takes nine arguments and couples to 12 classes. Both suppressions are gone; phpmd.suppressWarnings 183 to 181. The public methods and their answers are unchanged. The characterisation test and the five existing engine tests are green with only their constructor call changed.
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
October 12, 2026 18:41
…ceiling 256 to 254
…26; phpmd.suppressWarnings 182 to 180
Contributor
Quality Report — ConductionNL/dossiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue3-compile | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ❌ | ||||
| check-schema-l10n | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-debt-ratchet | ❌ | ||||
| check-types-e2e | ✅ | ||||
| composer | ✅ | ✅ 109/109 | |||
| npm | ✅ | ✅ 659/659 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ 8660/8660 · 3 skipped (no test failed, the job failed for another reason — see its log) | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-10-14 20:16 UTC
Download the full PDF report from the workflow artifacts.
This was referenced Oct 14, 2026
Merged
Merged
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.
method-decomposition slice 8h:
StatusTransitionService.Stacked on #3854 (decision 224), which is stacked on #3836. Three commits are this PR's own: the design, the characterisation test, the split.
What changes
The status engine coupled to 18 classes against a limit of 13 and took 14 constructor arguments. It carried two PHPMD suppressions for that. Both are gone.
The engine asked two kinds of question of fourteen collaborators. It now asks two classes.
Transitions/CaseDeclarationsStatusDeclarations,TransitionDeclarations,OfferedTransitions,StatusChecklist, and the status rowTransitions/CaseMoveLedgerCaseStatusStore,CaseResultWriter,SideEffectDispatcherThe engine keeps the decision: which transition, in which order the checks run, what is refused and what the caller hears. It takes nine arguments and couples to 12 classes.
The design is in
openspec/changes/method-decomposition/design.md, "StatusTransitionService: two facades", written before the code. It ends with the two points where the build differs from the first draft, and why.What does not change
getAvailableTransitions(),execute(),executeFreeForm(),replay(),isAdmin(),ADMIN_GROUP_ID.The constructor of the engine does change. Nothing outside the tests builds it by hand.
How it is proven
StatusTransitionServiceOrderTest, 10 tests. It pins what the five existing engine tests left open: the order of the five refusals, the conflict check, the one save of a closing move with the version it read, the timer after the save, the record that cannot be written back, the free-form refusals, and the shape of the available transitions. Seven mutations of the old engine turn it red.CaseDeclarationsTest(4),CaseMoveLedgerTest(6).Debt
.debt-baseline.json:phpmd.suppressWarnings182 to 180 (development's number after train 5, minus 2). Inherited: development itself measures 187 suppressions against its own 182 since #3884/#3888 etc., so the debt-ratchet check reads red on development and here (185 measured against 180).Inherited, not fixed here
StatusTransitionService::writeMove()and a few listeners still citeopenspec/changes/what-a-status-declares/..., archived on 7 October. The PR stacked on this one repoints all 206 of them.Verified
On a3a1c0a, every
composer check:strictstage, one at a time in the lane's check worktree (exit codes indq-l11-logs/r6/s26.rc):--no-coverage: 8,507 tests, 2 failures. Both areStubApiDriftTest(DecisionChangeRequestedEvent,DecisionVisibilityRequestedEvent), the stub drift train 4 fixes. Not in this diff.openspec validate method-decomposition: valid.Not run:
npm run lintand vitest. No JavaScript, no l10n and no register change.Live pass (decision 139): move a case through one status, close one with a result, and do one free-form move as an administrator.
Merged with development (14 Oct), verified again
#3854 is merged in, with development after train 5 (b99db82).
.debt-baseline.jsonwas the only conflict.On b99db82, every
composer check:strictstage once, one at a time in the lane's check worktree (exit codes indq-l11-logs/r7/s26.rc):BooleanArgumentFlaginlib/Service/Termijn/TermLetters.php(lines 401 and 425), which came to development with fix(letters): every date in a letter to the applicant reads the same way #3884/fix(portal): the Woo request form reads Dutch dates and names refused fields in Dutch #3895. Inherited, not in this stack.--no-coverage: 8,663 tests, exit 0, no failure (7 skipped, 1 warning).