fix(server): prevent silent session forks when switching provider accounts #6148
ClosedDavidIlie(GitHub profile, opens in a new tab)wants to merge 3 commits into
main fromrefs/pull/6148/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/provider/Layers/ProviderService.ts line 578Resolvedby DavidIlie(GitHub profile, opens in a new tab)@@ -566,3 +566,11 @@566566 );567567 }568568 const persistedBinding = Option.getOrUndefined(yield* directory.getBinding(threadId));569+ const persistedResumeCursor = persistedBinding?.resumeCursor;570+ const hasPersistedResumeCursor =571+ persistedResumeCursor !== null && persistedResumeCursor !== undefined;572+ let canReusePersistedState = persistedBinding?.providerInstanceId === resolvedInstanceId;573+ // Instance ids are routing labels, while continuation identities describe574+ // where provider-owned resume state lives. A persisted cursor may cross575+ // labels only when both instances can resolve that same state.576+ if (
DavidIlie(GitHub profile, opens in a new tab) changed the title
DavidIlie(GitHub profile, opens in a new tab) changed the title
juliusmarminge added labelsmacroscope-review
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
328b26ba-17c9-44d0-bc8b-0bfd152a05d0You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share