devops_sandbox / scenario_config.json
DEVessi's picture
Upload folder using huggingface_hub
ba475c6 verified
{
"env_name": "devops_sandbox",
"env_url": "http://localhost:8000",
"llm_provider": "openai",
"llm_model": "gpt-4o-mini",
"llm_api_key": "",
"temperature": 0.2,
"max_tokens": 256,
"max_steps_per_task": 8,
"system_prompt": "You are an expert DevOps engineer responding to a production incident. A Node.js Express backend is broken and you must diagnose and fix it using bash commands. The app directory is /app. It contains config files, route handlers, middleware, .env, and old logs. NOT everything is broken — focus on actual root causes, not red herrings. Respond ONLY with a JSON object: {\"command\": \"<bash command>\"}. Use sed, echo, cat, grep — never interactive editors.",
"app_structure": {
"files": [
"/app/config.json",
"/app/server.js",
"/app/package.json",
"/app/.env",
"/app/routes/users.js",
"/app/routes/data.js",
"/app/routes/status.js",
"/app/middleware/logger.js",
"/app/middleware/rateLimit.js",
"/app/logs/error.log"
],
"bug_files": ["config.json", "routes/users.js", "routes/data.js"],
"red_herrings": [".env", "middleware/logger.js", "middleware/rateLimit.js", "routes/status.js", "logs/error.log"]
},
"tasks": [
{
"task_name": "easy",
"severity": "LOW",
"bugs_count": 1,
"description": "The app fails to bind to the expected port. Fix it so the app starts on port 3000 and GET /health returns 200.",
"bugs": [
{
"file": "config.json",
"type": "misconfiguration",
"description": "Port is set to 9999 instead of 3000"
}
],
"verifiers": [
{
"name": "Config Port Fixed",
"verification_type": "file_content",
"file_path": "/app/config.json",
"expected_content": "3000"
},
{
"name": "Health Endpoint",
"verification_type": "http_check",
"endpoint": "/health",
"expected_status": 200
}
]
},
{
"task_name": "medium",
"severity": "MEDIUM",
"bugs_count": 2,
"description": "App crashes on startup. Fix the crash AND a config issue so all endpoints up to /api/users work.",
"bugs": [
{
"file": "config.json",
"type": "misconfiguration",
"description": "Port is set to 9999 instead of 3000"
},
{
"file": "routes/users.js",
"type": "syntax_error",
"description": "Missing closing parenthesis on router.get() call causes SyntaxError on import"
}
],
"verifiers": [
{
"name": "Config Port Fixed",
"verification_type": "file_content",
"file_path": "/app/config.json",
"expected_content": "3000"
},
{
"name": "Syntax Error Fixed",
"verification_type": "file_content",
"file_path": "/app/routes/users.js",
"expected_content": "});"
},
{
"name": "Users Endpoint",
"verification_type": "http_check",
"endpoint": "/api/users",
"expected_status": 200,
"expected_body_contains": "\"users\""
}
]
},
{
"task_name": "hard",
"severity": "HIGH",
"bugs_count": 3,
"description": "Multiple issues: app crashes, endpoints return errors. Misleading logs present. Fix ALL root causes.",
"bugs": [
{
"file": "config.json",
"type": "misconfiguration",
"description": "Port is set to 9999 instead of 3000"
},
{
"file": "routes/users.js",
"type": "syntax_error",
"description": "Missing closing parenthesis on router.get() call"
},
{
"file": "routes/data.js",
"type": "async_bug",
"description": "Missing 'await' before fetchRecordsFromDB() — returns Promise instead of data"
}
],
"red_herrings": [
{
"file": "logs/error.log",
"description": "Old error log with misleading entries about port fallback and database connections"
},
{
"file": ".env",
"description": "Environment file with DB_HOST and CORS settings — not actually used by the app"
},
{
"file": "middleware/rateLimit.js",
"description": "Working rate limiter — might look suspicious but has generous limits"
}
],
"verifiers": [
{
"name": "Config Port Fixed",
"verification_type": "file_content",
"file_path": "/app/config.json",
"expected_content": "3000"
},
{
"name": "Syntax Error Fixed",
"verification_type": "file_content",
"file_path": "/app/routes/users.js",
"expected_content": "});"
},
{
"name": "Await Added",
"verification_type": "file_content",
"file_path": "/app/routes/data.js",
"expected_content": "await fetchRecordsFromDB"
},
{
"name": "Health Endpoint",
"verification_type": "http_check",
"endpoint": "/health",
"expected_status": 200
},
{
"name": "Users Endpoint",
"verification_type": "http_check",
"endpoint": "/api/users",
"expected_status": 200,
"expected_body_contains": "\"users\""
},
{
"name": "Data Endpoint",
"verification_type": "http_check",
"endpoint": "/api/data",
"expected_status": 200,
"expected_body_contains": "\"records\""
}
]
}
]
}