Skip to content

style(SAPEREGradient): simplify gradient processing and enhance readability#5313

Merged
DanySK merged 2 commits intomasterfrom
style/saperegradient/simplifygradientpro
Apr 28, 2026
Merged

style(SAPEREGradient): simplify gradient processing and enhance readability#5313
DanySK merged 2 commits intomasterfrom
style/saperegradient/simplifygradientpro

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 13:52
@DanySK DanySK enabled auto-merge (squash) April 28, 2026 13:52
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

This PR refactors the neighborhood gradient discovery logic in SAPEREGradient to make gradient processing more readable by extracting helper methods from a large procedural block.

Changes:

  • Refactored GradientSearch.execute by extracting match preparation, variable binding, compatibility checks, and candidate update logic into dedicated private methods.
  • Simplified control flow with early exits and helper predicates for threshold/compatibility checks.

@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 (c38e869) to head (94d9a0b).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5313   +/-   ##
=========================================
  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 requested a review from Copilot April 28, 2026 16:29
@DanySK
Copy link
Copy Markdown
Member Author

DanySK commented Apr 28, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DanySK DanySK force-pushed the style/saperegradient/simplifygradientpro branch 2 times, most recently from c459ab4 to 9bfc521 Compare April 28, 2026 18:50
DanySK and others added 2 commits April 28, 2026 22:53
…model/sapere/reactions/SAPEREGradient.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DanySK DanySK force-pushed the style/saperegradient/simplifygradientpro branch from 9bfc521 to 94d9a0b Compare April 28, 2026 20:53
@sonarqubecloud
Copy link
Copy Markdown

@DanySK DanySK merged commit 7e1cc10 into master Apr 28, 2026
28 checks passed
@DanySK DanySK deleted the style/saperegradient/simplifygradientpro branch April 28, 2026 23:03
DanySK pushed a commit that referenced this pull request Apr 29, 2026
## [43.0.43](43.0.42...43.0.43) (2026-04-29)

### Dependency updates

* **core-deps:** update protelis to v18.8.1 (patch) ([#5310](#5310)) ([3e92b8a](3e92b8a))
* **core-deps:** update react to v2026.4.14-19.2.5 (patch) ([#5322](#5322)) ([59cf000](59cf000))
* **deps:** update dependency org.danilopianini.gradle-java-qa:org.danilopianini.gradle-java-qa.gradle.plugin to v1.175.0 ([#5309](#5309)) ([b7c3933](b7c3933))
* **deps:** update gradle to v9.5.0 ([#5315](#5315)) ([72ef7c4](72ef7c4))
* **deps:** update plugin gitsemver to v7.0.18 ([#5314](#5314)) ([886c6c2](886c6c2))
* **deps:** update plugin org.danilopianini.gradle-pre-commit-git-hooks to v2.1.16 ([#5320](#5320)) ([3d6385b](3d6385b))
* **deps:** update plugin publishoncentral to v9.2.2 ([#5321](#5321)) ([3a5c02a](3a5c02a))

### Documentation

* **deps:** update gohugoio/hugo action to v0.161.0 ([#5316](#5316)) ([c38e869](c38e869))

### General maintenance

* **build:** update the javadoc.io cache ([1cdef2b](1cdef2b))
* **build:** update the javadoc.io cache ([cd476f3](cd476f3))

### Style improvements

* **cognitive-agents:** drop useless parenthesis in `TestSteeringBehaviors` ([#5319](#5319)) ([4333dec](4333dec))
* **SAPEREGradient:** simplify gradient processing and enhance readability ([#5313](#5313)) ([7e1cc10](7e1cc10))
@DanySK
Copy link
Copy Markdown
Member Author

DanySK commented Apr 29, 2026

🎉 This PR is included in version 43.0.43 🎉

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