Spaces:
Sleeping
Sleeping
File size: 2,229 Bytes
06b0d69 5834385 3424779 5834385 06b0d69 5834385 06b0d69 5834385 06b0d69 5834385 06b0d69 5834385 06b0d69 5834385 06b0d69 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | HARD_TASKS = [
{
"id": "hard_token_exchange",
"description": (
"The protected endpoint needs a fresh token. "
"Step 1: POST to /mock_api/auth/token with JSON body {{\"client_id\": \"{client_id}\", \"client_secret\": \"{client_secret}\"}} "
"to get an access_token from the response. "
"Step 2: Use that token as Authorization: Bearer <token> to GET /mock_api/protected. "
"The token in the broken request is expired and will return 401."
),
"broken_request": {
"method": "GET",
"url": "/mock_api/protected",
"headers": {"Authorization": "Bearer stale_token_000"},
"body": None,
"query_params": {},
},
"expected_status": 200,
"expected_schema": {"data": ""},
"max_steps": 10,
},
{
"id": "hard_rate_limit",
"description": (
"The rate_limited endpoint returns 429 after 3 requests without the X-Retry-After header. "
"When you receive a 429, add the header X-Retry-After: 2 to your next request. "
"The response body on 429 contains Retry-After hint in headers."
),
"broken_request": {
"method": "GET",
"url": "/mock_api/rate_limited",
"headers": {},
"body": None,
"query_params": {},
},
"expected_status": 200,
"expected_schema": {"data": ""},
"max_steps": 10,
},
{
"id": "hard_pagination",
"description": (
"GET /mock_api/logs returns the first page with next_cursor and has_more fields. "
"Pass cursor=<next_cursor> as a query param to get the next page. "
"Keep following the cursor chain until has_more is false. "
"The final page has has_more=false and no next_cursor."
),
"broken_request": {
"method": "GET",
"url": "/mock_api/logs",
"headers": {},
"body": None,
"query_params": {},
},
"expected_status": 200,
"expected_schema": {"items": [], "has_more": False},
"max_steps": 10,
},
]
|