{"abstract":"Exempt promotional bonus never reaches the member.","category":"Loyalty points ledgers","checks":7,"contract":"Input {cap, txns:[[yyyy-mm, base, bonus, exempt_bonus]]}. Base points are never capped. Regular bonus points are capped per calendar month: each transaction receives min(bonus, cap - bonus already awarded that month). Exempt bonus is always awarded and never uses the cap. Return {awards (base + awarded bonus + exempt per txn), total}.","contract_signature":"x","evaluation_group":"w2-loyalty-points-ledgers-monthly-bonus-cap","failed_approach":"Adding exempt bonus only to the total leaves each transaction award short.","family":"w2-loyalty-points-ledgers-monthly-bonus-cap-exempt-bonus-award","id":"FA-60736","implementations":{"attempt":{"sha256":"97f8bd5f212abc6525e661cc626410a1327982777a967250f74e13be95a14453","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    used = {}\n    out = []\n    for m, base, bonus, exempt in x['txns']:\n        k = m\n        rem = x['cap'] - used.get(k, 0)\n        b = min(bonus, rem)\n        used[k] = used.get(k, 0) + b\n        out.append(base + b)\n    return {'awards': out, 'total': sum(out) + sum(t[3] for t in x['txns'])}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2501, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1001, 0]]}, {'awards': [5000, 1001], 'total': 6001}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 901, 0]]}, {'awards': [905, 906], 'total': 1811}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 401, 0]]}, {'awards': [2400, 601], 'total': 3001}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 301, 0]]}, {'awards': [5600, 3301], 'total': 8901}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 251], ['2024-05', 1, 90, 0]]}, {'awards': [252, 91], 'total': 343}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 101, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2502, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1002, 0]]}, {'awards': [5000, 1002], 'total': 6002}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 902, 0]]}, {'awards': [905, 907], 'total': 1812}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 402, 0]]}, {'awards': [2400, 602], 'total': 3002}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 302, 0]]}, {'awards': [5600, 3302], 'total': 8902}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 252], ['2024-05', 1, 90, 0]]}, {'awards': [253, 91], 'total': 344}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 102, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2503, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1003, 0]]}, {'awards': [5000, 1003], 'total': 6003}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 903, 0]]}, {'awards': [905, 908], 'total': 1813}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 403, 0]]}, {'awards': [2400, 603], 'total': 3003}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 303, 0]]}, {'awards': [5600, 3303], 'total': 8903}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 253], ['2024-05', 1, 90, 0]]}, {'awards': [254, 91], 'total': 345}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 103, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2504, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1004, 0]]}, {'awards': [5000, 1004], 'total': 6004}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 904, 0]]}, {'awards': [905, 909], 'total': 1814}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 404, 0]]}, {'awards': [2400, 604], 'total': 3004}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 304, 0]]}, {'awards': [5600, 3304], 'total': 8904}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 254], ['2024-05', 1, 90, 0]]}, {'awards': [255, 91], 'total': 346}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 104, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2505, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1005, 0]]}, {'awards': [5000, 1005], 'total': 6005}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 905, 0]]}, {'awards': [905, 910], 'total': 1815}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 405, 0]]}, {'awards': [2400, 605], 'total': 3005}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 305, 0]]}, {'awards': [5600, 3305], 'total': 8905}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 255], ['2024-05', 1, 90, 0]]}, {'awards': [256, 91], 'total': 347}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 105, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"095c11aaaf47cddcfb5b35cd026c633cae00992a667a963b932cce26a7603602","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    used = {}\n    out = []\n    for m, base, bonus, exempt in x['txns']:\n        k = m\n        rem = x['cap'] - used.get(k, 0)\n        b = min(bonus, rem)\n        used[k] = used.get(k, 0) + b\n        out.append(base + b)\n    return {'awards': out, 'total': sum(out)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2501, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1001, 0]]}, {'awards': [5000, 1001], 'total': 6001}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 901, 0]]}, {'awards': [905, 906], 'total': 1811}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 401, 0]]}, {'awards': [2400, 601], 'total': 3001}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 301, 0]]}, {'awards': [5600, 3301], 'total': 8901}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 251], ['2024-05', 1, 90, 0]]}, {'awards': [252, 91], 'total': 343}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 101, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2502, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1002, 0]]}, {'awards': [5000, 1002], 'total': 6002}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 902, 0]]}, {'awards': [905, 907], 'total': 1812}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 402, 0]]}, {'awards': [2400, 602], 'total': 3002}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 302, 0]]}, {'awards': [5600, 3302], 'total': 8902}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 252], ['2024-05', 1, 90, 0]]}, {'awards': [253, 91], 'total': 344}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 102, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2503, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1003, 0]]}, {'awards': [5000, 1003], 'total': 6003}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 903, 0]]}, {'awards': [905, 908], 'total': 1813}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 403, 0]]}, {'awards': [2400, 603], 'total': 3003}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 303, 0]]}, {'awards': [5600, 3303], 'total': 8903}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 253], ['2024-05', 1, 90, 0]]}, {'awards': [254, 91], 'total': 345}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 103, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2504, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1004, 0]]}, {'awards': [5000, 1004], 'total': 6004}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 904, 0]]}, {'awards': [905, 909], 'total': 1814}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 404, 0]]}, {'awards': [2400, 604], 'total': 3004}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 304, 0]]}, {'awards': [5600, 3304], 'total': 8904}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 254], ['2024-05', 1, 90, 0]]}, {'awards': [255, 91], 'total': 346}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 104, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]], [['cap within month', {'cap': 5000, 'txns': [['2024-03', 100, 3000, 0], ['2024-03', 50, 2505, 0], ['2024-03', 10, 400, 0]]}, {'awards': [3100, 2050, 10], 'total': 5160}], ['new month resets', {'cap': 5000, 'txns': [['2024-03', 0, 5000, 0], ['2024-04', 0, 1005, 0]]}, {'awards': [5000, 1005], 'total': 6005}], ['same month next year', {'cap': 1000, 'txns': [['2023-07', 5, 900, 0], ['2024-07', 5, 905, 0]]}, {'awards': [905, 910], 'total': 1815}], ['exempt promo', {'cap': 2000, 'txns': [['2024-01', 200, 1500, 700], ['2024-01', 200, 405, 0]]}, {'awards': [2400, 605], 'total': 3005}], ['base never capped', {'cap': 1000, 'txns': [['2024-02', 5000, 600, 0], ['2024-02', 3000, 305, 0]]}, {'awards': [5600, 3305], 'total': 8905}], ['exempt only', {'cap': 100, 'txns': [['2024-05', 1, 0, 255], ['2024-05', 1, 90, 0]]}, {'awards': [256, 91], 'total': 347}], ['many small', {'cap': 300, 'txns': [['2024-06', 1, 100, 0], ['2024-06', 1, 100, 1], ['2024-06', 1, 105, 0], ['2024-06', 1, 100, 0]]}, {'awards': [101, 102, 101, 1], 'total': 305}]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated bounded loyalty-program model with explicit toy rules; not any real program terms. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-loyalty-points-ledgers-monthly-bonus-cap-exempt-bonus-award","generated_at":"2026-09-29T14:46:48.430959+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Member point balances, statements and the program liability depend on this ledger rule.","root_cause":"The per-transaction award omits exempt bonus.","sha256":"51a6960b8211fbe46ef5d91817c47b1974002bada75eae1614f1c4aae092236c","title":"Monthly promotional bonus cap: exempt bonus award · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.677,"exit_code":1,"observations":[{"actual":{"awards":[3100,2050,10],"total":5160},"check":"cap within month","expected":{"awards":[3100,2050,10],"total":5160},"passed":true},{"actual":{"awards":[5000,1001],"total":6001},"check":"new month resets","expected":{"awards":[5000,1001],"total":6001},"passed":true},{"actual":{"awards":[905,906],"total":1811},"check":"same month next year","expected":{"awards":[905,906],"total":1811},"passed":true},{"actual":{"awards":[1700,601],"total":3001},"check":"exempt promo","expected":{"awards":[2400,601],"total":3001},"passed":false},{"actual":{"awards":[5600,3301],"total":8901},"check":"base never capped","expected":{"awards":[5600,3301],"total":8901},"passed":true},{"actual":{"awards":[1,91],"total":343},"check":"exempt only","expected":{"awards":[252,91],"total":343},"passed":false},{"actual":{"awards":[101,101,101,1],"total":305},"check":"many small","expected":{"awards":[101,102,101,1],"total":305},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cap within month\", \"actual\": {\"awards\": [3100, 2050, 10], \"total\": 5160}, \"expected\": {\"awards\": [3100, 2050, 10], \"total\": 5160}, \"passed\": true}, {\"check\": \"new month resets\", \"actual\": {\"awards\": [5000, 1001], \"total\": 6001}, \"expected\": {\"awards\": [5000, 1001], \"total\": 6001}, \"passed\": true}, {\"check\": \"same month next year\", \"actual\": {\"awards\": [905, 906], \"total\": 1811}, \"expected\": {\"awards\": [905, 906], \"total\": 1811}, \"passed\": true}, {\"check\": \"exempt promo\", \"actual\": {\"awards\": [1700, 601], \"total\": 3001}, \"expected\": {\"awards\": [2400, 601], \"total\": 3001}, \"passed\": false}, {\"check\": \"base never capped\", \"actual\": {\"awards\": [5600, 3301], \"total\": 8901}, \"expected\": {\"awards\": [5600, 3301], \"total\": 8901}, \"passed\": true}, {\"check\": \"exempt only\", \"actual\": {\"awards\": [1, 91], \"total\": 343}, \"expected\": {\"awards\": [252, 91], \"total\": 343}, \"passed\": false}, {\"check\": \"many small\", \"actual\": {\"awards\": [101, 101, 101, 1], \"total\": 305}, \"expected\": {\"awards\": [101, 102, 101, 1], \"total\": 305}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.005,"exit_code":1,"observations":[{"actual":{"awards":[3100,2050,10],"total":5160},"check":"cap within month","expected":{"awards":[3100,2050,10],"total":5160},"passed":true},{"actual":{"awards":[5000,1001],"total":6001},"check":"new month resets","expected":{"awards":[5000,1001],"total":6001},"passed":true},{"actual":{"awards":[905,906],"total":1811},"check":"same month next year","expected":{"awards":[905,906],"total":1811},"passed":true},{"actual":{"awards":[1700,601],"total":2301},"check":"exempt promo","expected":{"awards":[2400,601],"total":3001},"passed":false},{"actual":{"awards":[5600,3301],"total":8901},"check":"base never capped","expected":{"awards":[5600,3301],"total":8901},"passed":true},{"actual":{"awards":[1,91],"total":92},"check":"exempt only","expected":{"awards":[252,91],"total":343},"passed":false},{"actual":{"awards":[101,101,101,1],"total":304},"check":"many small","expected":{"awards":[101,102,101,1],"total":305},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cap within month\", \"actual\": {\"awards\": [3100, 2050, 10], \"total\": 5160}, \"expected\": {\"awards\": [3100, 2050, 10], \"total\": 5160}, \"passed\": true}, {\"check\": \"new month resets\", \"actual\": {\"awards\": [5000, 1001], \"total\": 6001}, \"expected\": {\"awards\": [5000, 1001], \"total\": 6001}, \"passed\": true}, {\"check\": \"same month next year\", \"actual\": {\"awards\": [905, 906], \"total\": 1811}, \"expected\": {\"awards\": [905, 906], \"total\": 1811}, \"passed\": true}, {\"check\": \"exempt promo\", \"actual\": {\"awards\": [1700, 601], \"total\": 2301}, \"expected\": {\"awards\": [2400, 601], \"total\": 3001}, \"passed\": false}, {\"check\": \"base never capped\", \"actual\": {\"awards\": [5600, 3301], \"total\": 8901}, \"expected\": {\"awards\": [5600, 3301], \"total\": 8901}, \"passed\": true}, {\"check\": \"exempt only\", \"actual\": {\"awards\": [1, 91], \"total\": 92}, \"expected\": {\"awards\": [252, 91], \"total\": 343}, \"passed\": false}, {\"check\": \"many small\", \"actual\": {\"awards\": [101, 101, 101, 1], \"total\": 304}, \"expected\": {\"awards\": [101, 102, 101, 1], \"total\": 305}, \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}