Skip to content

fix(manifest): never suppress an escaping subprojectDir's own facts generation - #1485

Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 2 commits into
v1.xfrom
jfblaa/rea-706-socket-cli-dont-suppress-facts-generation-for-a-build-root
Aug 6, 2026
Merged

fix(manifest): never suppress an escaping subprojectDir's own facts generation#1485
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 2 commits into
v1.xfrom
jfblaa/rea-706-socket-cli-dont-suppress-facts-generation-for-a-build-root

Conversation

@jfblaa

@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Recursive build-root discovery (generate-recursive-manifests.mts) and the interactive socket manifest setup --dynamic-sbom-inference wizard's own coverage tracker (setup-recursive-manifest-config.mts's markWorkspaceCoverage) both track per-ecosystem coverage from each root's own projects[].subprojectDir, to avoid re-invoking the build tool (or re-prompting) for a nested reactor member already discovered.
  • Neither distinguished a genuinely nested member from one that merely escapes the declaring reactor's own directory (e.g. Maven's <module>../shared-lib</module>, or a Gradle projectDir relocation onto a sibling directory) — so whether the escaping directory got its own independent treatment depended purely on alphabetical discovery order relative to the reactor(s) referencing it.
  • Fix (applied to both call sites): only mark a discovered subprojectDir as covered when it's a genuine descendant of the declaring reactor's/candidate's own directory. An escaping subprojectDir is never suppressed, regardless of discovery order.

Linear: REA-706 (related: REA-705)

Test plan

  • generate-recursive-manifests.test.mts: it.each test covering both alphabetical orderings (a sibling directory sorting before and after the reactor that references it) — proves the fix is order-independent, and fails without it.
  • setup-recursive-manifest-config.test.mts: equivalent test for markWorkspaceCoverage, also fails without the fix.
  • pnpm test:unit across src/commands/manifest — 199/199 pass
  • pnpm run check:tsc clean
  • pnpm run lint clean

…eneration

A subprojectDir that escapes its declaring reactor's own directory (e.g.
Maven's <module>../shared-lib</module>, or a Gradle projectDir relocation)
was previously marked covered like any nested member, so whether it got its
own independent facts generation depended purely on alphabetical discovery
order relative to the reactor(s) that reference it. Such a path is
independently locatable and potentially resolved differently on its own
(e.g. a dependency version override the referencing reactor applies but a
standalone build of the same directory would not), so it's a distinct,
meaningful data point, not a redundant one. Only a genuine descendant of the
reactor's own directory is now treated as covered.
… wizard's coverage tracker

markWorkspaceCoverage (the interactive `socket manifest setup --dynamic-sbom-inference`
wizard's own reactor-coverage tracker) had the identical bug as
generateRecursiveManifests: a subprojectDir escaping its declaring
candidate's own directory was marked covered unconditionally, so an
escaping sibling could be silently skipped rather than offered its own
socket.json entry, depending on discovery order. Same fix: only mark a
subprojectDir covered when it's a genuine descendant of the candidate
directory that declared it.
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) merged commit 1302b3d into v1.x Aug 6, 2026
10 of 12 checks passed
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) deleted the jfblaa/rea-706-socket-cli-dont-suppress-facts-generation-for-a-build-root branch August 6, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants