Repository navigation
Workspaces phase 2f: what the review of phase 2 found (#277) - #321
Merged
Merged
Conversation
A review of phases 2a-2e together (cb8a218..b1e3fef) found these cross-workspace paths and 1.x differences; TestReviewOfPhase2 and test_a2a_routes cover each. - may_run_code() judges a config by its project_id. A subagent made by delegation has its parent's project and a name with no row, so it ran the code executor and stdio MCP servers for an agent outside the default workspace. - The Work Room title escapes agent, user and session id in the agent-server URL: httpx resolves '..' in a path, so a session id could name another workspace's session, read its first message and write its title. - A rating needs agent_name and a session of the caller with that agent; before, a rating with no agent skipped the workspace check, and one through an agent of A could point the eval pages at B's session. - Session detail and delete use the whole ADK key (app, user, id) and read only the checked session's events; the rated-answer pages read events by session and agent. - A widget visitor is a widget_<key id>_ id with the widget role, which only the server gives out (V017 gave it to the earlier visitors). Single sign-on and Users refuse ids starting widget_ and trigger_runner (is_reserved_user_id). - Each agent gets its own A2A task store, so tasks/get and tasks/cancel through one agent find none of another's. - A Slack team stays with the first workspace to connect it; the 409 says to ask a platform administrator. - The ${VAR} defining part is each place holding one, so editing an MCP server without a placeholder is no longer refused. - X-MATE-Workspace with a non-ASCII digit is a 404, not a 500. - The request context is made once a request: the middleware's is reused. The plan now ships phases 3 and 4 in 2.0.0 too, and records 2e (#320) and 2f. test_client_contract.py is unchanged and passes.
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.
Part of #277. A review of phases 2a–2e together (
cb8a218..b1e3fef) found the paths below. Each has a test that fails without the fix:TestReviewOfPhase2inshared/test/test_cross_workspace.py, andtest_an_agents_tasks_are_not_found_through_another_agentinshared/test/test_a2a_routes.py.Cross-workspace paths
subagent_xxxxxxand has no row, somay_run_code()treated it as a hardcoded agent. It now judges a config by itsproject_id(the parent's), and refuses a project that doesn't exist.session_idwent into the agent-server URL unescaped, and httpx resolves... A member of A could read the first message of a session of B and write its title. Agent, user and session id are now each escaped whole.POST /dashboard/api/feedbackwith noagent_nameskipped the workspace check. With one of A's agents, it could point the eval pages at B's session. A rating now needsagent_nameand a session of the caller with that agent; the chat already sends both.caller_access()took anywidget_<n>_…id for a visitor of key n. Since SSO uses the email as the id,[email protected]reached key 7's workspace. A visitor now also needs thewidgetrole, which only the server gives out (V017 gave it to existing visitors). SSO and Users refuse ids starting withwidget_andtrigger_runner.InMemoryTaskStore, and the proxy checks only the agent in the path, sotasks/getandtasks/cancelreached other agents' tasks. Each agent now has its own store.Other findings
UNIQUE (team_id)stays; the first workspace to connect a team keeps it. The 409 now says to ask a platform administrator, who can switch to the workspace holding it. Checking the bot token with Slack'sauth.testwould stop a workspace from claiming a team it doesn't control; it is left for later.${VAR}: the defining part of a${VAR}reference was the model key, model base URL and MCP config taken together, so a workspace admin could not edit an unrelated MCP server. It is now each place that holds a placeholder, with where its value is sent.X-MATE-Workspace: ²:isdigit()accepts digits thatint()rejects, so this answered 500. It is now a 404.context_for()keeps it onrequest.state, so the route reuses the workspace the middleware resolved.Plan
documents/design/2.0-plan.mdnow records 2e (#320) and 2f, and ships phases 3 and 4 in 2.0.0.Checks
test_client_contract.pyis unchanged and passes.v1.6.0and onmain. Of 152 GET routes, 150 answer the same; the other two differ only by the new workspace routes and two migrations. The workspace backfill fills every row that has a project.gen_docs.py --checkpasses. Drift:docs/dev/auth-and-access.md,docs/dev/a2a.mdanddocs/user/slack.mdare updated. These still hold:alerts.md,template-format.mdandwriting-a-tool.md: the dashboard and tool factory changes don't touch what they describe;code-executor.md: the refusal it describes is unchanged; the subagent case is inauth-and-access.md;database-and-migrations.md: no migration;sso-setup.md: the reserved ids are inauth-and-access.md.