fix(github): self-heal stale installation tokens on collaborator/user reads - #9401
Conversation
JSONbored#9085 Update the Postgres retention mock for PK-ordered deletes and flip the confidence-less salvageability assertion to match CONFIDENCE_WHEN_UNSTATED. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-27 16:28:13 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed 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://loopover.ai/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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9401 +/- ##
===========================================
- Coverage 89.47% 75.49% -13.98%
===========================================
Files 837 276 -561
Lines 109639 58322 -51317
Branches 26109 6293 -19816
===========================================
- Hits 98097 44032 -54065
- Misses 10279 14015 +3736
+ Partials 1263 275 -988
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Closes #9315
Summary
nulland non-token failures still throw (collaborator) or fail-open tonull(user created_at).Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpx vitest run test/unit/github-app.test.ts -t "9315|collaborator permission|getGithubUserCreatedAt"— 8 passedtest/unit/github-app.test.ts— 103+ passed (incl. new cases)npm run test:ci(full gate; run before push)If any required check was skipped, explain why:
Implementation + targeted regression tests complete. Full
test:cileft for the opener.Safety
site/,CNAME,**/lovable/**, or rootCHANGELOG.md.UI Evidence
N/A — GitHub App token-retry plumbing only; no visible UI change.
Notes for reviewers / gate
statuson the thrown Error soisGitHubBadCredentialsErrorrecognizes empty-body 401s.getGithubUserCreatedAtthrows on 401/403 inside the retry wrapper (so a stale token can self-heal) and still fail-opens via the outercatchfor anything that is not healed.