Repository navigation
refactor: follow-ups to generating Socket facts with Coana - #1733
Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Conversation
This was referenced Nov 17, 2026
Merged
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 08:04
bc39c00 to
78fadc7
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-6-follow-ups
branch
from
November 18, 2026 08:04
5372613 to
6aef20e
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 09:56
78fadc7 to
14db272
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-6-follow-ups
branch
from
November 18, 2026 09:56
6aef20e to
8f2f82e
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 10:39
14db272 to
8e07fbd
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-6-follow-ups
branch
from
November 18, 2026 10:39
8f2f82e to
62e0052
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 11:16
8e07fbd to
f245568
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-6-follow-ups
branch
from
November 18, 2026 11:16
62e0052 to
97cf28d
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 12:48
f245568 to
d957ff9
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-6-follow-ups
branch
from
November 18, 2026 12:48
97cf28d to
3ffa784
Compare
Coana passes its environment on to the build tools and package managers it runs. It now removes the variables it reads (the API token, organization, API base URL, proxy, User-Agent, CLI version and repository name) at startup, so socket-cli sets only those for it. socket-cli also leaves out the other variables it reads the token from (SOCKET_SECURITY_API_TOKEN, SOCKET_SECURITY_API_KEY, SOCKET_CLI_API_KEY) and SOCKET_CLI_CONFIG, which can carry one; Coana reads none of them. It no longer adds its own normalised settings (constants.processEnv) to Coana's environment, nor the branch name, which Coana does not read.
socket-cli now asks `coana generate-socket-facts` for each build root instead of running its own build-tool scripts, and lists a build's projects and a .NET solution's members through the same command. - Coana writes a root's facts into its state dir under --work-dir and names where they belong. The walk always generates into a work dir, its own when no later Coana run reads one, and copies the facts of the roots it keeps to their target at the end; a dropped run never touches the file there. This replaces the save/restore of predicted facts files. - The kept roots' sidecar entries go to reachability and socket fix as --socket-facts-sidecar. - --auto-manifest builds through the same settings as the walk. Maven builds pom.xml by name, so its facts and state stay apart from a Gradle build in the same directory, and a --file in mavenOpts becomes the POM it builds instead of a build option. - A --reach-version or --fix-version older than the pinned Coana fails facts generation with a message naming that version. - The standalone build's README says every Coana use needs SOCKET_CLI_COANA_LOCAL_PATH.
Coana generates Socket facts now, so socket-cli's own machinery for it goes: the Gradle init scripts, the sbt plugins, the Maven extension, the .NET tool, the records parser, the facts assembler and sidecar, the exclude-path glob compiler, the resolution report renderer, the compat suites, and the steps that built and bundled them for npm, the package matrix, CI and the standalone build.
A build tool's socket.json section takes a `reachability` object, which reachability scans send to Coana with each build root's request: - `build`: "compile" builds the project before the analysis, "none" or unset analyses it unbuilt; - `javaHome`, Maven, Gradle and sbt: the JDK the analysis takes the program to run on, as written; - `runtimeVersion`, .NET: the runtime a framework-dependent build's analysis starts on, as major.minor or major.minor.patch[-prerelease]. Each field cascades on its own, a build's own `builds` entry last, and null clears an inherited one. Only a reachability scan reads them, for the build tools it runs, so an invalid value never stops another command. It checks them before any build runs and fails naming the socket.json and setting, including a field the build tool does not take.
`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.
Facts generation needs a Coana that takes --use-only-socket-facts-artifacts, so the Maven-only --maven-use-only-socket-facts that older releases took is no longer needed.
The build-tool scripts it was named after are gone; it builds the options listing a build's projects takes.
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 13:06
d957ff9 to
94245fc
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-6-follow-ups
branch
from
November 18, 2026 13:06
3ffa784 to
ad39c47
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/facts-5-wizards
branch
from
November 18, 2026 13:34
94245fc to
244ddca
Compare
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.
Heads up, reviewer
[Edit me, human!]
LLM Description written by Claude Code:claude-opus-5-5
Cleanups the stack makes possible but its story doesn't need; kept out of it to keep review focused. Opens once the stack is merged.
Commits
--use-only-socket-facts-artifactsalone: facts generation needs a Coana that takes it, so the Maven-only--maven-use-only-socket-factsolder releases took is no longer needed.buildToolScriptOptionstobuildListingOptions: the scripts it was named after are gone.Stack
Changelog
No entry: internal.
🤖 Generated with Claude Code