Repository navigation
refactor(cmdb): carry the import run and row in context objects (REVIEW) - #1420
Merged
rubenvdlinde merged 4 commits intoNov 3, 2026
Merged
Conversation
Each of the 101 CmdbExportImportService tests now also compares what it left in the doubles (register, saves, archive states, transitions, searches, log lines, address books, progress cache) with a recording made on the current code. Run times, operation ids and generated uuids are replaced by placeholders, so the recording is the same in every time zone. Assisted-by: ClaudeCode:claude-opus-5-5
CmdbImportRun holds what every row of an import shares and CmdbImportRow what one row found so far, so the row and reconciliation steps take one or two arguments in place of up to seven. The behaviour is unchanged: the golden recorded on the previous commit's code passes as it is. Assisted-by: ClaudeCode:claude-opus-5-5
The wall clock can step back during a run, which logs a duration of -1. Assisted-by: ClaudeCode:claude-opus-5-5
…mdb-export-import-context
rubenvdlinde
marked this pull request as ready for review
November 3, 2026 22:30
Contributor
Quality Report — ConductionNL/stackiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue-demi | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-schema-l10n | ❌ | ||||
| check-l10n-js | ✅ | ||||
| composer | ✅ | ✅ 127/127 | |||
| npm | ❌ | ✅ 807/807 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ✅ 1691/1691 · 8 skipped | ||||
| 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-11-04 02:36 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.
REVIEW: reads and writes imported organisations and owners. Held for a reviewer. No behaviour change is intended.
What
CmdbImportRunholds what every row of an import shares, andCmdbImportRowwhat one row found so far. The row and reconciliation steps now take one or two arguments.addRowmoved onto the row, andtransitionandtransitionsread one item.Golden
The first commit makes each test of
CmdbExportImportServiceTestalso compare everything it left in the doubles (register, saves, archive states, transitions, searches, log lines, address books, progress cache) with a recording. There are 106 recordings, 1.4 MB, made on the old code, and the refactor commit does not touch the file. Run times, durations, operation ids and generated uuids are placeholders. Green in Europe/Amsterdam, UTC and Asia/Tokyo, in random order, and with and without OpenRegister's vendor directory.Durations needed care: the wall clock on this machine can step back, so a run logged
"duration":-1and failed the golden at random. The placeholder covers that, and the last test commit is that fix.New tests
Mutants showed gaps in the old suite, so five tests were added and recorded on the old code too: the
mapping,ownersandmanufacturerfailure steps, the sheet row number given to the engine, the 1904 date system, and the schema a delete goes to.Mutants
Capped, control survived: service 28 of 28, run 4 of 4, row 5 of 5. The 6 first-round survivors are the gaps above.
Numbers (with the other held PR on the same tree)
PHP on the combined tree, development to here, against the 4-star limit:
CMDB files only, LOC in units with 3+ params: 676 to 228.
Left at 3 parameters on purpose:
runImport,merge,save,search,resolveContactPerson,contactByProperty,existingOwnerContact,logSafeMessage. These are small generic helpers (exceptrunImport, 77 lines), and bundling their arguments would only hide them. The 12-parameter constructor is DI, andCmdbImportReport::addRowkeeps its 9.Verified
Linters on touched files after merging development: phpcs, phpstan, psalm, phpmd clean.
One heavy run on the combined tree of both held SQ6 PRs, 8e4e2e04 (development 3604e5b merged in): full PHPUnit under pcov with --fail-on-risky, exit 0, 1756 tests, 17377 assertions, 8 skipped. The 8 skips predate this work:
OrganisationUserWorkflowTest(6) andContactPersonHandlerTest(2), stale tests a refactor outran.Hydra gates --scope-to-diff --base origin/development: 42 of 42 applicable ran. Two results to read: gate 122 found one new clone, this PR's link command constructor against
ReferencesAuditCommand, fixed in 37053c8, then the ratchet re-ran with 0 findings in 49 changed units (30 inherited). Gate 116 failed because ajv was not installed in that tree; run on its own with ajv present it reports 0 findings, andconnections.jsonis not in this diff. The full suite was not repeated for the one-line constructor change: its test file and phpcs were re-run.🤖 Generated with Claude Code