Repository navigation
fix(code): List PRs that credit you as requester in Code · Mine - #4313
Conversation
Code · Mine and People profiles matched a code change only through the actors of its linked Conversations. A PR that a Thread or an Automation run opened for someone else did not show for the person it credits. The code plugin now passes the saved requesters with each code change, core stores them on junior_code_changes, and the person scope also matches changes that credit one of the person's Identities. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment has been minimized.
This comment has been minimized.
…ters Co-Authored-By: BYK <[email protected]>
|
3 screenshot changes — 3 changed · 0 added · 0 removed Review screenshots in Frameshift
|
Add PluginCodeChanges.associateRequesters and give tools the plugin's code changes. The GitHub plugin credits saved requesters after it records a code change and after it saves a requester, so a new PR shows in Code · Mine whichever write comes first. This replaces the requester reads in the daily reconcile. A one-off started task backfills requesters for open, merged, and closed PRs from the stored requester rows, with no GitHub reads. Co-Authored-By: BYK <[email protected]>
This comment has been minimized.
This comment has been minimized.
…igrations main added migrations after this branch's two, so the migrations folder had two leaf snapshots. Generate the same two migrations again on top of main's latest. Add associateRequesters to the memory storage test's code changes.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e748c5e. Configure here.
| name: args.repositoryFullName, | ||
| numbers: [...requesters.keys()], | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Requester sync misses renamed repositories
Medium Severity
syncGitHubPullRequestRequesters finds code changes by repositoryFullName from junior_github_pull_request_requesters, but that table never updates names. The code index does, via lifecycle webhooks and repairRepositoryNames. The heartbeat starts that repair immediately before this backfill, and the repair finishes in one run while the backfill pages across heartbeats, so renamed repos are rewritten first. Historical requester rows then miss their code changes, and later webhooks look up the new name and miss those rows too, so Code · Mine never lists those PRs for the credited people.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit e748c5e. Configure here.
- #4290, #4224, #4313, and #4279 merged close together and left 4 leaf migration snapshots. This adds one merge migration with no schema change. - `ConversationPage.tsx` went over the 1,000-line limit. The details-open state moves to `useConversationDetailsOpen.ts`, with no behavior change. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3Acd758c17e15a7ab7f6bcb4c1 --> -- [View Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3Acd758c17e15a7ab7f6bcb4c1) [[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Acd758c17e15a7ab7f6bcb4c1/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
This prepares `main` for a merge queue. Two PRs that each add a migration off the same parent both pass CI on their own, then leave two migration leaves on `main`. That happened with #4377 and #4120, and before them with #4224, #4290, #4313 and #4279. A merge queue tests each PR merged on top of the ones ahead of it, but only if `ci / required` reports on `merge_group` runs. That's what this adds. On `merge_group`, `getsentry/action-filter-paths` matches every filter, as on a push, so every path-gated job that `ci / required` needs runs. Two jobs still skip, as they do on a push to `main`, and a skipped job passes `ci / required`: - `pack-release-artifacts` runs only on push. - `ios` runs only on pull requests, because `ios.yml` runs on its own for pushes to `main`. Frameshift doesn't save or report screenshots on queue runs. Turning on the merge queue itself is a separate change to the `main` ruleset. "Require branches to be up to date" stays off. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A9ec51d25699838a155f2ddc2f0ffb45f --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A9ec51d25699838a155f2ddc2f0ffb45f) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A9ec51d25699838a155f2ddc2f0ffb45f/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>


Code · Mine and People profiles match a code change only through the actors of its linked Conversations (
ownedByUserSql). A PR that a Thread or an Automation run opens for a person who did not start that Conversation is missing from that person's Mine, even though the PR credits them as requester.Who counts
Everyone the PR credits, the same people as the "via @…" line: the person who asked Junior to open it and each person who asked Junior to update it.
Plugin contract
PluginCodeChanges.associateRequesters({ identityIds, providerId })credits people on an existing code change. LikeassociateConversations, it only adds.codeChanges, so a tool can credit its requester on the code change.GitHub plugin
syncGitHubPullRequestRequesterscopies the saved rows fromjunior_github_pull_request_requestersto the code index.openedwebhook arrives before or after the create tool saves the opener.backfillPullRequestRequesters, credits the saved requesters of every open, merged, and closed PR. The heartbeat starts one page of 200 at a time with a cursor, and a done key stops it after the last page. It reads only the stored requester rows and makes no GitHub calls. A PR that the code index does not have yet gets its requesters when its lifecycle webhook records it.Core
junior_code_changes.requester_identity_idswith a GIN index. The index has its ownCONCURRENTLYmigration, like the other indexes on this table.ownedByUserSqladds aUNION ALLbranch to the sameIN (…)subquery. It joins the user's Identities torequester_identity_ids @> ARRAY[identity.id]through the GIN index. Paging, the cursor, andPERSON_CHANGE_LIMITdo not change. People profiles andreadPersonMergedChangesuse the same scope.conversation_ids, so PRs from one Conversation or Automation still stack together in Mine.No visible UI change.
via @BYK.
--
View Session [Sentry]