Skip to content

feat(forge): read PR timestamps, closing refs and PR list rows (RIG-4034) - #1914

Open
rigel-mintaka wants to merge 1 commit into
compass-obs/rig-4034-t1-pr-storefrom
compass-obs/rig-4034-t2-forge-reads
Open

rigel-mintaka wants to merge 1 commit into
compass-obs/rig-4034-t1-pr-storefrom
compass-obs/rig-4034-t2-forge-reads

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 6 PRs:

  1. main
  2. feat(store): store pull requests and their issue links (RIG-4034) #1900
  3. "feat(forge): read PR timestamps, closing refs and PR list rows (RIG-4034)" (this PR)
  4. feat(board): show linked pull requests on board issues (RIG-4034) #1917
  5. feat(forge): link a created pull request to its issue (RIG-4034) #1926
  6. feat(ingest): hydrate pull requests onto the board (RIG-4034) #1927
  7. feat(ingest): retry PR hydrates held by a budget pause (RIG-4826) #1971

Summary

This is T2 of the PR-to-issue linkage design (docs/designs/server/compass-issue-model-pr-linkage-amendment/design.md, §4). It stacks on #1900. The reconciler and the projection consume these reads in T3 and T5.

  • forge.PullRequest gains CreatedAt, UpdatedAt and ClosingRefs []IssueRef. Both the create response and the detail read decode the timestamps.
  • pullReadQuery reads closingIssuesReferences(first: 25) behind $refs.
    • It is fetched only on the first page of a full read, and never on the checks-only read.
    • A missing connection is an error, so links are never silently cleared.
    • Hitting the cap is logged.
  • ListUpdatedIssues returns UpdatedRows{Issues, Pulls}: PR rows come back in order beside the issues instead of being dropped. The reconciler still sinks only Issues.
  • ListOpenPullRequests is added for the backfill pass.
  • Store: PullRequestUpdatedAt, PRsBackfilledAt and MarkPRsBackfilled.

Verification

  • New httptest cases cover:
    • timestamps on create and on read;
    • closing refs read on page 1 and not on page 2;
    • the checks read skipping them;
    • a GraphQL error failing the read;
    • a missing connection failing the read;
    • PR rows split from issue rows in order;
    • the open-PR list paging.
  • 2 new pgtests cover the reconciler store reads.
  • go test ./..., plus pgtest for store, server, ingest and forge, pass. golangci-lint reports no new findings.
  • Golden fixtures carry the new fields, and created_at is canonicalized for live capture.

Risks

Every PR read now costs one extra GraphQL connection on its first page, inside a call that was already being made.

Compatibility

Internal Go only. No wire or schema change.

Documentation

None. The design record already describes the change.

Refs RIG-4034

@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

RIG-4034

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-obs-rig-4034-t2-forg.compass-eng-docs.pages.dev

Deployed from compass-obs/rig-4034-t2-forge-reads at 5677e58.

…034)

forge.PullRequest gains CreatedAt, UpdatedAt and ClosingRefs. The full
GraphQL read fetches closingIssuesReferences on its first page only.
ListUpdatedIssues returns the PR rows beside the issues, and
ListOpenPullRequests lists open PRs for the backfill. The store gains
PullRequestUpdatedAt, PRsBackfilledAt and MarkPRsBackfilled.

Spec-impact: none. Refs RIG-4034

Co-authored-by: Matt Wilkinson <matt@rigel.build>

This branch has not been deployed

No deployments
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.

2 participants