feat: Split read/write scopes into app:read/write scopes

This commit is contained in:
Chris Coutinho
2025-10-24 04:38:49 +02:00
parent d55e5708c7
commit d452684535
45 changed files with 1630 additions and 952 deletions
+2 -2
View File
@@ -4,11 +4,11 @@ OAuth User Pool Management for Load Testing.
Manages multiple OAuth-authenticated users for realistic multi-user load testing scenarios.
"""
import asyncio
import logging
from dataclasses import dataclass
from typing import Any
import anyio
import httpx
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
@@ -394,7 +394,7 @@ class OAuthUserPool:
raise TimeoutError(
f"Timeout waiting for OAuth callback for {username}"
)
await asyncio.sleep(0.5)
await anyio.sleep(0.5)
auth_code = auth_states[state]
logger.info(f"Received auth code for {username}")
+8 -3
View File
@@ -5,7 +5,6 @@ Defines coordinated workflows that span multiple users, simulating realistic
collaborative scenarios like note sharing, file collaboration, and permission management.
"""
import asyncio
import json
import logging
import random
@@ -15,6 +14,8 @@ from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from typing import Any, Awaitable, Callable
import anyio
from tests.load.oauth_pool import UserSessionWrapper
logger = logging.getLogger(__name__)
@@ -299,7 +300,9 @@ class CollaborativeEditWorkflow(Workflow):
)
)
await asyncio.gather(*read_tasks)
async with anyio.create_task_group() as tg:
for task in read_tasks:
tg.start_soon(task)
# Step 3: Append content concurrently by all collaborators
append_tasks = []
@@ -318,7 +321,9 @@ class CollaborativeEditWorkflow(Workflow):
)
)
await asyncio.gather(*append_tasks)
async with anyio.create_task_group() as tg:
for task in append_tasks:
tg.start_soon(task)
# Step 4: Owner verifies final state
await self._execute_step(