fix(demo): give the demo dataset references that resolve - #1814
Merged
Conversation
Every UUID-shaped value in the demo set was the placeholder
`00000000-0000-4000-8000-0000000000NN`. All 360 of them. Not one resolved,
so every demo case pointed its caseType, status, result and parentCase at
nothing.
The dashboard fired a 404 per reference:
404 /apps/openregister/api/objects/dossiq/caseType/00000000-0000-4000-8000-000000000000
404 /apps/openregister/api/objects/dossiq/statusType/00000000-0000-4000-8000-000000000001
...
A demo dataset whose whole job is to show the app working showed it broken:
a case with no type and no status. It went unnoticed because the demo import
itself never landed until #1806 and #1808 fixed it, so nothing had ever read
this data.
The objects carry only `@self.slug`; OpenRegister assigns uuids at import.
So this does two things:
1. Gives every object a DETERMINISTIC `@self.id`, derived from its slug.
`ObjectService::extractUuidAndNormalizeObject()` reads `@self.id` and uses
it as the target uuid, so the imported object really carries this id.
Deterministic, so a re-import updates rather than duplicating.
2. Rewrites each placeholder to the id of a real object of the schema THE
PROPERTY'S OWN `$ref` NAMES. The target is read from the schema, never
guessed: 342 references, spread deterministically across the objects of
the schema each one declares.
Six properties declare no `$ref` and are optional, so their placeholder is
dropped rather than pointed somewhere invented: a field that is absent is
honest, a uuid pointing at nothing is not. Two more are REQUIRED and declare
no `$ref` either, `inspectionChecklistRun.case` and `.template`; those are
resolved from the property name, which is inference rather than declaration,
and only because a demo object of that schema exists. That is called out in
the script rather than hidden.
Verified on a pristine rig, demo data installed:
before 10 4xx on the dashboard, 9 of them reference lookups
after 1, a probe for hermiq, which is not installed here
ui-pages.spec.ts 4 passed, including "dashboard mounts without dossiq console
errors", which is the test this defect was failing. demo-data-setup-step 3
passed. PHPUnit and vitest exit 0.
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
September 4, 2026 18:44
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 | ✅ | ||||
| composer | ✅ | ✅ 106/106 | |||
| npm | ✅ | ✅ 541/541 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-09-04 18: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 was wrong
Every UUID-shaped value in
dossiq_mock_register.jsonwas the placeholder00000000-0000-4000-8000-0000000000NN. All 360 of them. Not one resolved, so every demo case pointed itscaseType,status,resultandparentCaseat nothing.The dashboard fired a 404 per reference:
A demo dataset whose entire job is to show the app working showed it broken: a case with no type and no status.
It went unnoticed because the demo import itself never landed until #1806 and #1808. Nothing had ever read this data, so nothing had ever noticed that none of it points anywhere.
What this does
The objects carry only
@self.slug; OpenRegister assigns uuids at import. So:@self.id, derived from its slug.ObjectService::extractUuidAndNormalizeObject()reads@self.idand uses it as the target uuid, so the imported object really carries this id. Deterministic, so a re-import updates rather than duplicating.$refnames. The target is read from the schema, never guessed: 342 references, spread deterministically across the objects of the schema each one declares.The eight properties that declare no
$refSix are optional, so their placeholder is dropped rather than pointed somewhere invented. A field that is absent is honest; a uuid pointing at nothing is not.
Two are required and still declare no
$ref:inspectionChecklistRun.caseand.template. Those are resolved from the property name, which is inference rather than declaration, and only because a demo object of that schema exists. The script says so in as many words rather than burying it.Verification
On a pristine rig with the demo data installed:
hermiq, which is not installed on this rigui-pages.spec.ts: 4 passed, including "dashboard mounts without dossiq console errors", the test this defect was failing.demo-data-setup-step.spec.ts: 3 passed.phpunit,vitest,phpcs,phpstan,psalm,lintall exit 0.Worth knowing
The generator that produced this file is not in the repo, so it will emit placeholders again next time it runs. The durable fix belongs there; this repairs the shipped output.
🤖 Generated with Claude Code