File size: 1,370 Bytes
b43aff5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
TASK_ID = "task1_json"
DIFFICULTY = "medium"
FILE_TYPE = "json"
NUM_BUGS = 3

DESCRIPTION = (
    "A microservice configuration file in JSON format. "
    "It defines app metadata, networking, environment variables, and volume mounts. "
    "This is a realistic scenario where multiple interdependent fixes are needed."
)

# The broken config (what the agent sees)
# Bug 1 (Syntax): Missing comma after "my-service"
# Bug 2 (Structural): env values missing quotes (should be strings, not bare values)
# Bug 3 (Semantic): volumes should be object mapping, not array
BROKEN_CONFIG = """{
    "app_name": "my-service"
    "port": 8080,
    "host": "0.0.0.0",
    "debug": true,
    "env": [
        "LOG_LEVEL=info",
        "DB_HOST=localhost",
        "PORT=8080"
    ],
    "volumes": [
        "/data:/data",
        "/logs:/logs"
    ]
}"""

ERROR_MESSAGE = (
    "JSON parse error: Expecting ',' delimiter after app_name. "
    "Additionally, 'env' values are unquoted strings (should be quoted), "
    "and 'volumes' is an array instead of an object mapping."
)

GROUND_TRUTH = """{
    "app_name": "my-service",
    "port": 8080,
    "host": "0.0.0.0",
    "debug": true,
    "env": {
        "LOG_LEVEL": "info",
        "DB_HOST": "localhost",
        "PORT": "8080"
    },
    "volumes": {
        "data": "/data:/data",
        "logs": "/logs:/logs"
    }
}"""