feat(browser): isolate harness-browser profiles per Octop user - #568
Open
jubaoliang wants to merge 1 commit into
Open
feat(browser): isolate harness-browser profiles per Octop user#568jubaoliang wants to merge 1 commit into
jubaoliang wants to merge 1 commit into
Conversation
Replace the legacy shared/default Playwright session router with per-user harness-browser profiles (`user-<id>`) so concurrent users no longer share one Chrome session, cookie jar, or recording. The backend now always derives the profile from the authenticated user (or the IM thread's agent owner) instead of trusting client-supplied profile/session ids, and a BrowserProfileMiddleware pins tool-selected profiles to the same boundary. Also dedupes ThreadRegistry's session-refresh logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
browser/sessions.py) with per-user harness-browser profiles (user-<id>), so concurrent Octop users no longer share one Chrome session, cookie jar, or recording.harness-sessions,handoff,shutdown, record/replay) now always derive the browser profile from the authenticated user (or the IM thread's agent owner for gateway turns) instead of trusting client-suppliedprofile/session_idparams.BrowserProfileMiddlewareto pin any model-selectedbrowser_usetool call to the current turn's Octop-user profile, preventing cross-user profile access from the agent side.api/routers/browser/env.py(env-status/install probe, split out of the old sessions router) and drop the now-unused REST tab-switch endpoints/types from the dashboard.ThreadRegistry.get_or_create's duplicated session-refresh branch into_refresh_session_if_needed.Test plan
make all(format-all + lint + typecheck + full pytest suite): 2924 passed, 8 skipped.npm run build: 2924 passed, 41 skipped, dashboard build succeeded.