Three minor items found during code review of #6718 (RuleBody descriptor redesign). None affect correctness for current tests.
1. Code duplication: subscribeWithFilter / subscribeWithFilters
BruteForceCompiledEngine and ReteEngine each have their own copy of subscribeWithFilter() and subscribeWithFilters(). Extract to a shared package-private utility (BetaProcessorWiring or similar).
2. Right-side multi-filter asymmetry in 2-pattern path
BruteForceCompiledEngine.wireHead() 2-pattern path uses findAlphaFilterPredicate() (returns only the first alpha constraint) for the right-side inlet. If a Pattern has multiple arity-1 LambdaConstraints, only the first applies to the right inlet. Left side uses subscribeWithFilters() (applies all). Fix to use subscribeWithFilters() consistently for both sides.
3. Pre-existing: RuleUnitChangeSet.remove() calls removed.remove(rule) instead of removed.add(rule)
RuleBaseModifier.java line ~157: removed.remove(rule) should be removed.add(rule) for the remove-tracking Set to work correctly. Pre-existing before #6718 but noted during review.
Refs #6718
Three minor items found during code review of #6718 (RuleBody descriptor redesign). None affect correctness for current tests.
1. Code duplication: subscribeWithFilter / subscribeWithFilters
BruteForceCompiledEngineandReteEngineeach have their own copy ofsubscribeWithFilter()andsubscribeWithFilters(). Extract to a shared package-private utility (BetaProcessorWiringor similar).2. Right-side multi-filter asymmetry in 2-pattern path
BruteForceCompiledEngine.wireHead()2-pattern path usesfindAlphaFilterPredicate()(returns only the first alpha constraint) for the right-side inlet. If a Pattern has multiple arity-1 LambdaConstraints, only the first applies to the right inlet. Left side usessubscribeWithFilters()(applies all). Fix to usesubscribeWithFilters()consistently for both sides.3. Pre-existing:
RuleUnitChangeSet.remove()callsremoved.remove(rule)instead ofremoved.add(rule)RuleBaseModifier.javaline ~157:removed.remove(rule)should beremoved.add(rule)for the remove-tracking Set to work correctly. Pre-existing before #6718 but noted during review.Refs #6718