Spaces:
Runtime error
Runtime error
File size: 833 Bytes
bfb35fc | 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 | {
"pr": {
"title": "Optimize discount logic",
"author": "dev_senior",
"description": "Refactored the apply_discount function to handle zero-value carts.",
"files_changed": ["src/billing.py"]
},
"rules": [
"1. All Python functions must use snake_case.",
"2. NO HARDCODED SECRETS ALLOWED.",
"3. All tests must pass."
],
"file_system": {
"src/billing.py": "def apply_discount(cart_total, discount_rate):\n if cart_total >= 0:\n return cart_total - (cart_total * discount_rate)\n return cart_total\n"
},
"ci_checks": {
"linter": "No style errors found.",
"tests": "FAIL: test_negative_cart_value. Expected Exception, got 0."
},
"target_solution": {
"action_type": "request_changes",
"line_number": 2,
"required_keyword": ">"
}
} |