Skip to content

feat(scan): forward socket.json build-tool config into reachability (1.1.120, Coana 15.4.1)#1362

Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 2 commits into
v1.xfrom
jfblaa/rea-549-socket-cli-map-socketjson-build-tool-config-into-coanas-auto
Open

feat(scan): forward socket.json build-tool config into reachability (1.1.120, Coana 15.4.1)#1362
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 2 commits into
v1.xfrom
jfblaa/rea-549-socket-cli-map-socketjson-build-tool-config-into-coanas-auto

Conversation

@jfblaa

@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Forwards socket.json per-ecosystem build-tool config into reachability analysis, and bumps @coana-tech/cli to 15.4.1 (which ships the --auto-manifest-config option this depends on). Cuts release 1.1.120.

  • socket scan create --reach now maps socket.json's per-ecosystem manifest build-tool options (custom binary, include/exclude configs, Gradle/sbt opts) into a Coana AutoManifestConfig, passed to coana run via --auto-manifest-config, so reach-time dependency resolution invokes the build tool the way the project is configured rather than with defaults.
  • Under --auto-manifest --reach the config carries failOnBuildToolError=true (fail-closed). Plain --reach leaves it unset and stays best-effort.

Changelog (1.1.120)

  • socket scan create --reach now applies your project's build-tool settings from socket.json (configured via socket manifest setup) for Gradle/sbt reachability resolution, instead of always invoking the build tool with defaults.
  • socket scan create --auto-manifest --reach now fails with an error when a build tool fails during manifest generation, rather than tolerating it.
  • Updated the Coana CLI to v 15.4.1.

Notes

  • The --auto-manifest-config option is gated on Coana 15.4.1, now released, so this is no longer pinned behind SOCKET_CLI_COANA_LOCAL_PATH.

Note

Medium Risk
Changes reachability and auto-manifest failure behavior (stricter with --auto-manifest) and depends on Coana 15.4.1; mis-mapped socket.json could affect Gradle/sbt resolution in scans.

Overview
Release 1.1.120 bumps @coana-tech/cli to 15.4.1 and wires socket.json Gradle/sbt manifest settings into reachability runs.

socket scan create --reach now maps defaults.manifest from socket.json (custom binary, include/exclude configs, gradleOpts/sbtOpts, ignoreUnresolved) into Coana’s AutoManifestConfig, written to a temp JSON file and passed as --auto-manifest-config on coana run. With --auto-manifest --reach, the config sets failOnBuildToolError=true so build-tool failures abort the scan; plain --reach leaves that unset for best-effort behavior.

New buildAutoManifestConfig / isAutoManifestConfigEmpty utilities and unit tests cover the mapping; scan create only builds the config when --reach is enabled.

Reviewed by Cursor Bugbot for commit 478fb22. Configure here.

socket scan create --reach now maps socket.json's per-ecosystem manifest
build-tool options (bin, include/exclude-configs, gradle/sbt opts) into a
Coana-defined AutoManifestConfig and passes it to `coana run` via
--auto-manifest-config (a temp JSON file path Coana reads), so reach-time
dependency resolution invokes the build tool the way the project is configured
rather than with defaults. Under --auto-manifest the config also carries
top-level failOnBuildToolError=true (fail-closed: Coana treats a build-tool
step failure as fatal instead of tolerating it); plain --reach leaves it unset
and stays permissive.

This is the socket-cli side of the manifest-flag-propagation gap. The Coana
`--auto-manifest-config` option is not yet released, so this must not ship
until Coana publishes it and the pinned @coana-tech/cli is bumped; until then
it is exercised via SOCKET_CLI_COANA_LOCAL_PATH.

- add src/utils/auto-manifest-config.mts: BuildToolOptions/AutoManifestConfig
  types + buildAutoManifestConfig (socket.json -> config) + tests
- ReachabilityOptions.autoManifestConfig; write the config to a temp file and
  pass its path to coana run, cleaning it up after
- build the config at the cmd-scan-create assembly point
…fig forwarding

Bump @coana-tech/cli to 15.4.1 (which ships the --auto-manifest-config
option the feat commit depends on), bump the package version to 1.1.120,
and add the changelog entry.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 478fb22. Configure here.

// Per-ecosystem build-tool options handed off to the Coana CLI — used both when
// generating manifests (`coana manifest <ecosystem>`) and, in socket mode, for
// reach-time dependency resolution (`coana run`). This mirrors the Coana-side
// `--auto-manifest-config` shape (REA-547): socket-cli owns mapping `socket.json`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal ticket ID in comments

Low Severity

New comments reference the internal tracker id REA-547. Source comments in this repo should describe intent without Jira-style ticket references so they stay readable outside internal tooling.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by learned rule: No internal ticket references in code comments — remove Jira/tracker IDs

Reviewed by Cursor Bugbot for commit 478fb22. Configure here.

// REA-547.
...(autoManifestConfigPath
? ['--auto-manifest-config', autoManifestConfigPath]
: []),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config flag needs Coana version

Medium Severity

Reachability now appends --auto-manifest-config whenever the mapped config is non-empty, but reachVersion (or a local Coana path) can still invoke a Coana build older than 15.4.1 that does not implement that flag, causing reach analysis to fail unexpectedly.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 478fb22. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant