[agent] fix(manifest): fail clearly on a directory without a Maven or sbt build - #1560
Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 1 commit intoSep 24, 2026
Conversation
Maven hands the extension a stand-in project with no basedir when it finds no POM, and the extension's workspace lookup threw an NPE that hid Maven's own "no POM in this directory" error. Skip that project so Maven's error surfaces. sbt runs in any directory by synthesizing a default project, so pointing `socket manifest scala` at a non-sbt directory wrote a bogus facts file and exited 0. Refuse to run sbt without a build.sbt or project directory.
Jeppe Fredsgaard Blaabjerg (jfblaa)
deleted the
jfblaa/rea-814-maven-missing-pom
branch
September 24, 2026 20:43
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.
[agent]
Fixes REA-814.
What
socket manifest scalaon a non-sbt directory therefore exited 0 and wrote a bogus facts file. It now fails with a clear message unless there's abuild.sbtor aproject/directory.Testing
🤖 Generated with Claude Code
Note
Low Risk
Targeted validation and null-guard changes in manifest generation only; they improve error paths without altering successful scan logic.
Overview
Manifest generation now fails clearly when you point
socket manifest mavenorsocket manifest scalaat a directory that is not a real build, instead of crashing or writing a bogus.socket.facts.json.For sbt,
runManifestFactschecks forbuild.sbtor aproject/directory via newlooksLikeSbtBuild()and exits with an explicit error before spawning sbt (which would otherwise synthesize a fake project). Unit tests cover the no-build case and both valid markers.For Maven, the facts and workspaces record engines skip reactor modules whose
basediris null (Maven’s placeholder when there is no POM), so the extension no longer NPEs and Maven’s own “no POM in this directory” message can surface. Gradle behavior is unchanged.Reviewed by Cursor Bugbot for commit 28cad18. Configure here.