Skip to content

Conversation

@nora-shap
Copy link
Member

Problem

EventFileCommittersEndpoint uses _get_serialized_committers_from_group_owners which filters for GroupOwners with commitId in context:

owner = next(filter(lambda go: go.context.get("commitId"), group_owners), None)

RELEASE_BASED suspect commits only store suspectCommitStrategy, not commitId, so they're never displayed on the Issue detail page.

Solution

Match the SCM_BASED pattern by:

  1. Tracking the highest-scoring commit for each author
  2. Storing commitId in context_defaults
  3. Including commitId in lookup_kwargs for proper deduplication

@linear
Copy link

linear bot commented Nov 8, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 8, 2025
"user_id": owner_id,
"project_id": project.id,
"organization_id": project.organization_id,
"context__asjsonb__commitId": owner_commits[owner_id],
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Owner Duplication: Lookup Prevents Record Updates

Including commitId in lookup_kwargs prevents updating existing GroupOwner records when the same author has a new suspect commit. Instead of updating the existing owner's commitId, a new GroupOwner is created, causing duplicate owners for the same user/group combination and breaking the PREFERRED_GROUP_OWNERS limit enforcement. The lookup should match on (group_id, type, user_id, project_id, organization_id) to update existing records, not create duplicates.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants