feat(register): rename the register slug voorzieningen -> stackiq - #722
Merged
Merged
Conversation
The catalog register's slug moves with the app's identity, and a repair step renames the existing row BEFORE the import so the rename lands on the register that already holds the data. Why the repair step is not optional. OpenRegister resolves a register by SLUG and by nothing else, and its not-found branch is not an error path — it is the "create a new one" path. Shipping the renamed slug in the register JSON alone would therefore rename nothing: the import finds no match, CREATES A SECOND, EMPTY REGISTER, and every stored object stays behind on the old row, reachable by nothing. Nothing errors; the app just looks new. Why it moves no data. An object is bound to its register by NUMERIC id — every shard table's `_register` column holds the id, and the tables are named `oc_openregister_table_<registerId>_<schemaId>`. The slug appears nowhere in the physical layout, so this is a one-column UPDATE on one row (id 11 on the dev instance, which it keeps). The step is idempotent, non-destructive, and never throws (it runs under <install>, where an escaping exception aborts the install and the app never enables). When both the old and new slugs already exist it REFUSES and renames neither — merging two registers is a decision about data, not a rename. It also re-points a stored app-config `register` value that still holds an old slug, guarded on the VALUE rather than the key. `vng-gemma` deliberately stays exactly as it is: it holds VNG GEMMA reference data, is not this app's own store, and its name is answered to elsewhere. Also fixes an inconsistency the app-id rename left behind: `x-openregister.app` has said `stackiq` since #708 while the register row still said `voorzieningen` — which is precisely the fork this step exists to prevent. Installs that have imported since then may already carry an empty `stackiq` register, and the step refuses rather than merging on those.
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 | ✅ | ||||
| composer | ✅ | ✅ 130/130 | |||
| npm | ✅ | ✅ 720/720 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-24 08:49 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.
What
The catalog register's slug moves with the app's identity:
voorzieningenstackiqvng-gemmavng-gemma(unchanged, deliberately)New repair step
MigrateRegisterSlug(+MigrateRegisterSlugDecisions+ 17 unit tests), registered in both<post-migration>and<install>, ahead ofRenameDutchSchemaSlugsandInitializeSettings— the step that triggers the register import.Why a repair step is required
OpenRegister resolves a register by SLUG and by nothing else —
RegisterMapper::find(), andImportHandler::autoCreateRegisterIfApplication()onfilters: ['slug' => $slug]. ItsDoesNotExistExceptionbranch is not an error path — it is the "create a new one" path.So shipping the renamed slug in the register JSON without renaming the existing row first renames nothing: the import finds no match, creates a second, empty register, and every stored object stays behind on the old row, reachable by nothing. Nothing errors. The app simply looks new.
Renaming the row first makes the import recognise it and update it in place.
Why it moves no data (measured, not assumed)
An object is bound to its register by numeric id, not by slug:
_registercolumn holds the id;oc_openregister_table_<registerId>_<schemaId>, composed from$register->getId()at every call site.The slug appears nowhere in the physical layout. The rename is therefore a one-column
UPDATEon one row — on the dev instance this register is id 11, and it keeps that id. Every object, table, schema link and folder follows it untouched.Step behaviour
<install>an escaping exception aborts the install and the app never enables at all. Read failures, write failures and app-config type conflicts are logged and counted, never raised.registervalue that still holds an old slug — guarded on the VALUE, not the key, so an app storing a numeric register id there (stackiq does, insidevoorzieningen_config) never matches, and an admin's deliberate override is never overwritten.x-openregister.app— an inconsistency this closesFor a
type: applicationconfiguration,autoCreateRegisterIfApplication()reads$slug = $xOpenregister['app'] ?? $appId— that field is a register slug, not an attribution label.The app-id rename (#708) moved it to⚠️ Installs that have imported since #708 may already carry a forked, empty
stackiqwhile the register row still saidvoorzieningen— precisely the fork described above. This PR closes that gap by moving the row to meet it. No change to the field itself was needed.stackiqregister; on those the step refuses and logs, rather than merging.Related:
RenameDutchCatalogColumns::REGISTER_SLUGwas blanket-renamed to'stackiq'by #708 while the register was stillvoorzieningen, so that step has been scoping to a register that did not exist. This PR makes that constant correct rather than aspirational. It is left as-is on purpose.vng-gemmastays exactly as it isIt holds the VNG GEMMA reference model imported from outside this app. It is not this app's own store and its name is answered to elsewhere, so it is absent from
SLUG_MAPand untouched everywhere in the sweep. A test asserts that (testTheGemmaReferenceRegisterIsNotTouched).The sweep
voorzieningenis also ordinary Dutch vocabulary ("facilities/provisions"), so this was moved only where it names the register:lib/Settings/softwarecatalogus_register.json— thecomponents.registers.voorzieningenkey, itsslug, onetargetId: voorzieningen/organisatie, and 3 seedData@self.registervaluesContractApprovalService::SUBJECT_REGISTER,PortalContributionProvider::REGISTER,RenameDutchSchemaSlugs::REGISTER_SLUGSregister: 'voorzieningen'inContactpersonenController(×2),ContactpersoonService(×2); the slug comparison inSettingsService::configureVoorzieningen()register="voorzieningen",registerSlug:,register.slug === …, two component prop defaultssrc/manifest.json— the tour'sadvanceOn.registerpatharrays + theirrawURLs, theregister_nameenvironment variable in 3 env files, 2 collection variable definitions, and the integration collection's slug-resolution preflightci-seed.shrequired-registers list; dev/test shell scripts (objects/voorzieningen/<schema>URLs)components.registers[...], and the manifest sentinel mapDeliberately NOT moved (and why)
vng-gemma/api/voorzieningen/configroute (appinfo/routes.php+ ~12 callers)@resolve:voorzieningen_registersentinel (~30 refs)voorzieningen_configapp-config key. It resolves to a numeric id; the name is not a slugvoorzieningen_config,voorzieningen_register,voorzieningen_*_schema,getValueString(APP_ID, 'voorzieningen')SettingsServiceregisterTypes['voorzieningen'], theVoorzieningensettings tab key,voorzieningen*variables/methods/CSS classestitle: "Voorzieningen"and DutchdescriptionAangebodenGebruikService'slabelForLogs: 'voorzieningen'(and its test)l10n/**(37 locales × 2 files),GEMMA_*.xml, schema descriptionsopenspec/specs/**scenario bodies and prose ("the voorzieningen register")subjectRegister: voorzieningen) was movedissues.md,issues/*.md,reacties/*.md,aanvullende-informatie.md,FIX_VERIFICATION_SUMMARY.md,BUG_FIX_*.md,README_DEBUG.mdopenspec/changes/archive/**softwarecatalog.conduction.nldocs-host refsVerification
php vendor/bin/phpunit --no-coverage— cannot run standalone here: the bootstrap needs a real Nextcloud (Class "OC_App" not found). Pre-existing, not introduced by this PR; CI runs it in-container. Against a minimal local stub bootstrap the new suite is 17/17 green (48 assertions), and the three affected register-shape/sentinel suites are 13/13 (224 assertions). The fulltests/Unitrun under that stub shows 762 tests / 0 failures; its 155 errors are all missingOCA\OpenRegister\*classes the real bootstrap supplies.npx vitest run— 233/233 tests pass. One suite (tests/vitest/adminApi.spec.js) fails to collect withwindow is not defined; that file andsrc/utils/adminApi.jsare untouched by this PR — pre-existing.composer cs:fix→ 3 files fixed (the new ones).composer phpcs→ 0 errors, 104 pre-existing@specwarnings, none in the new files.composer phpmd→ clean.composer psalm→ No errors found.composer phpstan→ [OK] No errors.eslinton the 11 changed frontend files → 0 errors.check_spec_coverage.py→# count=0.check_spec_anchors.py→ empty log. gate-19check_e2e_coverage.py→ PASS (123 refs).check_manifest_crossref.js→ passed.Follow-up (not in this PR)
stackiqhas noMigrateRegisterApplicationIdstep. Schemas are matched byfindByApplicationAndSlug()— the pair — so the #708 app-id move may have left theapplicationcolumn on the register/schema rows behind. Sibling apps ship a step for that; it needs its own measurement.