Skip to content

refactor(sapere): extract match creation and filtering logic into separate methods#5318

Merged
DanySK merged 2 commits intomasterfrom
refactor/sapere/extractmatchcreationandf
Apr 30, 2026
Merged

refactor(sapere): extract match creation and filtering logic into separate methods#5318
DanySK merged 2 commits intomasterfrom
refactor/sapere/extractmatchcreationandf

Conversation

@DanySK
Copy link
Copy Markdown
Member

@DanySK DanySK commented Apr 28, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 28, 2026 16:48
@DanySK DanySK enabled auto-merge (squash) April 28, 2026 16:48
@DanySK DanySK force-pushed the refactor/sapere/extractmatchcreationandf branch from c729988 to 7da572c Compare April 28, 2026 16:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the SAPERE LsaNeighborhoodCondition to split the match-creation and match-filtering logic into dedicated helper methods, improving readability and separation of concerns inside the condition evaluation pipeline.

Changes:

  • Extracted initial match creation into createInitialMatches(...).
  • Extracted filtering of existing matches into filterExistingMatches(...).
  • Further split existing-match filtering into selected-node vs non-selected-node branches.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.53%. Comparing base (59559e5) to head (10dd3ce).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5318   +/-   ##
=========================================
  Coverage     61.53%   61.53%           
  Complexity       14       14           
=========================================
  Files             2        2           
  Lines            78       78           
  Branches          4        4           
=========================================
  Hits             48       48           
  Misses           24       24           
  Partials          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DanySK DanySK force-pushed the refactor/sapere/extractmatchcreationandf branch 10 times, most recently from 6839fdc to 75b4b91 Compare April 29, 2026 22:09
DanySK and others added 2 commits April 30, 2026 01:56
…model/sapere/conditions/LsaNeighborhoodCondition.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DanySK DanySK force-pushed the refactor/sapere/extractmatchcreationandf branch from 75b4b91 to 10dd3ce Compare April 29, 2026 23:56
@sonarqubecloud
Copy link
Copy Markdown

@DanySK DanySK merged commit eec1c07 into master Apr 30, 2026
28 checks passed
@DanySK DanySK deleted the refactor/sapere/extractmatchcreationandf branch April 30, 2026 02:19
DanySK pushed a commit that referenced this pull request Apr 30, 2026
## [43.0.45](43.0.44...43.0.45) (2026-04-30)

### Dependency updates

* **deps:** update dependency org.danilopianini.gradle-kotlin-qa:org.danilopianini.gradle-kotlin-qa.gradle.plugin to v1.6.1 ([#5323](#5323)) ([249a798](249a798))

### Bug Fixes

* **incarnation-sapere:** validate chemotaxis argument explicitly ([#5326](#5326)) ([93a9f5b](93a9f5b))

### Tests

* **cognitive-agents:** replace unsafe map assertions in steering tests ([#5327](#5327)) ([d4c43d4](d4c43d4))

### General maintenance

* **build:** update the javadoc.io cache ([d2571fd](d2571fd))

### Refactoring

* **sapere:** extract match creation and filtering logic into separate methods ([#5318](#5318)) ([eec1c07](eec1c07))
* **sapere:** simplify execution logic in SAPEREReaction ([#5317](#5317)) ([0b71e90](0b71e90))
@DanySK
Copy link
Copy Markdown
Member Author

DanySK commented Apr 30, 2026

🎉 This PR is included in version 43.0.45 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants