Skip to content

fix: enhance grouping logic to preserve orphaned sub-techniques and prevent duplication#229

Merged
jondricek merged 3 commits intomainfrom
fix-changelog-helper-add-revoked
Apr 24, 2026
Merged

fix: enhance grouping logic to preserve orphaned sub-techniques and prevent duplication#229
jondricek merged 3 commits intomainfrom
fix-changelog-helper-add-revoked

Conversation

@jondricek
Copy link
Copy Markdown
Contributor

This pull request improves the robustness of the get_groupings method in changelog_helper.py to ensure that orphaned child objects are properly preserved and that children are not duplicated in groupings. It also adds new tests to verify this behavior, particularly in edge cases involving missing relationships or partial data.

Enhancements to grouping logic:

  • Modified get_groupings to track all child objects that are assigned to groupings, preventing duplicate inclusion of children when handling orphans or partial bundles. This ensures that children already grouped under a parent are not re-added by fallback logic.
  • Improved handling of orphaned children by adding a fallback that emits any child not included in a previous grouping as its own standalone entry, covering cases where relationships are missing or bundles are malformed.

Testing improvements:

  • Added tests to ensure orphaned sub-techniques remain visible when no relationship exists, and to verify that children already grouped under a parent are not duplicated by fallback handling.

@sonarqubecloud
Copy link
Copy Markdown

@jondricek jondricek merged commit 1b95cfe into main Apr 24, 2026
4 checks passed
@jondricek jondricek deleted the fix-changelog-helper-add-revoked branch April 24, 2026 13:30
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