Skip to content

feat: adopt bomly-sdk v0.3.0 helper packages - #382

Open
bomly-guy wants to merge 3 commits into
mainfrom
feat/sdk-helpers-adoption
Open

feat: adopt bomly-sdk v0.3.0 helper packages#382
bomly-guy wants to merge 3 commits into
mainfrom
feat/sdk-helpers-adoption

Conversation

@bomly-guy

Copy link
Copy Markdown
Collaborator

Foundation step F1 of the component-extraction program: the CLI adopts the helper subpackages released in bomly-sdk v0.3.0, gains CoreVersion plumbing for embedded components, and picks up the workspace/release-train scaffolding the upcoming component-module waves build on.

What moved where

Every subpackage is a verbatim move of CLI internals (all exported identifiers preserved), so this is a pure import rewrite:

CLI package (deleted) bomly-sdk v0.3.0 subpackage
internal/system system
internal/matchers/cache filecache
internal/matchers root (RegistryPackagesForGraph, MissingLicensePackages, NormalizeLicenseSet) matcherkit
internal/testutil testkit (plus new RequireLockfilePositions)
internal/logging command half (SanitizeArgs, SanitizeURL, CommandFields, CommandStderr, NewCommandStderr) logkit
internal/detectors root helpers (InferManifestMetadata, positions + ScanLines, BuildRemediationHints + RemediationAdvice, SubgraphFrom, JavaReady + CommandNotReadyError, BuildToolContext + timeout, RequestWorkingDir) detectorkit

internal/logging keeps the console/pretty-encoder half; internal/detectors keeps names.go (detector name constants). Tests covering the moved helpers now live in the SDK and are deleted here. Import rewrites alias the SDK packages to the old package names, so call sites are unchanged; files that mixed kept and moved identifiers dual-import (detectorkit / logkit).

CoreVersion plumbing

config.Resolved gains an untagged CoreVersion field populated by the root command from the build version (no flag/env/YAML key; generated docs unaffected). RegistryConfigsFromResolved threads it into the new registry.Configs.CoreVersion, and embeddedHostContext.Runtime() now reports it alongside sdk.ExecutionEmbedded, so embedded components see the same sdk.RuntimeInfo a managed plugin receives.

Workspace + release-train scaffolding

Preparation for in-repo component modules under components/<kind>/<name>/ (no modules exist yet):

  • Committed go.work / go.work.sum (root module only; waves add use ./components/... entries).
  • GoReleaser builds set GOWORK=off explicitly so releases resolve from go.mod pins only.
  • New pinned-build CI job (GOWORK=off go build + go test ./internal/... ./cmd/...), gated to pushes to main because component pseudo-versions only resolve post-merge.
  • scripts/release-components.sh (make release-components): dry run prints per-module patch tags for component modules changed since their last components/<path>/vX.Y.Z tag; --apply creates/pushes the tags and prints the root go get pin bumps.
  • CLAUDE.md / AGENTS.md document the layout, workspace mode, one-atomic-PR wave convention, and the SDK helper subpackages.

Verification

  • Zero behavior change; smoke goldens untouched.
  • make build (full + lite), full go test ./..., go vet ./..., gofmt -l clean.
  • make generate: no drift.
  • make fuzz FUZZTIME=2s green; TestExamplePluginFixtureCompiles green against the v0.3.0 pin.

🤖 Generated with Claude Code

bomly-guy and others added 2 commits August 12, 2026 00:37
Replace CLI-internal helper packages with their verbatim moves in
bomly-sdk v0.3.0 (every exported identifier preserved):

- internal/system            -> github.com/bomly-dev/bomly-sdk/system
- internal/matchers/cache    -> github.com/bomly-dev/bomly-sdk/filecache
- internal/matchers (root)   -> github.com/bomly-dev/bomly-sdk/matcherkit
- internal/testutil          -> github.com/bomly-dev/bomly-sdk/testkit
- internal/logging (command half: SanitizeArgs/SanitizeURL/CommandFields/
  CommandStderr/NewCommandStderr) -> github.com/bomly-dev/bomly-sdk/logkit
- internal/detectors root helpers (InferManifestMetadata, positions,
  remediation hints, SubgraphFrom, JavaReady, build-tool timeout,
  RequestWorkingDir) -> github.com/bomly-dev/bomly-sdk/detectorkit

internal/logging keeps the console/pretty-encoder half; internal/detectors
keeps names.go (detector name constants). Tests that covered the moved
helpers now live in the SDK and are deleted here. Import rewrites use
aliases matching the old package names so call sites are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Thread the CLI build version into registry wiring so embedded components
see the same sdk.RuntimeInfo.CoreVersion a managed plugin receives:

- config.Resolved gains an untagged CoreVersion field populated by the
  root command at startup (not user configuration; no flag/env/YAML key).
- registry.Configs gains CoreVersion, filled by RegistryConfigsFromResolved.
- embeddedHostContext.Runtime() now reports that version alongside
  sdk.ExecutionEmbedded, with test coverage in module_test.go.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 183 files, which is 83 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 25e86f56-c448-4964-b9da-39827eba5d57

📥 Commits

Reviewing files that changed from the base of the PR and between 216bc20 and 2f3523a.

⛔ Files ignored due to path filters (3)
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
📒 Files selected for processing (183)
  • .github/workflows/ci.yml
  • .gitignore
  • .goreleaser.yaml
  • AGENTS.md
  • CLAUDE.md
  • Makefile
  • go.mod
  • internal/analyzers/govulncheck/cache.go
  • internal/analyzers/govulncheck/parse_fuzz_test.go
  • internal/analyzers/govulncheck/runner_library.go
  • internal/analyzers/jsreach/cache.go
  • internal/analyzers/jsreach/discover.go
  • internal/analyzers/jsreach/dynamicimports.go
  • internal/analyzers/jsreach/entrypoints.go
  • internal/analyzers/jsreach/importgraph_fuzz_test.go
  • internal/analyzers/jvmreach/cache.go
  • internal/analyzers/jvmreach/discover.go
  • internal/analyzers/jvmreach/dynamicimports.go
  • internal/analyzers/jvmreach/runner_library.go
  • internal/analyzers/pyreach/cache.go
  • internal/analyzers/pyreach/dynamicimports.go
  • internal/analyzers/pyreach/runner_library.go
  • internal/baseline/baseline.go
  • internal/baseline/baseline_test.go
  • internal/benchmark/run.go
  • internal/benchmark/targets.go
  • internal/benchmark/targets_test.go
  • internal/cli/diff_resolve.go
  • internal/cli/opts/options.go
  • internal/cli/opts/planning.go
  • internal/cli/opts/registry.go
  • internal/cli/plugin_cmd_health_test.go
  • internal/cli/root_cmd.go
  • internal/cli/root_cmd_test.go
  • internal/composition/composition.go
  • internal/config/config.go
  • internal/config/load.go
  • internal/config/load_fuzz_test.go
  • internal/config/load_test.go
  • internal/detectors/build_tool_timeout.go
  • internal/detectors/build_tool_timeout_test.go
  • internal/detectors/cargo/detector.go
  • internal/detectors/cargo/parser_fuzz_test.go
  • internal/detectors/cargo/positions.go
  • internal/detectors/cargo/remediation.go
  • internal/detectors/cargo/workspace.go
  • internal/detectors/cocoapods/detector.go
  • internal/detectors/cocoapods/parser_fuzz_test.go
  • internal/detectors/cocoapods/positions.go
  • internal/detectors/common.go
  • internal/detectors/composer/detector.go
  • internal/detectors/composer/parser_fuzz_test.go
  • internal/detectors/composer/positions.go
  • internal/detectors/composer/remediation.go
  • internal/detectors/conan/detector.go
  • internal/detectors/conan/parser_fuzz_test.go
  • internal/detectors/conan/positions.go
  • internal/detectors/githubactions/detector.go
  • internal/detectors/githubactions/parser_fuzz_test.go
  • internal/detectors/githubactions/positions.go
  • internal/detectors/gomod/detector.go
  • internal/detectors/gomod/parser_fuzz_test.go
  • internal/detectors/gomod/remediation.go
  • internal/detectors/gradle/detector.go
  • internal/detectors/gradle/main_test.go
  • internal/detectors/gradle/modules.go
  • internal/detectors/gradle/positions.go
  • internal/detectors/gradle/remediation.go
  • internal/detectors/java_ready.go
  • internal/detectors/maven/detector.go
  • internal/detectors/maven/modules.go
  • internal/detectors/maven/positions.go
  • internal/detectors/maven/remediation.go
  • internal/detectors/mix/detector.go
  • internal/detectors/mix/parser_fuzz_test.go
  • internal/detectors/mix/positions.go
  • internal/detectors/node/bun/bun_lockfile.go
  • internal/detectors/node/bun/bun_lockfile_parser.go
  • internal/detectors/node/bun/bun_native.go
  • internal/detectors/node/bun/bun_native_test.go
  • internal/detectors/node/bun/remediation.go
  • internal/detectors/node/common.go
  • internal/detectors/node/lockfile_common.go
  • internal/detectors/node/npm/npm_lockfile.go
  • internal/detectors/node/npm/npm_lockfile_parser.go
  • internal/detectors/node/npm/npm_native.go
  • internal/detectors/node/npm/positions.go
  • internal/detectors/node/npm/remediation.go
  • internal/detectors/node/package_manager_warnings.go
  • internal/detectors/node/pnpm/pnpm_lockfile.go
  • internal/detectors/node/pnpm/pnpm_lockfile_parser.go
  • internal/detectors/node/pnpm/pnpm_native.go
  • internal/detectors/node/pnpm/positions.go
  • internal/detectors/node/pnpm/remediation.go
  • internal/detectors/node/yarn/positions.go
  • internal/detectors/node/yarn/remediation.go
  • internal/detectors/node/yarn/yarn_lockfile.go
  • internal/detectors/node/yarn/yarn_lockfile_parser.go
  • internal/detectors/node/yarn/yarn_native.go
  • internal/detectors/nuget/detector.go
  • internal/detectors/nuget/parser_fuzz_test.go
  • internal/detectors/nuget/positions.go
  • internal/detectors/positions.go
  • internal/detectors/positions_test.go
  • internal/detectors/pub/detector.go
  • internal/detectors/pub/parser_fuzz_test.go
  • internal/detectors/pub/positions.go
  • internal/detectors/pub/pub_native.go
  • internal/detectors/python/common.go
  • internal/detectors/python/lockfile_fuzz_test.go
  • internal/detectors/python/pip.go
  • internal/detectors/python/pip_resolution_test.go
  • internal/detectors/python/pipenv.go
  • internal/detectors/python/piplock.go
  • internal/detectors/python/poetry.go
  • internal/detectors/python/poetrylock.go
  • internal/detectors/python/positions_loose.go
  • internal/detectors/python/remediation.go
  • internal/detectors/python/resolution.go
  • internal/detectors/python/uv.go
  • internal/detectors/python/uvlock.go
  • internal/detectors/python/venv.go
  • internal/detectors/remediation.go
  • internal/detectors/remediation_test.go
  • internal/detectors/ruby/detector.go
  • internal/detectors/ruby/parser_fuzz_test.go
  • internal/detectors/ruby/positions.go
  • internal/detectors/ruby/remediation.go
  • internal/detectors/sbom/detector.go
  • internal/detectors/sbom/detector_test.go
  • internal/detectors/sbt/detector.go
  • internal/detectors/sbt/positions.go
  • internal/detectors/sbt/sbt_native.go
  • internal/detectors/subgraph.go
  • internal/detectors/subgraph_test.go
  • internal/detectors/swiftpm/detector.go
  • internal/detectors/swiftpm/parser_fuzz_test.go
  • internal/detectors/swiftpm/positions.go
  • internal/detectors/swiftpm/swiftpm_native.go
  • internal/detectors/syft/detector.go
  • internal/detectors/syft/resolve_external.go
  • internal/detectors/working_dir.go
  • internal/git/git.go
  • internal/logging/command.go
  • internal/logging/command_test.go
  • internal/logging/logger.go
  • internal/logging/logger_test.go
  • internal/matchers/cache/cache.go
  • internal/matchers/cache/cache_test.go
  • internal/matchers/depsdev/matcher.go
  • internal/matchers/depsdev/matcher_test.go
  • internal/matchers/grype/builtin.go
  • internal/matchers/grype/external.go
  • internal/matchers/licenses.go
  • internal/matchers/osv/client.go
  • internal/matchers/osv/kev.go
  • internal/matchers/osv/matcher.go
  • internal/matchers/osv/matcher_test.go
  • internal/matchers/registry.go
  • internal/matchers/registry_test.go
  • internal/matchers/scorecard/client.go
  • internal/matchers/scorecard/matcher.go
  • internal/plugin/analyzer_plugin_test.go
  • internal/plugin/github_release.go
  • internal/plugin/github_release_test.go
  • internal/plugin/http_test.go
  • internal/plugin/plugin_test.go
  • internal/plugin/runtime/hashicorp/runtime.go
  • internal/plugin/test_doctor_test.go
  • internal/plugin/types.go
  • internal/registry/builder.go
  • internal/registry/discovery.go
  • internal/registry/discovery_test.go
  • internal/registry/module.go
  • internal/registry/module_test.go
  • internal/system/read.go
  • internal/system/read_test.go
  • internal/system/system.go
  • internal/system/system_test.go
  • internal/testutil/fuzz.go
  • internal/testutil/gobuild.go
  • internal/testutil/gobuild_test.go
  • scripts/release-components.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread go.mod
github.com/bodgit/sevenzip v1.6.1 // indirect
github.com/bodgit/windows v1.0.1 // indirect
github.com/bomly-dev/bomly-sdk v0.2.0
github.com/bomly-dev/bomly-sdk v0.3.0

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I verified LICENSE (Apache-2.0, 11,340 bytes) exists at the bomly-sdk v0.3.0 tag — the "license unknown" alert is registry indexing lag on the fresh tag; no action needed. Leaving this thread open for the bot to clear.

🤖 Addressed by Claude Code

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Bomly Diff Summary

Compared 216bc20411f31130b1d2f9ba52d4f326a9dde62e to 2f3523a59394b72cd6f83780a16749d87f276645.

Overview

Status Manifests Dependencies Findings Duration
⚠️ Warnings +0 / ~1 / -0 0 added / 1 version changed / 0 detail changes / 0 removed 1 introduced / 0 persisted / 0 resolved 1m 25s

Dependency Changes

Summary: 0 added, 1 version changed, 0 detail changes, 0 removed.

Changed Dependencies

Change Package Version Direct? Scope Licenses
changed github.com/bomly-dev/bomly-sdk v0.2.0 → v0.3.0 Yes runtime -

Vulnerabilities

✅ No vulnerability changes.

License Changes

Summary: 0 added, 1 changed, 0 removed.

Changed Licenses

Change Package Before After
changed github.com/bomly-dev/bomly-sdk@v0.3.0 Apache-2.0 -

Project Posture

✅ No project posture changes (--matchers +scorecard was not selected).

Policy Findings

Summary: 1 introduced, 0 persisted, 0 resolved.

Introduced Findings

Status Category Severity ID Package Fixed In Title
⚠️ introduced license WARNING UNKNOWN-4l5q-bfya-fn76 github.com/bomly-dev/bomly-sdk@v0.3.0 - Package license is unknown

Legend: ✅ resolved · ❌ failing · ⚠️ warning

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54019c60fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread go.work Outdated
Comment thread scripts/release-components.sh Outdated
Comment thread .goreleaser.yaml Outdated
…lding

Prepare the repo for in-repo component modules under components/<kind>/<name>/:

- Commit go.work (root module only for now; extraction waves add
  use ./components/... entries) and go.work.sum.
- GoReleaser builds set GOWORK=off explicitly so releases resolve from
  go.mod pins only.
- New pinned-build CI job runs go build/test with GOWORK=off; gated to
  pushes to main because component pseudo-versions only resolve
  post-merge.
- New scripts/release-components.sh (make release-components): dry run
  prints per-module patch tags for component modules changed since their
  last components/<path>/vX.Y.Z tag; --apply creates and pushes the tags
  and prints the root go get pin bumps.
- Ignore accidental root-level build outputs (/bomly, /bomly-lite).
- CLAUDE.md / AGENTS.md: document the components/ layout, workspace
  mode, one-atomic-PR wave convention, the release train, and the
  bomly-sdk helper subpackages that replaced internal/system,
  internal/matchers/cache, internal/testutil, and the command half of
  internal/logging.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bomly-guy
bomly-guy force-pushed the feat/sdk-helpers-adoption branch from 54019c6 to 2f3523a Compare August 12, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants