Skip to content

feat(ingest): hydrate pull requests onto the board (RIG-4034) - #1927

Draft
rigel-mintaka wants to merge 2 commits into
compass-obs/rig-4034-t4-create-linkfrom
compass-obs/rig-4034-t5-ingest
Draft

rigel-mintaka wants to merge 2 commits into
compass-obs/rig-4034-t4-create-linkfrom
compass-obs/rig-4034-t5-ingest

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) #1914
  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)" (this PR)
  7. feat(ingest): retry PR hydrates held by a budget pause (RIG-4826) #1971

Summary

This is T5 of the PR-to-issue linkage design (docs/designs/server/compass-issue-model-pr-linkage-amendment/design.md, §4). It stacks on the T4 PR.

  • Webhook arm
    • Admits every PR event.
    • Resolves a SHA-only CHECKS event through the notify lane's shared resolver cache; a disabled repo spends no lookup.
    • Keys coalescing on repo, kind, and number or SHA.
  • PullRequestHydrator: reads, owner-strips, stamps and sinks a PR through PublishPullRequestUpdate.
  • Reconciler
    • Hydrates listed PR rows newer than the stored forge_updated_at.
    • On cold start, skips closed PRs older than 30 days.
    • A budget error on a PR row keeps the watermark at since with no ETag.
  • Backfill
    • Runs once per repo over open PRs plus rows updated in the 30 days before the watermark.
    • A failed row leaves the repo unmarked, so the next sweep retries.
  • Store and cache
    • BoardStore gains PullRequestUpdatedAt, PRsBackfilledAt and MarkPRsBackfilled.
    • The head-SHA cache key ignores repo case.

Verification

  • Ingest unit tests cover every case in the design's T5 test list, plus:
    • the disabled-repo lookup skip;
    • the resolver budget pause;
    • coalescing in both orders;
    • the backfill retry.
  • Fixes were mutation-probed red.
  • A pgtest runs the backfill through the real store adapter.
  • go test ./..., pgtests and golangci-lint pass.

Risks

  • PR hydrates spend the shared App budget, about one per coalesced burst.
  • The backfill walks a 30-day window once per repo.

Compatibility

No wire change.

Documentation

None. The design record covers it.

Spec-impact: none. 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-t5-inge.compass-eng-docs.pages.dev

Deployed from compass-obs/rig-4034-t5-ingest at 9f04574.

@rigel-mintaka
rigel-mintaka force-pushed the compass-obs/rig-4034-t5-ingest branch from fcad847 to d188022 Compare October 7, 2026 07:02
@rigel-mintaka
rigel-mintaka force-pushed the compass-obs/rig-4034-t5-ingest branch from d188022 to 78bd60c Compare October 7, 2026 08:24
rigel-mintaka and others added 2 commits October 7, 2026 05:54
The board webhook arm admits every pull request event and maps a checks
event to its PR by head SHA. The reconciler hydrates PR rows newer than
the stored row, keeps the watermark at since when the budget runs out,
and runs a one-time backfill of open and recent PRs per repo.

Spec-impact: none. Refs RIG-4034

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

wip t5 fixes
…RIG-4034)

A recent closed PR that failed to hydrate in the cold-start walk no longer lets the backfill mark the repo, so the next sweep's window re-lists it.

Spec-impact: none. Refs RIG-4034

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-obs/rig-4034-t5-ingest branch from 78bd60c to 9f04574 Compare October 7, 2026 09:58
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review October 7, 2026 11:09
@rigel-mintaka
rigel-mintaka marked this pull request as draft October 7, 2026 11:10
@mattwilkinsonn
mattwilkinsonn added this pull request to stack #1947 October 8, 2026 03:17

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