File size: 4,479 Bytes
5aeebf2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""DevOps Arena Tasks — 9 bug-fixing issues across 3 repos."""

TASKS = [
    {"id": "flask_missing_import", "repo": "flask-api", "title": "Email validation crashes with NameError",
     "description": "POST /users crashes with NameError: 're' is not defined. The validate_email function uses re module but it's not imported. Fix the import in src/app.py.",
     "target_file": "src/app.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "easy",
     "all_hidden_tests": ["test_issue1_format_users_no_crash", "test_issue1_format_users_valid_json"]},
    
    {"id": "flask_pagination", "repo": "flask-api", "title": "Pagination returns wrong results on page 1",
     "description": "GET /users?page=1&per_page=2 returns wrong users. The offset in get_users_page is page*per_page but should be (page-1)*per_page. Fix in src/app.py.",
     "target_file": "src/app.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "easy",
     "all_hidden_tests": ["test_issue3_page1_returns_first_users", "test_issue3_page2_returns_next_users"]},
    
    {"id": "flask_all_bugs", "repo": "flask-api", "title": "Fix all Flask API bugs",
     "description": "Flask API has 2 bugs: (1) re module not imported for email validation, (2) pagination offset wrong. Fix both in src/app.py.",
     "target_file": "src/app.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 20, "difficulty": "medium",
     "all_hidden_tests": ["test_issue2_invalid_email_rejected", "test_issue2_empty_email_rejected", "test_issue2_valid_email_accepted"]},
    
    {"id": "cli_config_path", "repo": "cli-tool", "title": "Config file not found on startup",
     "description": "CLI fails with FileNotFoundError — default config path is /etc/csvtool/config.json but should be ./config.json. Fix DEFAULT_CONFIG_PATH in src/cli.py.",
     "target_file": "src/cli.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "easy",
     "all_hidden_tests": ["test_issue6_default_config_loads", "test_issue6_custom_config_still_works"]},
    
    {"id": "cli_empty_rows", "repo": "cli-tool", "title": "CSV parser crashes on empty rows",
     "description": "parse_csv crashes with ValueError on empty rows. Fix it to skip empty rows in src/cli.py.",
     "target_file": "src/cli.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "medium",
     "all_hidden_tests": ["test_issue5_skips_empty_rows", "test_issue5_keeps_valid_rows"]},
    
    {"id": "cli_output_path", "repo": "cli-tool", "title": "--output flag writes to wrong directory",
     "description": "write_output strips directory with os.path.basename. Should use full output_path. Fix in src/cli.py.",
     "target_file": "src/cli.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "medium",
     "all_hidden_tests": ["test_issue4_writes_to_correct_path", "test_issue4_writes_correct_content"]},
    
    {"id": "pipeline_memory_leak", "repo": "data-pipeline", "title": "Memory leak — file handle not closed",
     "description": "extract() opens file but never closes it. Fix to use context manager in src/pipeline.py.",
     "target_file": "src/pipeline.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "medium",
     "all_hidden_tests": ["test_issue8_file_closed_after_load", "test_issue8_data_still_loads_correctly"]},
    
    {"id": "pipeline_null_handling", "repo": "data-pipeline", "title": "Pipeline drops records with null fields",
     "description": "Records with null values are silently dropped. Should default to 0. Fix in src/pipeline.py.",
     "target_file": "src/pipeline.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 15, "difficulty": "hard",
     "all_hidden_tests": ["test_issue9_keeps_records_with_nulls", "test_issue9_replaces_none_with_defaults", "test_issue9_none_string_replaced"]},
    
    {"id": "pipeline_all_bugs", "repo": "data-pipeline", "title": "Fix all data pipeline bugs",
     "description": "Pipeline has 3 bugs: (1) file not closed in extract(), (2) null values dropped instead of defaulting to 0, (3) duplicate IDs not deduplicated. Fix all in src/pipeline.py.",
     "target_file": "src/pipeline.py", "hidden_tests": "tests/hidden/test_issues.py", "max_steps": 25, "difficulty": "hard",
     "all_hidden_tests": ["test_issue7_dedup_across_batches", "test_issue7_seen_ids_tracks_ids_not_records"]},
]