Repository navigation
refactor(rules): decision tables live in OpenRegister's decision-tables register (decision 196) - #1100
Merged
rubenvdlinde merged 4 commits intoOct 12, 2026
Conversation
…es register (decision 196)
A rule set's decision table is stored in OpenRegister's register under
buildiq.<organisation>.<rule-set-slug> and read through its DecisionTableStore.
DecisionTableShape maps buildiq's authoring shape onto the stored shape and
back; the editor saves through PUT /api/rules/{slug}/decision-table (admin).
buildiq's DecisionTable schema and RuleEngineService::DECISION_TABLE_SCHEMA
are gone; repair step MoveDecisionTablesToOpenRegister moves existing tables
and then renames the old schema's slug. Needs openregister#4572.
Contributor
Quality Report — ConductionNL/buildiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| check-gitignore | ✅ | ||||
| check-nc-floor | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 109/109 | |||
| npm | ✅ | ✅ 742/742 | |||
| 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-11 09:03 UTC
Download the full PDF report from the workflow artifacts.
Contributor
Quality Report — ConductionNL/buildiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| check-gitignore | ✅ | ||||
| check-nc-floor | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 109/109 | |||
| npm | ✅ | ✅ 742/742 | |||
| 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-12 10:10 UTC
Download the full PDF report from the workflow artifacts.
…ion-tables-onto-openregister
Contributor
Quality Report — ConductionNL/buildiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| check-gitignore | ✅ | ||||
| check-nc-floor | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 109/109 | |||
| npm | ✅ | ✅ 742/742 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ 1395/1395 (no test failed, the job failed for another reason — see its log) | ||||
| Newman | ✅ 266/266 · 1 skipped | ||||
| 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-12 13:20 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.
Decision 196 (Ruben, against the recommendation): OpenRegister owns the schema slug
decision-table, and buildiq's rule engine migrates onto OpenRegister's stored decision tables.Lands together with ConductionNL/openregister#4572 (the
decision-tablesregister andDecisionTableStore) and ConductionNL/.github#840 (gate 106 contract:decision-tableowned byopenregister). Without #4572 the classOCA\OpenRegister\Service\Dmn\DecisionTableStoredoes not exist and the rule engine cannot be constructed. Order: .github first, then #4572 and this PR.What changes
StoredDecisionTables: a rule set's table is held in OpenRegister'sdecision-tablesregister underbuildiq.<organisation>.<rule-set-slug>and read throughDecisionTableStore::find(). A shipped seed uses the shared keybuildiq.<rule-set-slug>, read as a fallback. The store reads across organisations, so the tenant boundary (REQ-BRE-007) moves into the key: a table is only reached through a rule set the caller's organisation resolves.DecisionTableShape: maps buildiq's authoring shape (input columns withexpressionPath, rules asconditionsandvaluesmaps) onto OpenRegister's stored shape (positionalinputEntriesandoutputEntries, cells in the shared grammar, upper-case hit policy) and back. It keeps the expression paths, the defaults, the labels and the priorities. A value name that no output column declares becomes an output column.RuleEngineServiceandRulesController::schemaread the table through it.RuleEngineService::DECISION_TABLE_SCHEMAis removed.PUT /api/rules/{ruleSetSlug}/decision-table(admin only, the sameisInGroup('admin')guard asSettingsController::update). The editor saves through it. If OpenRegister's validator refuses the table, the endpoint answers 422 with the reason.MoveDecisionTablesToOpenRegister(beforeInitializeSettings) moves every row of the olddecision-tableschema into OpenRegister's register under its rule set's key. It skips any key that is already held. Only when every table moved does it rename the old schema's slug tobuildiq-decision-table-moved, so the import's global slug lookup finds only OpenRegister's schema. It deletes nothing and never throws. If OpenRegister's register is not there yet, it moves nothing and retries on the next upgrade.DecisionTableschema is removed fromregister.d/10-business-rules.jsonandopenbuild_register.json. Theloan-eligibilityseed table now targets OpenRegister's register in the stored shape.decision-tables-live-in-openregister.Verified
logs/buildiq-red.log): 35 tests, 31 errors (the new classes did not exist), 1 failure (the fragment still declaredDecisionTable).DecisionTableValidator,DecisionTableEvaluator, and thedecision-tableschema fragment through Opis, all from #4572's tree):==,*,anyand bare-range dialects and a COLLECT table, against 12 payloads) give the same result and the same triggered rule before and after the move..vuefile.composer check:strictwas not run: no check slot started within 10 minutes, so targeted checks were run instead. CI is the full check.Known consequences
Still owed (live instance)
After #4572 and this PR are installed, run
occ upgrade. Then check thatGET /apps/openregister/api/objects/decision-tables/decision-tablelists the moved tables (owner: buildiq) and thatPOST /apps/buildiq/api/rules/loan-eligibility/evaluateanswers as before.