Skip to content

feat: adopt bomly-sdk v0.7.0 and emit per-project-root evidence - #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 and emit per-project-root evidence#1
bomly-guy merged 2 commits into
mainfrom
claude/sdk-v0.7.0

Conversation

@bomly-guy

@bomly-guy bomly-guy commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Unblocked. bomly-sdk v0.8.0 is released and pinned here; the suite is green against the real tag, with no go.work overlay.

Migration and phase 2.8 in one pass, so this repo is touched once rather than twice.

Migration

sdk.Dependencysdk.DependencyNode; Graph.Nodes()DependencyNodes() (an analyzer walks dependency nodes, not every kind); .ID.NodeID(), since a node's ID is its canonical package URL under ADR-0041; PURL is a method on the node now.

Fixtures route through the testkit constructors — identity is minted there and the fields holding it are unexported, so a hand-built literal has no node ID at all. Go-ecosystem fixtures gained a namespace: the golang purl type requires one, which purlkit's type profiles now enforce.

Phase 2.8: per-project-root evidence

The analyzer already loops per project root. What it did with the second one was skip it — wrong in the unsafe direction, since one project can leave a package unimported while another imports it, and the first answer stood.

Each root now contributes a ReachabilityEvidence carrying its root and the occurrence node it's attributable to. The annotation is DeriveReachability over all of them: reachable anywhere wins; unreachable requires every root to agree; and a root that couldn't be analyzed contributes unknown evidence, so the pair doesn't read as unreachable.

The summary rule lives in one helper rather than at each call site — writing it per site is how the first-root-wins behaviour got there.

Verification

One mutation: restoring the skip reproduces the discarded root. Two regression tests pin the multi-root case and the unanalyzed-root safety case. go vet, gofmt, full suite — clean.

🤖 Generated with Claude Code

Migration and phase 2.8 in one pass, so this repo is touched once.

Migration: sdk.Dependency becomes sdk.DependencyNode, Graph.Nodes() becomes
DependencyNodes() since an analyzer walks dependency nodes, a node's ID is
its canonical package URL so .ID becomes .NodeID(), and PURL is a method on
the node now. Fixtures route through the testkit constructors, because
identity is minted there and the fields holding it are unexported -- a
hand-built literal has no node ID at all. Go-ecosystem fixtures gained a
namespace: the golang purl type requires one, which purlkit's type profiles
enforce.

Phase 2.8: reachability is per-project-root evidence. The analyzer already
loops per project root; what it did with the second one was skip it, which
is wrong in the unsafe direction -- one project can leave a package
unimported while another imports it, and the first answer stood. Each root
now contributes a ReachabilityEvidence carrying its root and the occurrence
node it is attributable to, and the annotation is DeriveReachability over
all of them: reachable anywhere wins, unreachable requires every root to
agree, and a root that could not be analyzed contributes unknown evidence so
the pair does not read as unreachable.

The summary rule lives in one helper rather than at each call site, which is
how the first-root-wins behaviour got there.

Depends on bomly-sdk#31; verified locally through a go.work overlay.
One mutation verified: restoring the skip reproduces the discarded root.
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 4ef7616 into main Sep 1, 2026
1 check 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