René's URL Explorer Experiment


Title: improvement(oauth): resolve credential tokens in-process instead of hopping the token route by waleedlatif1 · Pull Request #7340 · simstudioai/sim · GitHub

Open Graph Title: improvement(oauth): resolve credential tokens in-process instead of hopping the token route by waleedlatif1 · Pull Request #7340 · simstudioai/sim

X Title: improvement(oauth): resolve credential tokens in-process instead of hopping the token route by waleedlatif1 · Pull Request #7340 · simstudioai/sim

Description: Summary Server-side workflow execution (app container and background workers) now resolves OAuth credential access tokens through the shared application dispatch (resolveCredentialAccessToken) instead of HTTP-POSTing its own /api/auth/oauth/token route — dropping an internal round-trip on every credentialed tool call and per-call internal-JWT mint/verify The route's managed / service-account / plain-OAuth dispatch moved verbatim into lib/oauth/token-resolution.ts; the route is now a thin adapter and its tests pass unmodified. Managed-credential delegations bind in-process (bindExecutorManagedOAuthDelegation) with the same DB re-validation, audience, and per-credential scope as the wire path The browser tool-execution path keeps the HTTP call (session-cookie auth) but now goes through requestJson + the existing contract instead of a raw annotated fetch; the route's wire path stays intact for compatibility during deploy rollout The old rationale for the hop (workers lacking OAuth client config) no longer holds — connector sync has been refreshing tokens in-process on workers for some time. The architecture rule is updated accordingly, and refresh-failure logs now include the underlying cause so a missing provider client pair is diagnosable Cleanups along the way: renamed the unrelated resolveCredentialTokenBundle (was colliding with the new dispatcher name), removed the now-dead executor delegation-header builder, deduped input types, and fixed a falsy impersonateEmail edge so empty subblock state keeps resolving Type of Change Improvement Testing bun run type-check, bun run lint:check, bun run check:audits (40/40 incl. api-validation strict, tool-request/registry boundary) 302 tests across the 14 affected suites; the untouched route test suite passing unmodified pins wire behavior New unit coverage: dispatcher branches (managed delegation codes, scope policy, error projection), in-process delegation binder, executor resolver 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 Server-side workflow execution (app container and background workers) now resolves OAuth credential access tokens through the shared application dispatch (resolveCredentialAccessToken) ins...

X Description: Summary Server-side workflow execution (app container and background workers) now resolves OAuth credential access tokens through the shared application dispatch (resolveCredentialAccessToken) ins...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9e36fa42-2215-d940-7b55-850fdc440542
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE5C8:71943:CBD72:124E3C:6AFB2E70
html-safe-nonce9c4637b54b4bbb117795af33d153a997268ff14a9808e0fe3ed8ddc2d2895a94
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUM4OjcxOTQzOkNCRDcyOjEyNEUzQzo2QUZCMkU3MCIsInZpc2l0b3JfaWQiOiIyMjU1ODE3ODQ3NTc5ODE1NTM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac32a1d329aead0a92f37f473060b45fa3203dc9af6a937b1facb15385f2a4477d
hovercard-subject-tagpull_request:4408360135
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/7340/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Server-side workflow execution (app container and background workers) now resolves OAuth credential access tokens through the shared application dispatch (resolveCredentialAccessToken) ins...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None40c7ffe00e8bbb3ca8403c83d7ef110379c9eba2cbc7a7c333b037ffd940d4e4
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
releasef494d77c37809e03e18d49c6e9945c57e0b64070
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7340/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7340%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7340%2Ffiles
Sign uphttps://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/7340/files
Reloadhttps://github.com/simstudioai/sim/pull/7340/files
Reloadhttps://github.com/simstudioai/sim/pull/7340/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://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
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
audit/route-hop-candidateshttps://github.com/simstudioai/sim/tree/audit/route-hop-candidates
Conversation 6 https://github.com/simstudioai/sim/pull/7340
Commits 9 https://github.com/simstudioai/sim/pull/7340/commits
Checks 26 https://github.com/simstudioai/sim/pull/7340/checks
Files changed https://github.com/simstudioai/sim/pull/7340/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7340/files
improvement(oauth): resolve credential tokens in-process instead of hopping the token route https://github.com/simstudioai/sim/pull/7340/files#top
Show all changes 9 commits https://github.com/simstudioai/sim/pull/7340/files
572ce5f refactor(oauth): extract the token route's dispatch into resolveCrede… waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/572ce5f6e9a0f2aecad3c360e2351b38f9a83ceb
beb24b2 feat(credentials): bind executor managed-OAuth delegations in-process waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/beb24b2ddafef6f16fb12da867944a6480816778
8441031 improvement(executor): resolve credential tokens in-process instead o… waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/8441031566593f2370f66c7a62509038ced57594
4beef48 docs(rules): correct the app/worker boundary guidance after inlining … waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/4beef48b1d4047980275fbdcb220f073e5e1e113
8e7e197 fix(tools): keep dropping falsy impersonation subjects and surface re… waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/8e7e1971337c4363a5be3eb4a6be06fdbbb27597
c4bc8a2 refactor(oauth): apply simplify-pass cleanups to the inlined token re… waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/c4bc8a2aad03f49c131c4337135e6574739432ac
e95c69c chore(executor): trim changelog narration from the resolver TSDoc waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/e95c69c5bf77de066c59f94109fd41c34909dcbc
1d40891 test(oauth): expect the credentialType field the token payload now ca… waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/1d4089161291202d0bf82ab5191890a160b7edbd
20a21ba chore(tools): drop the orphaned wire-payload type and delegation-mint… waleedlatif1 Sep 1, 2026 https://github.com/simstudioai/sim/pull/7340/commits/20a21ba340b9faa3fc762b590d5a143638096215
Clear filters https://github.com/simstudioai/sim/pull/7340/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7340/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7340/files
sim-architecture.md https://github.com/simstudioai/sim/pull/7340/files#diff-e6d8883de197107cb7fb6813809a3eddda290e50a23cde67cf084e4f7cd1c20d
route.ts https://github.com/simstudioai/sim/pull/7340/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
evaluator-handler.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
router-handler.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
credential-token.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-ae12e6477d373adb184734cd825a0008eec825423a79923fafd6d642c9405a8f
credential-token.ts https://github.com/simstudioai/sim/pull/7340/files#diff-f28e1a8048238667216a2e8a00cfa9f9105c72daed61ca58a00701241e091cd0
http.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-9f5e99b1144646155b2704254a3e5be0b885a50668acf7cf8f4aa50c4493a180
http.ts https://github.com/simstudioai/sim/pull/7340/files#diff-9be84f4cc542a4d8b4b68f5387792d9296f2822e15c22301f233d39b5ef687f5
vertex-credential.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
vertex-credential.ts https://github.com/simstudioai/sim/pull/7340/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
managed-oauth-delegation.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-00f9babe6332060db1b0c407e0fa65ea15c3c1c1b9c991c7ce4389d8822f30a7
managed-oauth-delegation.ts https://github.com/simstudioai/sim/pull/7340/files#diff-206988c67a2a88445383b0bdbfe6ab5012ae73a894db50b4d580450b0b455009
executor.ts https://github.com/simstudioai/sim/pull/7340/files#diff-bae63b740ab0819dafa7a82679e4b8fecd0418a508ed9d36d805861047175954
credential-service.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-436d1bec92f572ebd755e550bcec174f860c4c8be1dc751e1dd6498685c7bf55
credential-service.ts https://github.com/simstudioai/sim/pull/7340/files#diff-effb7c3ce97c223dad84239d969592e6300167d635dab9fdfc4bb30120ec3c47
token-resolution.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-16ae568c87f3e64994fda98d9e5a556aed142f05475c7d282609d8e1fe6a123d
token-resolution.ts https://github.com/simstudioai/sim/pull/7340/files#diff-eb45a826aabd65f6aaa1eab17273a322d0fc9cc70dd8ff857a02019552df52e4
credentials.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-f005d56676c014f56ba27c1616b2e86e8dba282de0fd05aef35e3c04036aaf85
credentials.ts https://github.com/simstudioai/sim/pull/7340/files#diff-9de992c99673d5101a29fcc76200917845cb8a7abda8c11f521b5fd657e7fd49
credential-bundle.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-674da8bc6373db10896b521f03633706c219a26c1d2473b9635f24cfc83a0162
credential-bundle.ts https://github.com/simstudioai/sim/pull/7340/files#diff-23a73a5d2743e06e556e8d104ea083878e3bf9efe0bdccbb405203a75ffdf93f
index.test.ts https://github.com/simstudioai/sim/pull/7340/files#diff-9ba0f7033f9247e496b4f9e0f46183a13c79b1bb48d721ba4bf042bdd08e4dd0
index.ts https://github.com/simstudioai/sim/pull/7340/files#diff-47ae0066fea628681d98d136239929a240a55aaf3d99ef293c83b3eca7e197c1
types.ts https://github.com/simstudioai/sim/pull/7340/files#diff-183540ce4359174673a854639c5032c16e740cb4951781bf2591b50f1cb68fac
.claude/rules/sim-architecture.mdhttps://github.com/simstudioai/sim/pull/7340/files#diff-e6d8883de197107cb7fb6813809a3eddda290e50a23cde67cf084e4f7cd1c20d
View file https://github.com/simstudioai/sim/blob/20a21ba340b9faa3fc762b590d5a143638096215/.claude/rules/sim-architecture.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7340/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7340/files#diff-e6d8883de197107cb7fb6813809a3eddda290e50a23cde67cf084e4f7cd1c20d
https://github.com/simstudioai/sim/pull/7340/files#diff-e6d8883de197107cb7fb6813809a3eddda290e50a23cde67cf084e4f7cd1c20d
apps/sim/app/api/auth/oauth/token/route.tshttps://github.com/simstudioai/sim/pull/7340/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
View file https://github.com/simstudioai/sim/blob/20a21ba340b9faa3fc762b590d5a143638096215/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/7340/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7340/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
https://github.com/simstudioai/sim/pull/7340/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
https://github.com/simstudioai/sim/pull/7340/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
https://github.com/simstudioai/sim/pull/7340/files#diff-4f2c50ce21f6ddc5615f4857868d62e8a43e210f4bb1d72647c1f5ea5c7ed5fa
apps/sim/executor/handlers/evaluator/evaluator-handler.test.tshttps://github.com/simstudioai/sim/pull/7340/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
View file https://github.com/simstudioai/sim/blob/20a21ba340b9faa3fc762b590d5a143638096215/apps/sim/executor/handlers/evaluator/evaluator-handler.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7340/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7340/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
https://github.com/simstudioai/sim/pull/7340/files#diff-349e75800134134493a5cf8a0b973c1e34b59ac553ecdb34c7454315317ad931
apps/sim/executor/handlers/router/router-handler.test.tshttps://github.com/simstudioai/sim/pull/7340/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
View file https://github.com/simstudioai/sim/blob/20a21ba340b9faa3fc762b590d5a143638096215/apps/sim/executor/handlers/router/router-handler.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7340/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7340/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
https://github.com/simstudioai/sim/pull/7340/files#diff-301aff0677f688a704026c1673c63a966b446606b77ea8758ff0c537a88a49ce
apps/sim/executor/utils/credential-token.test.tshttps://github.com/simstudioai/sim/pull/7340/files#diff-ae12e6477d373adb184734cd825a0008eec825423a79923fafd6d642c9405a8f
View file https://github.com/simstudioai/sim/blob/20a21ba340b9faa3fc762b590d5a143638096215/apps/sim/executor/utils/credential-token.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7340/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/7340/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7340/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.