You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while fixing the migration/version gate (#3451). Same shape, different layer.
What is true today
Eight Repair steps import a register descriptor through ConfigurationService::importFromApp(..., version: ...), whose gate is version_compare with force: false. The version each one passes is a hand-written PHP constant, not the descriptor's own info.version:
Two numbers describing one artefact, kept in step by hand. Measured on development at 229a04d, three of the nine (descriptor, version) pairs have
already drifted:
Note they drift in both directions, which is what says this is a maintenance
gap rather than one forgotten edit.
Why it matters
The constant is what gates the import. The descriptor's info.version is
decorative on that path — so editing the JSON and bumping the version inside it
changes nothing about whether the change reaches an existing instance.
But info.version is not decorative everywhere: RegisterDescriptorService::inventory() reads descriptor versions to decide current vs behind for the admin panel. The panel and the importer can
therefore disagree about which version an instance is on, in either direction.
The whole-configuration skip no longer depends on this (it compares a content
hash since Added property close-after-click to every NcActionButton #426), which removes the worst case. The per-register and
per-schema gates inside ImportHandler (L844, L998, L1873, L2872, L3491)
still compare versions with no content-diff escape — the dossiq#1786 shape:
the code moves, the version does not, the change never lands.
A ruling first, then a mechanism. Three candidate numbers exist per descriptor
(the PHP constant, info.version, and each register's/schema's own version),
and deciding which is canonical is a design decision, not a gate:
Derive — drop the constant and pass $data['info']['version']. One
number. Note this changes behaviour for the credential broker: its gate value
would move 1.0.0 → 1.4.0, which re-imports the descriptor on the next
upgrade. That is the correct direction (the content did change), but it is a
behaviour change and wants its own verification.
Assert equality — keep both and add a diff-free unit test that every
repair step's version equals its descriptor's info.version. Reds today on
the three rows above; the fix is three one-line edits.
Found while fixing the migration/version gate (#3451). Same shape, different layer.
What is true today
Eight Repair steps import a register descriptor through
ConfigurationService::importFromApp(..., version: ...), whose gate isversion_comparewithforce: false. The version each one passes is ahand-written PHP constant, not the descriptor's own
info.version:Two numbers describing one artefact, kept in step by hand. Measured on
developmentat 229a04d, three of the nine (descriptor, version) pairs havealready drifted:
info.versionImportCredentialBrokerRegister1.0.01.4.0ImportDsarRegisters→data_subject_request_register.json1.2.01.0.0ImportDsarRegisters→dsar_policy_pack_register.json1.1.01.0.0Note they drift in both directions, which is what says this is a maintenance
gap rather than one forgotten edit.
Why it matters
info.versionisdecorative on that path — so editing the JSON and bumping the version inside it
changes nothing about whether the change reaches an existing instance.
info.versionis not decorative everywhere:RegisterDescriptorService::inventory()reads descriptor versions to decidecurrentvsbehindfor the admin panel. The panel and the importer cantherefore disagree about which version an instance is on, in either direction.
hash since Added property close-after-click to every NcActionButton #426), which removes the worst case. The per-register and
per-schema gates inside
ImportHandler(L844, L998, L1873, L2872, L3491)still compare versions with no content-diff escape — the dossiq#1786 shape:
the code moves, the version does not, the change never lands.
What this needs, and why it is not in #3451
A ruling first, then a mechanism. Three candidate numbers exist per descriptor
(the PHP constant,
info.version, and each register's/schema's ownversion),and deciding which is canonical is a design decision, not a gate:
$data['info']['version']. Onenumber. Note this changes behaviour for the credential broker: its gate value
would move
1.0.0→1.4.0, which re-imports the descriptor on the nextupgrade. That is the correct direction (the content did change), but it is a
behaviour change and wants its own verification.
repair step's version equals its descriptor's
info.version. Reds today onthe three rows above; the fix is three one-line edits.
largest change.
Option 2 is the cheapest thing that stops the drift growing; option 1 or 3 is the
thing that ends it.
Reproduce the measurement
ImportDsarRegistersholds its pairs in aREGISTERSconst map rather than twoconstants, so it needs reading by hand.
Refs #3451