Repository navigation
fix(manifest): keep Maven dependencies left under a sibling's test-jar - #1684
Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Conversation
A module that reaches a sibling through both its jar and its test-jar shares one node for both, but Maven can keep the sibling's dependencies under the test-jar alone. The walk visited each node once, so it skipped that subtree and the dependencies were missing from the SBOM. Key the visited set by the full coordinate instead.
Jeppe Fredsgaard Blaabjerg (jfblaa)
marked this pull request as ready for review
November 1, 2026 09:22
Oskar Haarklou Veileborg (BarrensZeppelin)
approved these changes
Nov 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM Description written by Claude Code:claude-opus-5-5
REA-1055. Maven facts dropped a module's dependencies when it reached a sibling through both its jar and its test-jar and Maven kept those dependencies under the test-jar only. The walk now visits each artifact once instead of each node.
Tested:
run-compat.sh maven(3.2.5 to 4.0.0-rc-6). The fixture adds this shape (app→mid→lib, pluslib's test-jar); its new check fails onv1.x.🤖 Generated with Claude Code
Note
Medium Risk
Changes Maven dependency-tree emission logic used for SBOMs and reachability; scope is narrow (visit deduplication) but incorrect graphs would affect scan completeness.
Overview
Fixes Maven Socket facts / SBOM generation dropping transitive dependencies when a reactor module is reachable through both its normal jar (e.g. via another module) and its test-jar, and Maven attaches those transitives only under the test-jar node.
In
SocketFactsRecordsEngine.visit, deduplication for the graph walk now keys thevisitedset onexternalId(full coordinate, including type) instead of the emitted node id. Reactor siblings still use bare ids for records, but jar and test-jar paths can both be walked so children recorded only on the test-jar branch (such asdemo.ext:libdepunderlib) are merged into the same internal component.The maven-compat fixture adds
mid→lib,lib→libdep, andapp’s test-scopedlibtest-jar; smoke tests assertlibdepappears in app’s graph and document the scenario in CHANGELOG.Reviewed by Cursor Bugbot for commit c4ca3eb. Configure here.