Skip to content

docs(adr): ADR-0033 names the SDK helper and what the fold does merge - #456

Merged
bomly-guy merged 2 commits into
mainfrom
docs/adr-0033-ensurenode
Sep 13, 2026
Merged

bomly-guy merged 2 commits into
mainfrom
docs/adr-0033-ensurenode

Conversation

@bomly-guy

@bomly-guy bomly-guy commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Done-criterion 1 of the SDK maturity program asks for ADR-0033's prose to be corrected; #454 records that it never was.

What was wrong (dev-docs/adr/0033-package-origin-is-detector-asserted.md, the insertion paragraph):

  • It named detectors.EnsureNode, which no longer exists; the helper is detectorkit.EnsureNode in bomly-sdk.
  • It said the helper "deliberately merges nothing", while twenty words earlier the same paragraph said scope, relationship and locations union. Since bomly-sdk v0.10.0 the helper wraps Graph.InsertNode, which folds by identity and unions usage facts.

What this does: annotates the ADR in place with a dated amendment (the repo's existing convention, see the ADR-0041 note in the same file) instead of superseding it. The substance still holds: a gap fills, identical claims fold, and a contradiction stays two nodes with no tiebreak. The amendment states that distinction explicitly. internal/detectors/cargo/origin_test.go carried the same stale spelling in a comment and is fixed too.

make verify passes.

Closes #454.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated architectural documentation to clarify node insertion and duplicate-record handling.
    • Revised test commentary to reference the current shared helper.
    • Clarified that matching records are combined, while conflicting assertions remain separate.

The insertion-helper sentence in ADR-0033 was stale twice over: it named
`detectors.EnsureNode`, which was deleted when bomly-sdk v0.9.0 shipped, and
it said the helper "deliberately merges nothing", which stopped being true
when the SDK fold started unioning scopes, locations, relationship and
origins. The same paragraph already said usage facts union, so it
contradicted itself.

Annotated in place with a dated amendment rather than superseded: the
decision the ADR records -- origins are detector-asserted, contradicting
records stay distinct, no tiebreak picks a winner -- still holds. Only the
helper sentence drifted. The cargo origin test carried the same stale
spelling in a comment.

Closes #454.

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

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: fbc8185e-51aa-4b79-8508-5a1a1ee44a54

📥 Commits

Reviewing files that changed from the base of the PR and between f9bd928 and cf2ffcd.

📒 Files selected for processing (1)
  • dev-docs/adr/0033-package-origin-is-detector-asserted.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9b4c6757-32de-4246-a944-ef87c0a1eaa9

📥 Commits

Reviewing files that changed from the base of the PR and between 6d3bcb2 and f9bd928.

📒 Files selected for processing (2)
  • dev-docs/adr/0033-package-origin-is-detector-asserted.md
  • internal/detectors/cargo/origin_test.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change updates ADR-0033 and a related test comment. Both now reference detectorkit.EnsureNode and describe identity folding, usage-fact union, and preservation of contradictory assertions as separate nodes.

Changes

ADR-0033 helper clarification

Layer / File(s) Summary
Document current helper semantics
dev-docs/adr/0033-package-origin-is-detector-asserted.md, internal/detectors/cargo/origin_test.go
The ADR amendment and test comment now reference detectorkit.EnsureNode. The amendment records identity folding, usage-fact union, and separate nodes for contradictory assertions.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to f9bd9

This documentation-only update introduces no runtime or deployment risk and is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the ADR update, the corrected SDK helper name, and the clarified fold behavior. It is specific to the main changes.
Linked Issues check ✅ Passed The amendment to ADR-0033 uses detectorkit.EnsureNode and states that the helper wraps Graph.InsertNode. It explains identity folding and union of scope, relationship, locations, and origins. It p…
Out of Scope Changes check ✅ Passed The pull request changes only ADR-0033 and a related cargo origin test comment. Both changes correct the stale helper reference or clarify the identity-folding semantics required by issue #454. No unr…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/adr-0033-ensurenode

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.

@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Bomly Diff Summary

Compared 6d3bcb2f74136a114ed78b8c203bf28bbfd97aba to cf2ffcd99b606dd53a17e3111bc75b649965fc8a.

Overview

Status Manifests Dependencies Findings Duration
✅ Pass +0 / ~0 / -0 0 added / 0 version changed / 0 detail changes / 0 removed 0 introduced / 0 persisted / 0 resolved 1m 24s

Dependency Changes

✅ No dependency changes.

Vulnerabilities

✅ No vulnerability changes.

License Changes

✅ No license changes.

Project Posture

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

Policy Findings

✅ No policy differences were identified.

@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: f9bd9283c9

ℹ️ 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 dev-docs/adr/0033-package-origin-is-detector-asserted.md Outdated
…ld ADR-0041 decided

Codex review on #456: the amendment said a contradiction stays two nodes,
which is the occurrence model ADR-0041 superseded. Two records of one
identity that assert different origins are one node carrying both origins;
what this ADR still owns is that no tiebreak ever picks one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bomly-guy
bomly-guy merged commit 34d1b36 into main Sep 13, 2026
16 checks passed
@bomly-guy
bomly-guy deleted the docs/adr-0033-ensurenode branch September 13, 2026 07:33
bomly-guy added a commit that referenced this pull request Sep 13, 2026
Two sessions fixed issue #454 in parallel and #456 landed first. Its
amendment is the better one and I kept it whole: it cites the test that
proves the behaviour
(TestConsolidateGraphsFoldsContradictingResolutionsKeepingBoth), pins when
the helper moved (v0.9.0) against when the wrapper behaviour arrived
(v0.10.0), and updates a cargo origin test alongside.

My amendment is dropped rather than merged beside it -- two amendments
answering one issue is the kind of thing that makes an ADR harder to read
than the code it explains.

What survives is the one part #456 does not cover: that "both origins are
kept" is easy to over-read, because MergeOrigins does drop an entry that
fails validation, an exact duplicate keyed on normalized form, and a
narrowly superseded one. The supersession rule is worth stating because it
is the only drop that touches a disagreement, and it is narrow by design
-- two genuinely different places both survive, that being the shape of a
dependency-confusion signal rather than noise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

ADR-0033's prose contradicts itself and names a symbol that moved

1 participant