Repository navigation
feat(manifest): ask for the reachability settings in the setup wizards - #1729
Conversation
08f14b1 to
bc39c00
Compare
bc39c00 to
78fadc7
Compare
PR SummaryLow Risk Overview The wizards ask whether to compile before reachability ( Invalid or tool-incompatible Changelog and broad unit/integration tests cover inheritance, overrides, validation, and write behavior. Reviewed by Cursor Bugbot for commit 78fadc7. Configure here. |
78fadc7 to
14db272
Compare
14db272 to
8e07fbd
Compare
8e07fbd to
f245568
Compare
f245568 to
d957ff9
Compare
244ddca to
283e6d4
Compare
3940e77 to
b450712
Compare
128c0c7 to
f8ffcf8
Compare
f8ffcf8 to
eb97ffa
Compare
eb97ffa to
3bbe3fe
Compare
Oskar Haarklou Veileborg (BarrensZeppelin)
left a comment
There was a problem hiding this comment.
[agent] The inline comments are simplification opportunities in the wizard code; none of them is a correctness issue. The comments on the tool === 'dotnet' choice, validReachability and effectiveValue amount to one change: drive the step from #1728's field table and one parse. The comment on configureBuild's call is the change that touches both wizards.
Checked and dropped:
- Speed: the ancestor socket.json lookup runs once per run, and the
draftCascadecall insetupRootDefaults's loop runs at most once per tool. confirmandaskYesNocan't replace the new selects, because they can't show the inherited value in each choice's description.cascadedReachabilitycan't replaceinheritedReachabilityOf: it throws on invalid values and drops nulls, but the wizard needs the raw values.
b7963a3 to
fc3ea0d
Compare
`socket manifest setup` and `socket manifest setup --dynamic-sbom-inference` ask, for each build tool that generates facts: - whether to build the project before reachability analysis. A no writes "none" only to override an inherited "compile", and otherwise leaves the setting unset; - Maven, Gradle and sbt: whether to use a different JDK for the analysis, showing the one in effect, inherited or not; - .NET: whether to start a framework-dependent build's analysis on a given runtime, taking major.minor or major.minor.patch[-prerelease]. The wizards read socket.json as written, so they run under an invalid reachability value: they warn about what a build tool cannot take and replace it with the answers, and ignore an invalid inherited value for their defaults.
`socket manifest setup --dynamic-sbom-inference` wrote every accepted default of a directory's section into its socket.json, so accepting an inherited reachability value pinned it there. It now keeps only the fields that differ from what the directory inherits, as it does for a build.
Answering no to a different JDK in a directory under a socket.json that sets one writes nothing, and the scan there reads the parent's JDK; answering yes with a blank JDK writes null, and the scan reads none.
The step asks about each field the tool takes, from the table the scan checks, and reads both its own and the inherited value through the same parse, so it no longer filters them twice. The value in effect is the merge a scan makes. A blank answer writes null only when there is a value to clear, and the .NET runtime version format is written once.
The parent of / is / itself, so the cascade a socket.json there was compared against held its own settings, and the wizard dropped every field it kept as inherited.
The warning takes the parse's problems, the step's options keep one local type, and what a directory inherits is its chain without its own socket.json, which needs no case for the filesystem root.
Only dynamic SBOM inference scans read them, so plain `socket manifest setup` no longer asks. The recursive wizard runs the step after each build tool's questions with the settings in effect and what they inherit, and writes only what differs from the inherited value, for directory defaults as for builds. A value that equals the inherited one is labelled as inherited, and an invalid inherited value is named, to be fixed in the socket.json that sets it.
fc3ea0d to
19f7150
Compare
Oskar Haarklou Veileborg (BarrensZeppelin)
left a comment
There was a problem hiding this comment.
LGTM ✅
Heads up, reviewer
Update wizard to configure reachability settings 🧙♂️
LLM Description written by Claude Code:claude-opus-5-5
socket manifest setup --dynamic-sbom-inferenceasks for #1728'sreachabilitysettings for each build and directory default it configures, so they can be set without editing socket.json by hand. Plainsocket manifest setupdoesn't ask, as only dynamic SBOM inference reads them.Merges with the stack. The Coana release it needs is pinned on v1.x since #1762.
Questions
"none"only to override an inherited"compile".reachabilityvalue is invalid: it replaces one of its own with the answers, and names an inherited one to be fixed in the socket.json that sets it.Stack
Changelog
In
CHANGELOG.mdunder[Unreleased]:Added
socket manifest setup --dynamic-sbom-inferenceasks for the reachability settings, so there is no need to editsocket.jsonby hand.🤖 Generated with Claude Code