fix(github): retry label and assignee writes on stale installation tokens - #6306
Conversation
…kens ensurePullRequestLabel, removePullRequestLabel, and ensurePullRequestAssignee now use withInstallationTokenRetry so a 401 (or scope 403) invalidates the cached token and retries once — matching the other GitHub-write helpers. Closes JSONbored#6191 Co-authored-by: Cursor <cursoragent@cursor.com>
ensurePullRequestLabel now uses withInstallationTokenRetry, so a permission-scope 403 remints and retries — doubling the label POST count in the label-only public-surface failure regression. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-16 01:06:14 UTC
Review summary Nits — 5 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
@Loopover CI is green on this PR (validate + all test shards + validate-tests-merge). Patch coverage is 100%. Please re-run review with the updated CI status. |
Summary
ensurePullRequestLabel,removePullRequestLabel, andensurePullRequestAssigneeinwithInstallationTokenRetry, matchingpostPullRequestComment,closePullRequest, and the other GitHub-write helpers.#6191).Closes #6191
Scope
src/github/labels.ts,src/github/assignees.ts, matching unit tests)withInstallationTokenRetryhelper — no new retry semantics invented hereValidation
github-labels.test.ts,github-assignees.test.ts,queue-4.test.ts)#6191Safety
{ applied: false }/ throw without inventing successMade with Cursor