Repository navigation
feat(store): store pull requests and their issue links (RIG-4034) - #1900
Open
rigel-mintaka wants to merge 1 commit into
Open
rigel-mintaka wants to merge 1 commit into
rigel-mintaka wants to merge 1 commit into
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Compass engineering docs preview: https://compass-obs-rig-4034-t1-pr-s.compass-eng-docs.pages.dev Deployed from |
rigel-mintaka
marked this pull request as ready for review
October 7, 2026 04:44
rigel-mintaka
marked this pull request as draft
October 7, 2026 04:45
Contributor
Author
Adds PullRequestIssueLink to CreatePullRequestRequest, migration 0003 (pull_requests, pull_request_issue_links, prs_backfilled_at), and the store API the projection reads: CreatePullRequestWithLink, UpsertPullRequest, PullRequestsForIssues and FallbackIssuesForTarget. Spec-impact: none. Refs RIG-4034 Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-obs/rig-4034-t1-pr-store
branch
from
October 7, 2026 06:21
9362ea1 to
be700a4
Compare
This was referenced Oct 7, 2026
rigel-mintaka
marked this pull request as ready for review
October 7, 2026 11:09
mattwilkinsonn
added this pull request to stack #1947
October 8, 2026 03:17
mattwilkinsonn
approved these changes
Oct 8, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack containing 5 PRs:
mainSummary
This is the first build slice of the PR-to-issue linkage design (
docs/designs/server/compass-issue-model-pr-linkage-amendment/design.md, Plan T1). Nothing calls the new code yet: T2 and T4 wire it in.CreatePullRequestRequest.issue = 7, carrying a newPullRequestIssueLinkmessage. Go and agent TS are regenerated.0003_pull_request_links.sql:pull_requeststable, with the PR stored whole as JSONB.pull_request_issue_links(source 1 = explicit, 2 = closing ref) and its issue index.forge_repo_subscriptions.prs_backfilled_at.set_updated_attrigger is created onpull_requests.CreatePullRequestWithLinkwrites the ownership row, the PR row (an existing hydrated row wins) and the explicit link in one transaction.UpsertPullRequestis guarded by recency and replaces closing refs. It returns the issues linked before and after the write.PullRequestsForIssuesreturns PRs ordered by forge creation time. A PR attaches to an issue through a closing ref only when none of its explicit targets is on the board.FallbackIssuesForTarget.Verification
affected, and no explicit link.go test -tags pgtest ./internal/store/... ./server/... ./internal/ingest/...and the non-pgtest store suite pass.golangci-lintreports no new findings;sqlc generateandbuf generateare clean.Risks
This is a new append-only migration. It adds tables, plus one nullable column on an existing table, and changes no existing rows.
Compatibility
The proto field is additive. Old clients leave
issueunset.Documentation
None. The design record already describes the change.
Refs RIG-4034