Repository navigation
feat: reconcile stale GitHub PR status - #29
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3d4c12441
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const claimed = await claimGitHubManualSync({ | ||
| db: args.db, | ||
| workspaceId: args.workspaceId, | ||
| externalResourceId: args.externalResourceId, | ||
| now, | ||
| cooldownSeconds: workspace.githubManualCooldownSeconds, | ||
| leaseUntil: new Date(now.getTime() + leaseMs), | ||
| }); |
There was a problem hiding this comment.
Persist GitHub retry headers for manual refresh failures
When a manual refresh hits a provider error before upsertExternalResource() runs, this lease remains the only persisted state: the thrown GitHubRequestError is not caught, so syncRetryAt stays at the temporary lease deadline instead of the provider reset/backoff and syncLastError is not recorded. For a user clicking Sync during a GitHub 429/403/timeout, subsequent manual/background attempts can retry as soon as the short lease expires rather than respecting the rate-limit reset, while the issue panel has no diagnostic for the real failure.
Useful? React with 👍 / 👎.
Summary
Verification