Repository navigation
refactor(decisions): split BesluitMigrationService::migrate and migrateRows into named steps - #5519
Merged
Merged
Conversation
…e the split Assisted-by: ClaudeCode:claude-opus-5-5
…teRows into named steps Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
November 10, 2026 22:13
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
BesluitMigrationService::migrate(47 lines, complexity 7) andmigrateRows(39 lines, complexity 6) checked decidiq and the target schema, read the source rows, wrote each one onto decidiq and tallied the outcome in two long methods. They now read as steps:migrate()→blockedSummary()— the blocked answer when decidiq or its schema is missing;migrateFrom()— reads the source rows and hands them on;migrateRows()→migrateRow()— one row: skipped, migrated (or would be, on a dry run) or failed, each counted on the run.The counters, the commit flag and the target schema the steps share travel in a
BesluitMigrationRunthat never leaves the service. The public signature is unchanged; the summary keys and their order, the messages, the log lines and the writes are identical.Characterisation tests (committed first, green on the old code)
BesluitMigrationServiceTest::testTheSummaryKeepsItsWholeShapepins the whole summary of a blocked run (its keys, in order, and the zero counts) and of a dry run that meets a row without an id. The existing tests pin the migrated and detached paths.What ran
vendor/bin/phpunit -c phpunit-unit.xml --no-coverage tests/Unit/Service/BesluitMigrationServiceTest.php tests/Unit/Service/LocalDecisionAuthoringTest.php tests/Unit/Architecture/OneDateWritePathTest.php: green on the old code and on the new.tests/Unit/Architecture: green exceptServiceCatchReturnsNullTest::testEveryAllowlistEntryNamesALiveSite, which fails on development too (a stale allowlist entry forlib/Service/Settings/OpenRegisterBridge.php); inherited.vendor/bin/phpcs,vendor/bin/phpmd(both rule sets),vendor/bin/phpstan analyseandvendor/bin/psalmon the two files: clean.saveObjectdouble's signature, at the top of the file); the new test sits in a different hunk and merges cleanly beside it.Figures for the touched file
migratemigrateRowsmigrateFrom18 lines,migrateRow19 lines, complexity ≤ 5, ≤ 2 parametersAI-assisted: prepared with Claude Code (claude-opus-5-5); reviewed by a maintainer before merge.
Generated by Claude Code