Skip to content

fix(example-sets): a set may require a register OpenRegister ships only as a mock - #4658

Merged
rubenvdlinde merged 2 commits into
developmentfrom
fix/example-set-requires-mock-register
Oct 15, 2026
Merged

rubenvdlinde merged 2 commits into
developmentfrom
fix/example-set-requires-mock-register

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

A fresh-instance rehearsal of the Zuiddrecht demo refused 15 items: register "brp" is required and could not be imported from OpenRegister's descriptor: ... declares no register "brp". brp and kvk ship only as mock descriptors (x-openregister.type: mock), and since #4618 the real-configuration re-import correctly refuses a mock. example-set:install had no way to ask for the mock, so a nightly remove + install on a reset instance would fail every night.

Change

  • A requires entry in a cast file is either a slug (imported from the real descriptor, as before) or {"register": "<slug>", "mock": true}, imported through RegisterDescriptorService::reimportMock() under openregister.mock. The import jobs are recorded and removed exactly as before.
  • A plain slug never falls back to the mock: sample data is the set's explicit choice, not a silent fallback.
  • An entry without a register slug refuses the set when it is gathered.
  • zuiddrecht.json declares brp and kvk as mock requirements.
  • No --mock flag on example-set:install: the set declares what it needs, so the nightly reset and a hand install run the same command.
  • OpenSpec: REQ-EXS-009 in example-sets amended with two scenarios, decision 7 in design.md amended, task 3.13.

Verified

  • ExampleSetMockRegisterImportTest reads the shipped zuiddrecht cast and OpenRegister's own lib/Settings through the real catalogue, ExampleSetRegisters and RegisterDescriptorService (only the database and the configuration import are fakes): every required register imports on a fresh instance under openregister.mock. Control: three of its four tests fail on the previous lib/ (the fourth pins that a plain brp is still refused).
  • composer check:strict: lint, phpcs, psalm, phpstan clean; phpmd flagged a boolean flag argument, fixed by splitting importMock() out (re-checked). The test run has 15 errors in AuditTrail*/DraftRemoval* DB tests from MigratedSqliteDatabase (no Nextcloud server root in the local tree); untouched by this change. The example-set and descriptor suites are green (125 tests).
  • No _rbac added.

Other apps' zuiddrecht fragments do not declare requires; only the cast file does, so no app PRs are needed.

…ly as a mock

A fresh instance refused the zuiddrecht set: brp and kvk are mock-only
descriptors, and the real-configuration re-import correctly refuses a mock.
A requires entry now names the descriptor it wants: a slug for the real
one, {"register": "<slug>", "mock": true} for the mock, imported through
reimportMock() under openregister.mock and recorded for remove as before.
A plain slug never falls back to the mock. zuiddrecht declares brp and kvk
as mock requirements.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 16b4be4

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
test-l10n ✅
test-l10n-parity ✅
format ✅
check-schema-l10n ✅
composer ✅ ✅ 173/173
npm ✅ ✅ 648/648
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ✅ 26202/26202 · 25 skipped
Newman ✅ 714/714
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-15 19:10 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 4d6fdde into development Oct 15, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant