feat(manifest): generate JVM Socket facts natively + single-run reachability sidecar (1.1.132, Coana 15.6.3)#1385
Conversation
4627215 to
5d4e857
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
7d25c59 to
5054196
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Empty components skip valid facts
- Updated the early-return guard to skip only when both components and projects are absent, preserving project-only facts and sidecar accumulation.
Or push these changes by commenting:
@cursor push 6d99852be8
Preview (6d99852be8)
diff --git a/src/commands/manifest/run-manifest-facts.mts b/src/commands/manifest/run-manifest-facts.mts
--- a/src/commands/manifest/run-manifest-facts.mts
+++ b/src/commands/manifest/run-manifest-facts.mts
@@ -78,10 +78,10 @@
logger.log(rendered.details)
}
- // No resolvable dependencies → nothing to upload.
- if (!facts.components.length) {
+ // No resolvable dependencies or projects; nothing to upload.
+ if (!facts.components.length && !facts.projects?.length) {
logger.warn(
- `No resolvable ${ecosystem} dependencies found; nothing to upload.`,
+ `No resolvable ${ecosystem} dependencies or projects found; nothing to upload.`,
)
return
}You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5054196. Configure here.
5054196 to
48656cd
Compare
Martin Torp (mtorp)
left a comment
There was a problem hiding this comment.
Approving. Reviewed the full TypeScript assembly/sidecar layer plus the three producers (Gradle init script, sbt plugin, Maven core extension); the records contract — field escaping, coordId keying, and field ordering — is consistent across all four, and the typecheck and new unit tests pass. The single-run sidecar approach is a clean way to kill the re-resolution divergence.
Two higher-severity, silent-failure items left as inline comments to address before this leaves draft / merges (not blockers for the approval itself, given merge is already gated on the Coana release):
- Ignored build-tool exit code → a catastrophic build failure can degrade to a silent empty SBOM rather than failing closed.
- Gradle records file is written in the JVM default charset instead of UTF-8 (the Maven and sbt producers already write UTF-8).
48656cd to
aab5687
Compare
7c0e0f3 to
d2bb2f4
Compare
…ability sidecar (1.1.132, Coana 15.6.3) Move the JVM build-tool resolution scripts (Gradle init script, sbt plugin, Maven core extension) and the TypeScript SBOM assembler into socket-cli, so `socket manifest` and `--auto-manifest` generate `.socket.facts.json` natively instead of delegating to the Coana CLI's `manifest` command. On `socket scan create --reach --auto-manifest` the build tool now runs exactly once and emits both the SBOM and a resolved-paths sidecar, passed to `coana run --compute-artifacts-sidecar`. Coana no longer re-resolves the build at reach time, eliminating the divergence that broke dynamically-versioned projects (git-derived versions, CI build numbers, timestamps). Build-tool binary selection prefers the project's wrapper (./gradlew, ./mvnw) and falls back to gradle/mvn on PATH. Bumps @coana-tech/cli to 15.6.3, which ships `--compute-artifacts-sidecar`.
d2bb2f4 to
f66fa47
Compare


Summary
Moves JVM build-tool resolution (Gradle, sbt, Maven) into socket-cli, so
socket manifestand--auto-manifestgenerate Socket facts natively. Onsocket scan create --reach --auto-manifest, the build tool runs once and produces both the SBOM and a resolved-paths sidecar for coana's reachability — instead of coana re-resolving the build at reach time, which diverged for dynamically-versioned projects (git versions, CI build numbers, timestamps) and surfaced as spurious "failed to install" / stale-manifest failures.Related
Release gating
coana run --compute-artifacts-sidecar. Before merge: bump@coana-tech/clito that version and fill theCHANGELOG.mdplaceholder (coana version + date).Test plan
pnpm check(lint + tsc) and unit tests green.--reach --auto-manifestend-to-end is pending the coana release.Note
Medium Risk
Large new surface area (build-tool scripts, graph assembly, publish-time Maven jar) affects manifest and reachability correctness; behavior changes for all Gradle/sbt/Maven users but is covered by unit tests and on-demand compat matrices.
Overview
Gradle, sbt, and Maven Socket facts are generated inside socket-cli instead of delegating to
coana manifest. Bundled Gradle init script, sbt plugin, and a Maven core extension emit tab-separated records; TypeScript (runManifestScript→assembleFacts) assembles.socket.facts.jsonand handles resolution failure reporting per ecosystem.For
--auto-manifest/ reachability, the same build run can use--with-filesto collect resolved jar paths and module source/output dirs into aResolvedPathsSidecar(merged across JVM roots), so reachability reuses one resolution instead of Coana re-running the build (fixes dynamic-version / install-error mismatches).Defaults:
resolveBuildToolBinprefers./gradlew/./mvnwwhen present, elsegradle/mvnon PATH (manifest commands and auto-manifest updated).Shipping & CI: Dist build copies manifest assets into
dist/manifest-scripts; Maven extension jar is built viabuild:maven-extension(provenance publish step). Label-gated manifest-gradle / manifest-sbt / manifest-maven workflows run version-matrix smoke tests. Release 1.1.132, @coana-tech/cli 15.6.3.Reviewed by Cursor Bugbot for commit 5054196. Configure here.