Skip to content

feat(manifest): default to Socket facts, delegate generation to Coana CLI#1352

Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 8 commits into
v1.xfrom
jfblaa/rea-507-socket-cli-delegate-manifest-gradlescala-facts-generation-to
Jun 4, 2026
Merged

feat(manifest): default to Socket facts, delegate generation to Coana CLI#1352
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 8 commits into
v1.xfrom
jfblaa/rea-507-socket-cli-delegate-manifest-gradlescala-facts-generation-to

Conversation

@jfblaa
Copy link
Copy Markdown
Contributor

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

Summary

Make socket manifest {gradle,kotlin,scala,auto} emit .socket.facts.json by default and add --pom for the legacy pom.xml generation.

  • Facts generation now delegates to the Coana CLI's manifest gradle|sbt command via spawnCoanaDlx (which honors SOCKET_CLI_COANA_LOCAL_PATH). socket-cli no longer runs gradle/sbt itself for the facts path; the build-tool resolution scripts live in Coana.
  • New shared helper coana-manifest-facts.mts; convert-gradle-to-facts / convert-sbt-to-facts are now thin wrappers.
  • Default flip: facts is the default; --pom opts into pom.xml generation. --facts is still accepted (it's the default); socket.json facts: false still selects pom; passing --facts --pom together warns and generates facts. socket manifest auto flipped to match.
  • Removed the now-dead bundled socket-facts.init.gradle, the sbt plugin, their rollup copy steps, and the gradle-facts test fixtures (ported to Coana). The pom-path init.gradle is unchanged.

The resolved artifact-paths sidecar (file paths used for reachability) stays internal to Coana — socket manifest only requests the uploadable facts file.

Testing

  • check:tsc, check:lint, Biome clean; full unit suite passing (help snapshots + auto-manifest tests updated).
  • Live: socket manifest gradle (no flags) against a Gradle (Fabric Loom) test project delegates to a local Coana build and produces the expected .socket.facts.json.

Linear: REA-507 (related: REA-509)


Note

High Risk
Default output flipped from pom.xml to facts and facts now depend on Coana manifest subcommands that may not ship in the pinned CLI version yet, so this is a breaking UX change with an external runtime dependency.

Overview
socket manifest gradle, kotlin, and scala now emit .socket.facts.json by default; --pom opts into the previous pom.xml path. --configs is replaced by --include-configs and --exclude-configs. socket manifest auto, socket.json defaults, and the setup wizard follow the same default and flag names.

Facts generation no longer runs Gradle/sbt or ships in-repo resolution scripts. A new coana-manifest-facts.mts helper forwards to coana manifest gradle|sbt via spawnCoanaDlx; the Gradle/sbt facts converters are thin wrappers. Bundled socket-facts.init.gradle and the sbt facts plugin, their rollup copy steps, and local gradle-facts fixtures are removed. The pom init.gradle path is unchanged. Release 1.1.113 bumps @coana-tech/cli to 15.3.19.

Reviewed by Cursor Bugbot for commit acdba63. Configure here.

… CLI

Make `socket manifest {gradle,kotlin,scala,auto}` emit `.socket.facts.json`
by default; add `--pom` for the legacy pom.xml generation. `--facts` is still
accepted (it is now the default) and socket.json `facts: false` still selects
pom generation.

Facts generation now delegates to the Coana CLI's `manifest gradle|sbt`
command (the Gradle init script and sbt plugin live in Coana now), forwarding
--bin/--configs/--ignore-unresolved/--gradle-opts/--sbt-opts via spawnCoanaDlx
(which honors SOCKET_CLI_COANA_LOCAL_PATH for local builds).

Remove the now-dead bundled socket-facts.init.gradle, the sbt plugin, their
rollup copy steps, and the ported gradle-facts test fixtures. The pom-path
init.gradle is unchanged.

REA-507
…configs

Match the Coana CLI's split of `--configs` into `--include-configs` and
`--exclude-configs` for `socket manifest {gradle,kotlin,scala,auto}`; both
forward to Coana as `--include-configs` / `--exclude-configs`. `--include-configs`
keeps the old include-only semantics; `--exclude-configs` skips matching
configurations (applied after the include filter).

The old `--configs` flag and its socket.json `configs` key are removed (beta;
clean break, no deprecated alias).

REA-507
Match the gradle flag description and help prose: drop the sbt-only
"bare names act as exact-name filters" / "for variants" asides so both
ecosystems document the include/exclude config flags identically as globs.
`socket manifest setup` now reflects Socket facts as the default for the gradle
and sbt generators and lets you configure the facts-only options it previously
couldn't: --include-configs, --exclude-configs, and --ignore-unresolved. These
are prompted only when facts generation is selected (not --pom), and the sbt
pom output questions (stdout/outfile) now only appear when pom is chosen.
Refreshes the stale "generate pom.xml (default)" wording left over from the
facts-by-default switch.
Finalizes the manifest facts-by-default / Coana-delegation work: bumps the
socket-cli version to 1.1.113 and pins @coana-tech/cli to the published 15.3.19
(which ships the `manifest gradle|sbt` commands this PR delegates to), plus the
1.1.113 CHANGELOG entry.

REA-507
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jun 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​coana-tech/​cli@​15.3.21961008098100

View full report

@socket-security-staging
Copy link
Copy Markdown

socket-security-staging Bot commented Jun 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​coana-tech/​cli@​15.3.21971008098100

View full report

Copy link
Copy Markdown
Contributor

@mtorp Martin Torp (mtorp) left a comment

Choose a reason for hiding this comment

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

A few minor, non-blocking nits from the review (docs/comments + one UX design question). Nothing here blocks merge — the two larger items (the default-output flip and the Coana 15.3.19 runtime dependency) are intentional/documented and I'll raise those separately.

Comment thread src/commands/manifest/cmd-manifest-gradle.mts
Comment thread src/commands/manifest/coana-manifest-facts.mts
Comment thread src/commands/manifest/coana-manifest-facts.mts
Comment thread src/commands/manifest/cmd-manifest-scala.mts
Copy link
Copy Markdown
Contributor

@mtorp Martin Torp (mtorp) left a comment

Choose a reason for hiding this comment

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

Approving the code. Verified locally: check:tsc, ESLint, and the manifest unit suite (22/22) all pass; build is clean. Traced the facts/--pom default-flip logic and the generateAutoManifest opt-out across all branches — correct. All converter call sites updated, no dangling refs to the removed init.gradle/sbt-plugin/fixtures, version pin consistent.

Left a few minor doc/comment nits inline; none are blocking.

…ng success

Address PR review feedback on the facts-by-default flow:

- Align the `--ignore-unresolved` help text with the adjacent config flags
  ("When generating facts: ...") across gradle, kotlin, and scala.
- Pin the `.socket.facts.json` output location explicitly via Coana's
  `--output-dir`/`--output-file` instead of relying on its project-root
  default. The pinned path is the single source of truth for both what we
  ask Coana to write and what we verify, so the two can't drift.
- Verify the facts file exists after a successful Coana run before printing
  the success/next-step message; warn instead when no facts were written
  (e.g. no resolvable dependencies), rather than trusting the exit code.
- Reject `--out`/`--stdout` in scala facts mode with a usage error (they only
  apply to `--pom`); facts always land in the project root so `socket scan
  create` finds them. Clarify the flag help and add a regression test.
Resolve conflicts:
- package.json / pnpm-lock.yaml: take @coana-tech/cli 15.3.20 from v1.x.
- CHANGELOG.md: fold the facts-by-default changes into a new 1.1.114
  section and keep v1.x's released 1.1.113 (Bazel + Coana 15.3.20) intact,
  dropping the duplicate 1.1.113 our branch had cut locally.
- Bump socket-cli to 1.1.114.
@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) merged commit e75b2d6 into v1.x Jun 4, 2026
12 checks passed
@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) deleted the jfblaa/rea-507-socket-cli-delegate-manifest-gradlescala-facts-generation-to branch June 4, 2026 10:57
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.

2 participants