fix(scan): suppress auto-manifest hint when .socket.facts.json exists#1337
Merged
Martin Torp (mtorp) merged 2 commits intoMay 28, 2026
Merged
Conversation
The "Detected N manifest targets we could try to generate" hint in `socket scan create` nudges users to pass --auto-manifest. Skip it when a `.socket.facts.json` is already present at cwd — that file is the output of `socket manifest auto` (or the per-ecosystem `--facts` mode), the scan already picks it up via handle-create-new-scan, and the suggestion is misleading in that state.
Jeppe Fredsgaard Blaabjerg (jfblaa)
approved these changes
May 28, 2026
Contributor
Jeppe Fredsgaard Blaabjerg (jfblaa)
left a comment
There was a problem hiding this comment.
LGTM 👍
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.
Summary
socket scan createprints "Detected N manifest targets we could try to generate. Please set the --auto-manifest flag..." wheneverdetectManifestActionsfinds abuild.sbt,gradlew,MODULE.bazel, orenvironment.ymlin the cwd..socket.facts.jsonis already present — it's the output ofsocket manifest auto(or the--factsmode of the per-ecosystem manifest commands), andhandle-create-new-scan.mtsalready includes it inscanPaths. So the manifest data is in the scan; the suggestion to regenerate it isn't useful.existsSync(cwd/.socket.facts.json); everything else (the auto-manifest pathway itself, the detector, other callers) is untouched.Notes / open questions
pom.xmlpresence (the non---factsoutput for sbt/gradle), sincepom.xmlis commonly author-written for Maven projects and isn't a reliable "already generated" marker.Test plan
pnpm build:dist:src && pnpm test:unit src/commands/scan/socket manifest gradle --facts, thensocket scan create --dry-run— confirm the "Detected N manifest targets..." line is gone.Note
Low Risk
UX-only change to a single log message in
cmd-scan-create.mts; no scan upload or manifest generation behavior is modified.Overview
socket scan createno longer logs the “Detected N manifest targets… use--auto-manifest” hint when.socket.facts.jsonalready exists in the scan working directory.That file is produced by
socket manifest auto(or ecosystem--factsflows) and is already included in scan paths, so the nudge to regenerate manifests was redundant.--auto-manifest,detectManifestActions, and other callers are unchanged—only the informational log is gated.Reviewed by Cursor Bugbot for commit 4a80415. Configure here.