sandbox-agent/foundry/research
Nathan Flurry fa4ed388d2 Defer slow GitHub org sync to workflow queue for fast OAuth callback
Split syncGithubSessionFromToken into a fast path (initGithubSession:
exchange code, get viewer, store token+identity) and a slow path
(syncGithubOrganizations: list orgs/installations, sync workspaces).

completeAppGithubAuth now returns the 302 redirect in ~2s instead of
~18s by enqueuing the org sync to the workspace workflow queue
(fire-and-forget). This eliminates the proxy timeout window that was
causing duplicate callback requests.

bootstrapAppGithubSession (dev-only) still calls the full synchronous
sync since proxy timeouts are not a concern and it needs the session
fully populated before returning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 00:09:22 -07:00
..
friction Defer slow GitHub org sync to workflow queue for fast OAuth callback 2026-03-13 00:09:22 -07:00
specs Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00
roadmap.md Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00