Skip to content

fix(github): Retry the outcome when the owner lookup fails - #4102

Merged
BYK merged 1 commit into
mainfrom
fix/github-outcome-lookup-retry
Nov 23, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/github-outcome-lookup-retry

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #4096.

When a pull request merged or closed, applyGitHubPullRequestOutcome read the Conversation that owns its asks after it wrote the outcome row. If that read failed, the error was only logged. Every linked chip then turned merged or closed while the asks stayed open. Because the row was already recorded, neither a redelivery nor the daily reconcile tried again.

Now the owner lookup runs before the row is written, and its error is not caught. It reaches the webhook or reconcile boundary like any other unexpected failure. The row stays open, so the next delivery or reconcile applies the whole outcome once: the row, the code index, the opener's chip with its asks, and the other chips. Nothing was written before the failure, so the retry does not apply anything twice.

A failed chip or Inbox item write is still logged and does not stop the work after it, as before.

via @BYK.

--

View Session [Sentry]

A failed read of the pull request's requester was only logged. Every chip
then turned merged while its asks stayed open, and the recorded row kept
the reconcile from trying again. Read the owner before the row is written
and let the error reach the webhook or reconcile boundary, so the row stays
open and the next delivery or reconcile applies the whole outcome.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 23, 2026 15:55
@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 23, 2026 3:55pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 23, 2026

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be good to have a general retry system here instead of one single retry.

@BYK
BYK enabled auto-merge (squash) November 23, 2026 16:00
@sentry-junior

sentry-junior Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

This keeps retrying, not just once. A failed lookup writes nothing, so the stored row stays open, and every daily reconcile runs the outcome again until it applies. A webhook redelivery applies it too. A general retry system, such as a durable queue with backoff for outcome writes, would be a separate design, so I've left it out of this PR.

@BYK
BYK merged commit 73cacce into main Nov 23, 2026
55 checks passed
@BYK
BYK deleted the fix/github-outcome-lookup-retry branch November 23, 2026 16:14

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 87118946 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant