deprec / data.py
exploring-solver's picture
updated logic to use qwen with intended tasks
5510ae2
"""
Linux DevOps tasks for SRE troubleshooting environment.
Task 1 (easy) — Restart crashed Nginx service
Task 2 (medium) — Fix Docker container misconfiguration
Task 3 (hard) — Debug and fix memory leak in mock API
"""
from __future__ import annotations
from typing import Any, Dict, List
# Nginx service configuration
NGINX_CONFIG_PATH = "/etc/nginx/nginx.conf"
NGINX_SYSTEMD_PATH = "/etc/systemd/system/nginx.service"
# Docker configuration
DOCKER_COMPOSE_PATH = "/srv/docker-compose.yml"
# Mock API code path
MOCK_API_PATH = "/opt/mockapi/app.py"
# ---------------------------------------------------------------------------
# TASK DEFINITIONS
# ---------------------------------------------------------------------------
TASK_META: Dict[str, Dict[str, Any]] = {
"task1": {
"name": "Nginx Service Recovery",
"difficulty": "easy",
"max_steps": 10,
"description": "The Nginx web server has crashed. Diagnose the issue, restart the service, and verify it returns HTTP 200 OK.",
"available_actions": ["bash_cmd", "file_edit", "submit"]
},
"task2": {
"name": "Docker Compose Port Fix",
"difficulty": "medium",
"max_steps": 15,
"description": "A Docker container is misconfigured with the wrong port mapping. Edit docker-compose.yml to fix it and restart the container.",
"available_actions": ["bash_cmd", "file_edit", "submit"]
},
"task3": {
"name": "Python API Memory Leak",
"difficulty": "hard",
"max_steps": 20,
"description": "A Python mock API has a memory leak. Find the process, kill it, patch app.py, and restart the service.",
"available_actions": ["bash_cmd", "file_edit", "submit"]
}
}