Skip to content

Scope dependency tickets by ecosystem to prevent cross-registry merges#50

Open
stevelandeydescript wants to merge 1 commit intomainfrom
stevelandey/fix-confabulation
Open

Scope dependency tickets by ecosystem to prevent cross-registry merges#50
stevelandeydescript wants to merge 1 commit intomainfrom
stevelandey/fix-confabulation

Conversation

@stevelandeydescript
Copy link
Copy Markdown
Collaborator

@stevelandeydescript stevelandeydescript commented May 1, 2026

When an npm package and a PyPI package share the same name (e.g., "braintrust"), they were merged into a single ticket with a nonsensical mixed target version. The root cause was that both issue reconcilers keyed their internal dedup maps by package name alone, even though mergeProviderDependencies() already correctly keys by ecosystem::name.

The fix has three parts:

Ticket titles now include an ecosystem tag: "[Dependicus] [npm] Update braintrust from 0.1.0 to 3.9.0". extractDependencyNameFromTitle parses the tag and returns "npm::braintrust" as the dependency identity.

Internal maps in both the Linear and GitHub reconcilers now key by ecosystem::name, so same-name packages from different registries produce separate tickets.

A findExistingIssue helper provides backward compatibility: it tries the qualified key first, then falls back to the bare name. Old issues (without ecosystem tags) get updated in place rather than closed and recreated. The first ecosystem to claim an old issue wins; other ecosystems get new properly-scoped issues.


Note

Medium Risk
Changes issue deduplication and matching logic in both GitHub and Linear reconcilers, which could affect whether issues are updated vs created/closed if keying or title parsing is wrong. Backward-compat fallback matching and added tests reduce risk but behavior changes in production issue management.

Overview
Prevents same-name packages from different registries (e.g., npm vs PyPI) from being merged into a single Dependicus ticket by scoping dependency identity to ecosystem::name end-to-end.

Ticket titles now include an ecosystem tag (e.g., [npm] ...), extractDependencyNameFromTitle can parse the new tagged format, and buildTicketTitle optionally prefixes titles with the ecosystem.

Both the GitHub and Linear issue reconcilers now key their internal “outdated dependency” and “existing issue” maps by ecosystem::name, while a new findExistingIssue fallback lets previously-created untagged issues be updated in place instead of being recreated. Tests were added to assert cross-ecosystem separation and migration behavior.

Reviewed by Cursor Bugbot for commit d46128a. Bugbot is set up for automated code reviews on this repo. Configure here.

When an npm package and a PyPI package share the same name (e.g.,
"braintrust"), they were merged into a single ticket with a nonsensical
mixed target version. The root cause was that both issue reconcilers
keyed their internal dedup maps by package name alone, even though
mergeProviderDependencies() already correctly keys by ecosystem::name.

The fix has three parts:

Ticket titles now include an ecosystem tag: "[Dependicus] [npm] Update
braintrust from 0.1.0 to 3.9.0". extractDependencyNameFromTitle parses
the tag and returns "npm::braintrust" as the dependency identity.

Internal maps in both the Linear and GitHub reconcilers now key by
ecosystem::name, so same-name packages from different registries produce
separate tickets.

A findExistingIssue helper provides backward compatibility: it tries the
qualified key first, then falls back to the bare name. Old issues
(without ecosystem tags) get updated in place rather than closed and
recreated. The first ecosystem to claim an old issue wins; other
ecosystems get new properly-scoped issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant