Let a module opt out of the redundant stated IsA policy - #2
Open
dionmcm wants to merge 1 commit into
Open
Conversation
dionmcm
force-pushed
the
ext/redundant-isa-core-module
branch
from
August 29, 2026 05:20
f6f7a97 to
e2b1b6a
Compare
Redundantly-stated IsA is an editorial policy, and not every edition has adopted it. AMT and AU clinical content state both an AMT parent and the international top parent it sits under, deliberately. It is not confined to the drug hierarchy, so a semantic-tag exemption is the wrong shape for it. The rule now fires for every module except those listed under redundant-isa-exempt-modules in the test resources. An edition that lists nothing - which is every edition until it chooses otherwise - gets exactly the behaviour this rule had before the key existed. An extension whose maintainers do want the policy keeps it, which scoping the rule to core modules would have taken away from them. Requires isInNamedSet on DescriptionService. Measured over a 722,404-concept edition, rule sets common-authoring,au-authoring: key absent 352,500 findings, byte-identical to unmodified rules key = AU 346,263 findings, 6,237 dropped, 0 added Every one of the 6,237 is on the module named in the key. The 287 findings on inherited international core-module concepts are all still reported.
dionmcm
force-pushed
the
ext/redundant-isa-core-module
branch
from
August 29, 2026 06:46
e2b1b6a to
d116d13
Compare
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.
Redundantly-stated IsA is an editorial policy, and not every edition has adopted it.
AMT and AU clinical content state redundant IsA relationships because they do not follow the proximal primitive modelling pattern - this has been discussed many times, there are pros and cons and it is a design choice.
Currently the rules don't enable this design choice, reporting it as failures.
Change
The rule fires for every module except those listed under
redundant-isa-exempt-modulesin the test resources.Behaviour is unchanged for any module not listed in this resource. This allows extensions to optionally opt out of this rule for just their module content while still allowing the rule to run where it should.
Depends on
isInNamedSetThe rule needs a way to read a set of module ids from reference data. Rules can currently reach that store only through
isSemanticTagCompatibleWithinHierarchy, which extracts a semantic tag from a term first, so a module id cannot go through it.isInNamedSetonDescriptionServiceis the companion change. It is defaulted so implementations outside the project keep compiling, and the default answersfalseso this rule keeps firing everywhere on any implementation that has not adopted it.This means the rule cannot be merged before a release carrying
isInNamedSet. A rule calling a method the deployed engine does not have fails at KieBase build, which takes down the whole rule set rather than this one rule.Verification
722,404-concept edition, rule sets
common-authoring,au-authoring, same reference data both times except for the one added line:redundant-isa-exempt-modules=32506021000036107Every one of the 6,237 is on the module named in the key. The 287 findings on inherited international core-module concepts are all still reported.
The dropped set is identical to the set the core-module version dropped, so the change in mechanism costs nothing in outcome for this edition.
Test cases
The rule directory's
test-cases.jsonhad emptyassertConceptsPassandassertConceptsFailarrays so no coverage. Added a fixture - a grandparent, a parent stated under it, and a concept on an extension module stating both.redundant-isa-exempt-moduleskey, the rule fires. That is the safety property, tested.RulesTestManualruns 109 rule directories, all pass with this change.This needs
TestDescriptionService.isInNamedSet, which is part of the engine PR - without it the rig only ever sees the interface default and no named-set rule can be tested configured.