Spaces:
Sleeping
Sleeping
File size: 1,442 Bytes
cda147c 3d87f50 cda147c 3d87f50 cda147c 3d87f50 cda147c 3d87f50 cda147c 3d87f50 cda147c 3d87f50 | 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 54 55 56 57 58 59 60 61 62 63 | TASK_ID = "task2_yaml"
DIFFICULTY = "medium"
FILE_TYPE = "yaml"
NUM_BUGS = 3
DESCRIPTION = (
"A CI/CD pipeline configuration in YAML format. "
"It defines stages, environment variables, and job specifications. "
"This is a realistic scenario from GitHub Actions / GitLab CI pipelines."
)
# The broken config (what the agent sees)
# Bug 1 (Syntax): Wrong indentation on nested key (3 spaces instead of 2)
# Bug 2 (Structural): env section is array instead of object
# Bug 3 (Semantic): Missing required 'timeout' field under jobs
BROKEN_CONFIG = """pipeline:
name: ci-pipeline
stages:
- build
- test
- deploy
env:
- CI: "true"
- REGISTRY: "docker.io"
jobs:
build_job:
stage: build
script:
- npm install
- npm run build
test_job:
stage: test
script:
- npm test"""
ERROR_MESSAGE = (
"YAML parse error: mapping values are not allowed in this context (indentation issue). "
"Additionally, 'env' is an array instead of an object, "
"and jobs are missing 'timeout' specifications."
)
GROUND_TRUTH = """pipeline:
name: ci-pipeline
stages:
- build
- test
- deploy
env:
CI: "true"
REGISTRY: "docker.io"
jobs:
build_job:
stage: build
timeout: 3600
script:
- npm install
- npm run build
test_job:
stage: test
timeout: 1800
script:
- npm test"""
|