name: sql-debug-env version: 1.0.0 description: > SQL Debug & Data Pipeline Repair — an OpenEnv environment where an AI agent diagnoses and fixes broken SQL queries and ETL pipelines executed against a live DuckDB instance. Seven tasks ranging from easy (syntax fix) to expert (chaos engineering). author: sql-debug-env tags: - openenv - sql - data-engineering - debugging - rl entrypoint: uvicorn app:app --host 0.0.0.0 --port 7860 inference: python inference.py tasks: - id: task_1_easy difficulty: easy max_steps: 5 description: > Fix a SQL SELECT query with a missing comma between column names. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 - id: task_2_medium difficulty: medium max_steps: 5 description: > Fix a GROUP BY aggregation query — add GROUP BY clause. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 - id: task_3_hard difficulty: hard max_steps: 5 description: > Fix a RANK() window function missing PARTITION BY department. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 - id: task_4_expert difficulty: expert max_steps: 5 description: > Fix an invalid date literal (month 13) inside a CTE. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 - id: task_5_optimization difficulty: expert max_steps: 5 description: > Rewrite a CROSS JOIN query to use INNER JOIN. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 - id: task_6_migration difficulty: expert max_steps: 5 description: > Migrate denormalized table to 3NF schema safely. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 - id: task_7_chaos difficulty: expert max_steps: 5 description: > Fix a live ETL pipeline with duplicate entries and NULL emails. grader: SQLGrader grading_metric: accuracy baseline_score: 0.5 observation_schema: task_id: string description: string broken_sql: string schema_info: object error_hint: string action_schema: fixed_sql: string explanation: string endpoints: health: GET /health reset: POST /reset step: POST /step state: GET /state tasks: GET /tasks grader: POST /grader baseline: GET /baseline docs: GET /docs