René's URL Explorer Experiment


Title: fix(oauth): coalesce slack token refresh per installation and preserve provider refresh errors by TheodoreSpeaks · Pull Request #5723 · simstudioai/sim · GitHub

Open Graph Title: fix(oauth): coalesce slack token refresh per installation and preserve provider refresh errors by TheodoreSpeaks · Pull Request #5723 · simstudioai/sim

X Title: fix(oauth): coalesce slack token refresh per installation and preserve provider refresh errors by TheodoreSpeaks · Pull Request #5723 · simstudioai/sim

Description: Summary Slack bot tokens are per-installation (team × app), but every connect creates a new `account` row holding a copy of the same rotating token chain — each row refreshed independently and revoked the siblings' copies, causing intermittent `token_revoked` failures Key Slack refresh coalescing (singleflight + leader lock) and terminal-error dead flags per installation (`oauth:refresh:slack:`) instead of per account row Leader refreshes using the freshest sibling's refresh token and fans the new chain out to all sibling rows of the team, so stale rows self-heal; fresh connects propagate their newly issued chain the same way Slack lock budgets (follower wait + lock TTL) sized past the 15s provider timeout so followers observe slow-but-successful refreshes Legacy pasted `slack-bot-*` rows keep per-row behavior Add `token_revoked` to the terminal refresh-error set Type of Change Bug fix Testing Added unit coverage for installation-keyed locking, freshest-chain selection, fan-out writes, legacy row behavior, and installation-scoped dead flags. `bun run lint`, `bun run check:api-validation:strict`, and `tsc --noEmit` pass. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Slack bot tokens are per-installation (team × app), but every connect creates a new `account` row holding a copy of the same rotating token chain — each row refreshed independently and rev...

X Description: Summary Slack bot tokens are per-installation (team × app), but every connect creates a new `account` row holding a copy of the same rotating token chain — each row refreshed independently and rev...

Opengraph URL: https://github.com/simstudioai/sim/pull/5723

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2b7b2a63-f6f2-4d28-a6c2-5ae8d432f5bd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA4F8:188F24:1056CA0:1799364:6A633220
html-safe-nonce7f8b791f19b018545a801d4ccde60a03cd1a8f69d0a2ce71af4270f1cea05c68
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEY4OjE4OEYyNDoxMDU2Q0EwOjE3OTkzNjQ6NkE2MzMyMjAiLCJ2aXNpdG9yX2lkIjoiMzY5NjcxNTAwNTU4NzA5MjgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac743219e4234a83175cef93147c1f44171019d8c3466fc954d1d90aa0f49c4f00
hovercard-subject-tagpull_request:4072516724
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5723/files
twitter:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
og:image:altSummary Slack bot tokens are per-installation (team × app), but every connect creates a new `account` row holding a copy of the same rotating token chain — each row refreshed independently and rev...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonedf6e1c2adcceb061ec8c4106a1b34f38280f08e13f2b195c661c202834cbc3b1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release822a0ff2a479845adcdd40a1a7b1734a56e05818
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5723/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5723%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5723%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/5723/files
Reloadhttps://github.com/simstudioai/sim/pull/5723/files
Reloadhttps://github.com/simstudioai/sim/pull/5723/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5723/files
simstudioai https://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Notifications https://github.com/login?return_to=%2Fsimstudioai%2Fsim
Fork 3.7k https://github.com/login?return_to=%2Fsimstudioai%2Fsim
Star 29.2k https://github.com/login?return_to=%2Fsimstudioai%2Fsim
Code https://github.com/simstudioai/sim
Issues 111 https://github.com/simstudioai/sim/issues
Pull requests 121 https://github.com/simstudioai/sim/pulls
Actions https://github.com/simstudioai/sim/actions
Projects https://github.com/simstudioai/sim/projects
Security and quality 0 https://github.com/simstudioai/sim/security
Insights https://github.com/simstudioai/sim/pulse
Code https://github.com/simstudioai/sim
Issues https://github.com/simstudioai/sim/issues
Pull requests https://github.com/simstudioai/sim/pulls
Actions https://github.com/simstudioai/sim/actions
Projects https://github.com/simstudioai/sim/projects
Security and quality https://github.com/simstudioai/sim/security
Insights https://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
TheodoreSpeakshttps://github.com/TheodoreSpeaks
staginghttps://github.com/simstudioai/sim/tree/staging
fix/cred-refresh-errorhttps://github.com/simstudioai/sim/tree/fix/cred-refresh-error
Conversation 27 https://github.com/simstudioai/sim/pull/5723
Commits 6 https://github.com/simstudioai/sim/pull/5723/commits
Checks 19 https://github.com/simstudioai/sim/pull/5723/checks
Files changed https://github.com/simstudioai/sim/pull/5723/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5723/files
fix(oauth): coalesce slack token refresh per installation and preserve provider refresh errors https://github.com/simstudioai/sim/pull/5723/files#top
Show all changes 6 commits https://github.com/simstudioai/sim/pull/5723/files
fa4b65a fix(oauth): coalesce slack token refresh per installation and preserv… TheodoreSpeaks Jul 16, 2026 https://github.com/simstudioai/sim/pull/5723/commits/fa4b65ad3bc207a88c79f50b981178290bef0f98
2c64932 fix(oauth): keep transient refresh failures errorless and size slack … TheodoreSpeaks Jul 16, 2026 https://github.com/simstudioai/sim/pull/5723/commits/2c649324a98183ac8d41d6377a07aef586454418
c60a39b fix(oauth): let slack refresh followers poll for the lock's full life… TheodoreSpeaks Jul 16, 2026 https://github.com/simstudioai/sim/pull/5723/commits/c60a39be381181bf3ee58c4d5c721ea3e71d6b47
54a38be chore(oauth): drop provider refresh-error surfacing to keep this PR s… TheodoreSpeaks Jul 17, 2026 https://github.com/simstudioai/sim/pull/5723/commits/54a38bee037cb8bc5d6681f3172229a4d28cc68c
3708198 fix(oauth): version-guard slack chain writes against concurrent connects TheodoreSpeaks Jul 17, 2026 https://github.com/simstudioai/sim/pull/5723/commits/3708198f41fad13e34dcd24313ef6cb2a121d4f5
a0b4518 fix(oauth): clear slack dead flag before connect fan-out TheodoreSpeaks Jul 17, 2026 https://github.com/simstudioai/sim/pull/5723/commits/a0b45186a54e8edbd0b53e3f750eb5839f993173
Clear filters https://github.com/simstudioai/sim/pull/5723/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5723/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5723/files
route.ts https://github.com/simstudioai/sim/pull/5723/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
utils.test.ts https://github.com/simstudioai/sim/pull/5723/files#diff-f844ab4348b68fb55ef7045834e5740fcdedc44b8cb25da82224a678de2b8a08
utils.ts https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
auth.ts https://github.com/simstudioai/sim/pull/5723/files#diff-1196450729bfda994f3823921eacd28e3200408dbb562d8481108db9abe4a0e2
slack.test.ts https://github.com/simstudioai/sim/pull/5723/files#diff-97d41b0617360dd50310b1ecc7dccb617c0a0847628632d057940daa835a9a09
slack.ts https://github.com/simstudioai/sim/pull/5723/files#diff-be579941bfb7d29d28ca6fced5c370eccfdf50b4f27fa1f52cbbd9a4f10c976a
terminal-errors.ts https://github.com/simstudioai/sim/pull/5723/files#diff-3866dbeaa37b3885bb23587c9362ae6b8a743aadec3acd6138b7f167c0cc8cde
apps/sim/app/api/auth/oauth/token/route.tshttps://github.com/simstudioai/sim/pull/5723/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
View file https://github.com/simstudioai/sim/blob/a0b45186a54e8edbd0b53e3f750eb5839f993173/apps/sim/app/api/auth/oauth/token/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5723/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5723/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
https://github.com/simstudioai/sim/pull/5723/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
apps/sim/app/api/auth/oauth/utils.test.tshttps://github.com/simstudioai/sim/pull/5723/files#diff-f844ab4348b68fb55ef7045834e5740fcdedc44b8cb25da82224a678de2b8a08
View file https://github.com/simstudioai/sim/blob/a0b45186a54e8edbd0b53e3f750eb5839f993173/apps/sim/app/api/auth/oauth/utils.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5723/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5723/files#diff-f844ab4348b68fb55ef7045834e5740fcdedc44b8cb25da82224a678de2b8a08
https://github.com/simstudioai/sim/pull/5723/files#diff-f844ab4348b68fb55ef7045834e5740fcdedc44b8cb25da82224a678de2b8a08
apps/sim/app/api/auth/oauth/utils.tshttps://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
View file https://github.com/simstudioai/sim/blob/a0b45186a54e8edbd0b53e3f750eb5839f993173/apps/sim/app/api/auth/oauth/utils.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5723/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
https://github.com/simstudioai/sim/pull/5723/files#diff-5867ff1f1dadc2abbea63e486d49b5e1d145956d1e8488e40838a6187c69f25f
Please reload this pagehttps://github.com/simstudioai/sim/pull/5723/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5723/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.