Skip to content

feat: reconcile stale GitHub PR status - #29

Merged
Codename-11 merged 2 commits into
mainfrom
codex/github-status-reconcile
Jul 14, 2026
Merged

Codename-11 merged 2 commits into
mainfrom
codex/github-status-reconcile

Conversation

@Codename-11

Copy link
Copy Markdown
Owner

Summary

  • add a webhook-first, stale-only repair loop for native GitHub implementation PR links
  • aggregate all check suites plus legacy commit status before trusting completion evidence
  • contain rate limits, permission failures, timeouts, manual refresh collisions, and shared-worker time with settings-driven backoff and budgets
  • slowly re-probe closed PRs so missed reopen events self-heal
  • expose sync/retry diagnostics and reconciliation policy in workspace connection settings

Verification

  • lint (existing repository warnings only)
  • typecheck
  • focused reconciliation/completion coverage: 22/22
  • full Vitest: 1,259 passed, 1 intentional live-connector skip
  • production build
  • serial Playwright: 38/38

@Codename-11
Codename-11 merged commit 8f92c71 into main Jul 14, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +706 to +713
const claimed = await claimGitHubManualSync({
db: args.db,
workspaceId: args.workspaceId,
externalResourceId: args.externalResourceId,
now,
cooldownSeconds: workspace.githubManualCooldownSeconds,
leaseUntil: new Date(now.getTime() + leaseMs),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant