Skip to content

Conversation

@achour94
Copy link
Contributor

PR Summary

This pull request introduces several enhancements to the management of modification reports in the study server, focusing on robust report inheritance, safe deletion, and improved report reuse. The changes ensure that reports are not accidentally deleted when nodes are invalidated, support distinguishing between inherited and new reports, and optimize report lookup logic for efficiency and correctness.

Key changes include:

Report Inheritance & Management

  • Added support in BuildInfos for tracking both newly generated reports (reportsInfos) and inherited reports (inheritedReportsInfos), along with methods to add inherited reports and retrieve all reports as a single map. This prevents premature deletion of reports referenced by descendant nodes.
  • Implemented logic in NetworkModificationTreeService to inherit reports from the nearest built ancestor node when building a new node, ensuring proper report reference propagation.
  • Updated the node build process in StudyService to store both new and inherited reports for each node, ensuring the full report set is persisted.

Report Uniqueness, Reuse & Safety

  • Added logic to find and reuse existing report UUIDs across all nodes in the root network, avoiding duplicate report creation.
  • Introduced safety checks in RootNetworkNodeInfoService to identify which reports can be safely deleted (i.e., not referenced by other nodes) during node invalidation, using new repository queries for efficient reference checks.

Data Model Improvements

  • Extended ReportInfos to include a ReportMode (either APPEND or REPLACE), with a default for backward compatibility, and introduced the ReportMode enum.

@achour94 achour94 self-assigned this Nov 13, 2025
@sonarqubecloud
Copy link

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.

2 participants