Repository navigation
feat(manifest): configure and skip single builds for --dynamic-sbom-inference - #1721
Conversation
…nference Discovery now decides what to build from what each build loads, in any order, and settings can target one build. - socket.json settings cascade from every directory up to the filesystem root, and `defaults.manifest.builds["<build file>"]` applies to that build alone, after the cascade. - A build skipped under its own name is loaded without resolving anything, and what it loads is skipped with it. A directory skip loads nothing; a nearer socket.json can turn builds back on. - A module outside its reactor's directory is built only inside the reactor; a run a later build turns out to include is dropped and its facts file restored. - A Gradle or sbt build nested in another runs on its own; a failure holds back only the builds in and beneath its directory, and is excused when a kept or skipped build loads it. - `socket manifest setup --dynamic-sbom-inference` asks about each build (leave, configure, skip), offers to fix a build it cannot load before a directory skip, and writes nothing until the user confirms. - docs/dynamic-sbom-inference-settings.md documents the settings for anyone, or any agent, writing them by hand.
PR SummaryMedium Risk Overview Discovery was reworked around what each build loads (dirs + files), not just covered paths: reactor modules outside their folder are built only in the reactor; redundant runs are dropped and facts files restored; Gradle/sbt settings-level nested builds can run separately when they load more than the parent. Failures abort only builds in/under the failed root and can be ignored when another build already loads them.
Reviewed by Cursor Bugbot for commit 4f2c82b. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4f2c82b. Configure here.
…e skip settings A build covered by a kept build was reported as skipped when a skipped build also loaded it, or when its own entry skipped it, if only the full coverage check (a .NET solution's projects) showed the kept build covers it.
Martin Torp (mtorp)
left a comment
There was a problem hiding this comment.
Reviewed commit 023a21a with Dale's review and an independent critique pass. The six P2 findings are attached as inline comments, with implementation context, concrete triggers, and suggested fixes.
Validation used focused reproductions against the reviewed source with controlled build output or prompt responses. The sidecar regression was also compared with the base revision. No full test suite, real Maven or Gradle build, Coana analysis, or upload was run.
…wizard set every build's own settings - Runs writing one facts file form a chain: dropping one restores the previous run's facts and sidecar entry together, never a kept run's. - A dropped run's facts file that no kept run owns is reported, and scan create, reach and fix leave it out of the files they collect. - A Gradle or sbt entry applies only when it names a build file that exists; two entries for one build are an error, and the wizard writes to the one the build already has. - The wizard asks about the builds in its own directory like any other, offering their own skips back. - Configuring a build drops a field the user leaves to its default. - Move the settings docs URL next to its only use.
…alidate builds entries up front - Each run's output is kept aside, so a later run writing the same facts file through Gradle's `-p` restores the kept run's own facts when dropped, not its own. - Two entries for one build fail when socket.json is read, before any build runs. - The wizard keeps the defaults prompt for a build here that has its own entry, which would override defaults set from its prompt. - `fix` removes a discarded facts file a dropped run left behind.
- Each run's facts and sidecar entry are saved aside and the original put back; kept runs are written when the walk ends, so dropping a run no longer needs a restore chain. - The resolver memoizes each build's settings and shares one entry-key lookup with validation. - The wizard's build review returns its decision and the caller loads it, and one predicate decides whether settings go in a build's own entry.

Heads up, reviewer
Dynamic sbom inference in
socket-clirequires identifying project 'roots' in order to evaluate projects appropriately.For example, a project may have root
./pom.xmlwhich has submodules./a/pom.xmland./b/pom.xml.If users wish to (for whatever reason) opt out generating dynamic sbom for the project,
socket-clicurrently has no good way of finding out that./a/pom.xmland./b/pom.xmlare part of the same project, and in many cases,./a/pom.xmland./b/pom.xmlcannot be evaluated on their own.This PR seeks to improve that, but better aligning project discovery with how the build-tools actually behave.
This also fixes a number of edge-cases issues in the current, directory-guided discovery.
Claude Code · claude-opus-5-5
--dynamic-sbom-inferencenow decides which builds to run from what each build loads, whatever order directories are visited in, and lets users configure or skip a single build without hand-editingsocket.json. Design walkthrough, aimed at readers new to this: Build Root Discovery.What users see
socket manifest setup --dynamic-sbom-inferenceasks about each build no other build includes: leave as-is, configure, or skip. Skipping a build Socket can load skips it and exactly what it loads, leaving the builds beside and beneath it alone.pom.xmlcan be skipped whilepom-alt.xmlbeside it is built.docs/dynamic-sbom-inference-settings.mddocuments the settings for anyone, or any agent, writing them by hand. Scan failures link to it and to the wizard.Settings model
socket.jsonfrom the filesystem root down to a build's directory applies, nearest field wins. This reverses the earlier boundary at the scan directory.defaults.manifest.builds["<build file>"]in a build's own directory holds settings for that build alone, applied after the cascade.builds[...].disabled: trueskips the build and what it loads: the scan loads it, resolving nothing, and fails if it can't. A section-leveldisabledskips the directory and everything beneath it without loading anything; a nearerdisabled: falseturns builds back on.Discovery behaviour changes
<module>../core</module>) is built only inside the reactor. This reverses REA-706's standalone build of such modules, as agreed.project/, nested in another build, runs on its own and is dropped if the outer build loads everything it loads.Testing
pnpm run checkpasses. In the fullpnpm test:unitrun, theloginandwrappersmoke tests time out under load and pass when run alone.../module layout that fails today now passes; per-build skips with modules; a directory skip with a nested re-enable; an unloadable skipped build failing with the fix named; a nested Gradle settings build covering its own subproject; and the wizard driven through all of its prompts.Known gaps and follow-ups
socket manifest mavenand the other single-build commands, and--auto-manifest, don't readbuildsentries yet.generateRecursiveManifestsrestoresprocess.exitCodewhen a later build excuses a failure, becauserunManifestFactssets it and the single-build commands rely on that.