Skip to content

feat: adopt bomly-sdk v0.7.0 - #1

Merged
bomly-guy merged 2 commits into
mainfrom
claude/sdk-v0.7.0
Sep 1, 2026
Merged

feat: adopt bomly-sdk v0.7.0#1
bomly-guy merged 2 commits into
mainfrom
claude/sdk-v0.7.0

Conversation

@bomly-guy

Copy link
Copy Markdown
Contributor

Migration to the typed GraphNode union. This reaches furthest of the nine: this detector builds the graph, and it carries a vendored copy of the SBOM codec.

Identity is minted, not carried

Syft's own artifact ID no longer travels into the graph, and the StableID fallback is gone with it — a node's ID is its canonical package URL. A Syft package with no coordinates a node can be minted from is skipped rather than admitted under a synthetic ID.

The consequence the tests caught

Syft's relationships are keyed by artifact IDs while nodes are now keyed by canonical package URLs. The two are no longer the same string, so every edge looked up an ID no node had — graph node not found: 5190c1b85ae15af2.

The mapping is now kept explicitly while packages are added, rather than assumed. An edge whose end was skipped for want of identity is dropped rather than erroring: it has nothing to connect.

Visible ref change

Document refs are canonical package URLs as a result — a CycloneDX affects ref that was react@18.2.0 is now pkg:npm/react@18.2.0. This is the one-time ref change the phase-2 release notes call out; worth a look during review since it shows up in emitted SBOMs.

Codec

The component walk uses DependencyNodes(); the dependency list uses WalkTypedEdges and emits only depends-on edges — a manifest-to-module edge is structural and would assert a relationship no detector made.

Delegation, including one deliberate non-delegation

The vendored codec's parsePURL moves to purlkit. plugin/graph.go keeps anchore/packageurl-go, and says why in the code: its result is compared against Syft's own package URLs and Syft's API speaks that type, so converting to purlkit and back would translate a value twice to hand it to a library that wanted the original. That's Syft interop, not a Bomly identity decision — Bomly-side identity is the constructor's either way.

Verification

go vet, gofmt, go mod tidy, full suite under -race — clean.

🤖 Generated with Claude Code

Migration to the typed GraphNode union. It reaches furthest here: this
detector builds the graph, and it carries a vendored copy of the SBOM codec.

Identity is minted by the constructor now (ADR-0041), so Syft's own artifact
ID no longer travels into the graph and the StableID fallback is gone with
it. A Syft package with no coordinates a node can be minted from is skipped
rather than admitted under a synthetic ID.

That change has a consequence the tests caught: Syft's relationships are
keyed by its artifact IDs while nodes are keyed by canonical package URLs,
and the two are no longer the same string, so every edge looked up an ID no
node had. The mapping is now kept explicitly while packages are added rather
than assumed, and an edge whose end was skipped for want of identity is
dropped rather than erroring -- it has nothing to connect.

Document refs are canonical package URLs as a result: a CycloneDX affects
ref that was "react@18.2.0" is "pkg:npm/react@18.2.0". This is the one-time
ref change the phase-2 release notes call out.

The codec's component walk uses DependencyNodes(), and its dependency list
uses WalkTypedEdges and emits only depends-on edges -- a manifest-to-module
edge is structural and would assert a relationship no detector made.

Delegation: the vendored codec's parsePURL moves to purlkit, the kit over
the official packageurl-go. plugin/graph.go keeps anchore/packageurl-go
deliberately, and says why: its result is compared against Syft's own
package URLs and Syft's API speaks that type, so converting twice to hand it
back would be churn, not delegation. Bomly-side identity is the
constructor's either way.
The migration was developed against the release candidate through a go.work
overlay; this pins the published tag. v0.8.0 rather than v0.7.1 because the
SDK fixes added exported API, which is a minor bump under semver -- gorelease
named the version.

Full suite green under -race against the real tag, with no overlay.
@bomly-guy
bomly-guy merged commit ce7c524 into main Sep 1, 2026
2 checks passed
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.

1 participant