Skip to content

fix(example-sets): a required register behind its descriptor is imported again - #4897

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/public-space-schema-version
Oct 26, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
fix/public-space-schema-version

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Why

#4895 fixed public_space_register.json (location type: geo became {"type": "object", "format": "geo:point"}), but REFRESH-7b on :8080 still refused the 11 public-space objects. The stored schemas 1763, 1764, 1765 and 1767 kept type: geo.

The cause: ExampleSetPrerequisites::ensureRegisters() skips every required register that is already on the instance. The fixed descriptor was therefore never imported again. The schema import itself does replace a schema at a higher version, or at the same version with different content.

What

  • RegisterDescriptorService::isBehind(appId, slug, mock): true when the descriptor of that kind ships a newer register version than the instance holds. It uses the same "shipped vs installed" comparison as the inventory's behind state.
  • ExampleSetRegisters::isBehind() wraps it. ExampleSetPrerequisites now imports a required register again when it is behind, as well as when it is missing or its data was removed. The outcome reads imported.
  • public_space_register.json: the register gets version: 1.0.1 (info 1.0.1). tree, street-light, play-equipment and road-section go to 1.0.1. market-pitch stays at 1.0.0, unchanged. On :8080 the next install sees the register behind and runs the mock import forced, which updates the four schemas.

Tests

  • ExampleSetRequirementsTest::testARegisterBehindItsDescriptorIsImportedAgain: a present, behind register is imported again. It fails without the prerequisites change.
  • RegisterDescriptorServiceTest::testARegisterIsBehindOnlyWhenItsDescriptorIsNewer: covers a newer mock, the same-version real descriptor, and an absent register.
  • ImportHandlerSchemaVersioningTest::testAHigherVersionReplacesAStoredProperty: an import at 1.0.1 replaces a stored location: {type: geo} with {type: object, format: geo:point}.

Verified

  • These three test files plus tests/Unit/Service/ExampleSet pass: 303 tests.
  • diff-check: php -l, phpcs, phpstan and phpunit are green on the touched lines.
  • psalm reports no errors on the three changed lib files.
  • check:strict was not re-run, to keep the fix fast.

Assisted-by: ClaudeCode:claude-opus-5-5

…ted again

An example set skipped every required register already on the instance,
so a schema fixed in the descriptor (public-space location type geo to
object + format geo:point, #4895) never reached an instance that had
installed the set. The set now re-imports a required register when its
descriptor ships a newer version than the instance holds
(RegisterDescriptorService::isBehind), and the public-space register and
its four changed schemas move to 1.0.1.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit aebc989 into development Oct 26, 2026
34 of 40 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ dccd20d

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 ❌
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-10-26 11:12 UTC

Download the full PDF report from the workflow artifacts.

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