Skip to content

Fix : Wrong root network node maked as built after voltage init modifications#989

Merged
ayolab merged 3 commits into
mainfrom
ayolab/fix-wrong-root-network-node-built-after-voltage-init
May 13, 2026
Merged

Fix : Wrong root network node maked as built after voltage init modifications#989
ayolab merged 3 commits into
mainfrom
ayolab/fix-wrong-root-network-node-built-after-voltage-init

Conversation

@ayolab
Copy link
Copy Markdown
Contributor

@ayolab ayolab commented May 12, 2026

In insertVoltageInitModifications : Modification application contexts are filtered to the target root network but results were indexed against the full root network list, always attributing the built status to the first root network instead of the one voltage init was applied on.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7fba17bd-0404-4910-a18c-63b7371b872e

📥 Commits

Reviewing files that changed from the base of the PR and between aea67e9 and 922302e.

📒 Files selected for processing (1)
  • src/main/java/org/gridsuite/study/server/service/StudyService.java

📝 Walkthrough

Walkthrough

StudyService.insertVoltageInitModifications now extracts the first present modification result from networkModificationResults.modificationResults() and emits impacts for the supplied rootNetworkUuid instead of iterating over results with an index mapped to studyRootNetworkEntities.

Changes

Voltage-init impact notification

Layer / File(s) Summary
Voltage-init impact notification refactor
src/main/java/org/gridsuite/study/server/service/StudyService.java
The single modification result branch was refactored to extract the first present result from networkModificationResults.modificationResults() and call emitNetworkModificationImpacts(studyUuid, nodeUuid, rootNetworkUuid, result), replacing the previous indexed iteration mapping optional results to studyRootNetworkEntities.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the bug being fixed: a wrong root network node being marked as built after voltage init modifications.
Description check ✅ Passed The description is directly related to the changeset, explaining the indexing mismatch bug and how the PR addresses it by filtering modification results to the target root network.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.42.2)
src/main/java/org/gridsuite/study/server/service/StudyService.java

[]

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…ications

Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
@ayolab ayolab force-pushed the ayolab/fix-wrong-root-network-node-built-after-voltage-init branch from 5af5ff8 to 7f267ff Compare May 12, 2026 12:39
@ayolab ayolab requested a review from SlimaneAmar May 12, 2026 12:43
@SlimaneAmar SlimaneAmar requested a review from dbraquart May 13, 2026 08:15
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@dbraquart dbraquart left a comment

Choose a reason for hiding this comment

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

code: ok
tests: ok (with 2 and 3 root networks)

@ayolab ayolab merged commit db039e8 into main May 13, 2026
4 checks passed
@ayolab ayolab deleted the ayolab/fix-wrong-root-network-node-built-after-voltage-init branch May 13, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants