{"abstract":"Changes made without prorations erase previously pending items.","category":"Subscription proration billing","checks":8,"contract":"Input {behavior create_prorations|none|always_invoice, amount (net new proration), pending (existing pending items)}. none: nothing is created and pending is untouched. create_prorations: amount joins pending for the next renewal invoice. always_invoice: pending plus amount are invoiced now; a negative total becomes a credit. Return [invoiced_now, pending_after, credited].","contract_signature":"x","evaluation_group":"w2-subscription-proration-proration-behavior-modes","failed_approach":"The attempt keeps pending but also adds the new proration, as if prorations were created.","family":"w2-subscription-proration-proration-behavior-modes-none-keeps-pending","id":"FA-59786","implementations":{"attempt":{"sha256":"6adc45fe40c66dc50afe9a9b0c8fb33459ae5d681ac8b1d577a9520e8bd2daf3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    amt = x['amount']\n    b = x['behavior']\n    if b == 'none':\n        return [0, x['pending'] + amt, 0]\n    if b == 'always_invoice':\n        due = x['pending'] + amt\n        return [max(0, due), 0, max(0, -due)]\n    return [0, x['pending'] + amt, 0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'behavior': 'none', 'amount': 3140, 'pending': 2478}, [0, 2478, 0]), ('regression', {'behavior': 'none', 'amount': -1187, 'pending': 1574}, [0, 1574, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': 418, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2844, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -2033, 'pending': -1935}, [0, -3968, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 3806, 'pending': 0}, [3806, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -2749, 'pending': -1837}, [0, -4586, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 7165, 'pending': -991}, [0, 6174, 0])], [('regression', {'behavior': 'none', 'amount': -1187, 'pending': 1574}, [0, 1574, 0]), ('regression', {'behavior': 'none', 'amount': -2370, 'pending': -876}, [0, -876, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2844, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': 557, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 883, 'pending': 0}, [883, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 758, 'pending': 0}, [758, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 3888, 'pending': 0}, [3888, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 5304, 'pending': -1989}, [0, 3315, 0])], [('regression', {'behavior': 'none', 'amount': -2370, 'pending': -876}, [0, -876, 0]), ('regression', {'behavior': 'none', 'amount': -2879, 'pending': -1049}, [0, -1049, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': 557, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2062, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 5860, 'pending': -2357}, [0, 3503, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': -4898, 'pending': -2365}, [0, 0, 7263]), ('normal control', {'behavior': 'create_prorations', 'amount': -1700, 'pending': 0}, [0, -1700, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 603, 'pending': -721}, [0, 0, 118])], [('regression', {'behavior': 'none', 'amount': -2879, 'pending': -1049}, [0, -1049, 0]), ('regression', {'behavior': 'none', 'amount': 5845, 'pending': -1589}, [0, -1589, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2062, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -4490, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -2824, 'pending': 2220}, [0, -604, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 5024, 'pending': 409}, [5433, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': -1436, 'pending': -1622}, [0, 0, 3058]), ('normal control', {'behavior': 'create_prorations', 'amount': 3999, 'pending': 3774}, [0, 7773, 0])], [('regression', {'behavior': 'none', 'amount': 5845, 'pending': -1589}, [0, -1589, 0]), ('regression', {'behavior': 'none', 'amount': 5967, 'pending': -212}, [0, -212, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -4490, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2152, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 5861, 'pending': 2640}, [0, 8501, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 6428, 'pending': 2242}, [8670, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 490, 'pending': 0}, [0, 490, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -4222, 'pending': 288}, [0, -3934, 0])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"659da1d18d7f5271bfe302518be441f4381c34a10c296a0930df215f1908c83f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    amt = x['amount']\n    b = x['behavior']\n    if b == 'none':\n        return [0, 0, 0]\n    if b == 'always_invoice':\n        due = x['pending'] + amt\n        return [max(0, due), 0, max(0, -due)]\n    return [0, x['pending'] + amt, 0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'behavior': 'none', 'amount': 3140, 'pending': 2478}, [0, 2478, 0]), ('regression', {'behavior': 'none', 'amount': -1187, 'pending': 1574}, [0, 1574, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': 418, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2844, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -2033, 'pending': -1935}, [0, -3968, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 3806, 'pending': 0}, [3806, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -2749, 'pending': -1837}, [0, -4586, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 7165, 'pending': -991}, [0, 6174, 0])], [('regression', {'behavior': 'none', 'amount': -1187, 'pending': 1574}, [0, 1574, 0]), ('regression', {'behavior': 'none', 'amount': -2370, 'pending': -876}, [0, -876, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2844, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': 557, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 883, 'pending': 0}, [883, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 758, 'pending': 0}, [758, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 3888, 'pending': 0}, [3888, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 5304, 'pending': -1989}, [0, 3315, 0])], [('regression', {'behavior': 'none', 'amount': -2370, 'pending': -876}, [0, -876, 0]), ('regression', {'behavior': 'none', 'amount': -2879, 'pending': -1049}, [0, -1049, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': 557, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2062, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 5860, 'pending': -2357}, [0, 3503, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': -4898, 'pending': -2365}, [0, 0, 7263]), ('normal control', {'behavior': 'create_prorations', 'amount': -1700, 'pending': 0}, [0, -1700, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 603, 'pending': -721}, [0, 0, 118])], [('regression', {'behavior': 'none', 'amount': -2879, 'pending': -1049}, [0, -1049, 0]), ('regression', {'behavior': 'none', 'amount': 5845, 'pending': -1589}, [0, -1589, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2062, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -4490, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -2824, 'pending': 2220}, [0, -604, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 5024, 'pending': 409}, [5433, 0, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': -1436, 'pending': -1622}, [0, 0, 3058]), ('normal control', {'behavior': 'create_prorations', 'amount': 3999, 'pending': 3774}, [0, 7773, 0])], [('regression', {'behavior': 'none', 'amount': 5845, 'pending': -1589}, [0, -1589, 0]), ('regression', {'behavior': 'none', 'amount': 5967, 'pending': -212}, [0, -212, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -4490, 'pending': 0}, [0, 0, 0]), ('partial-repair probe', {'behavior': 'none', 'amount': -2152, 'pending': 0}, [0, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 5861, 'pending': 2640}, [0, 8501, 0]), ('normal control', {'behavior': 'always_invoice', 'amount': 6428, 'pending': 2242}, [8670, 0, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': 490, 'pending': 0}, [0, 490, 0]), ('normal control', {'behavior': 'create_prorations', 'amount': -4222, 'pending': 288}, [0, -3934, 0])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"A deterministic teaching model of a stipulated billing rule. It makes no claim to reproduce any billing provider's exact behaviour and is not billing software. 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-subscription-proration-proration-behavior-modes-none-keeps-pending","generated_at":"2026-09-29T14:46:39.527000+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Whether prorations are invoiced now, deferred, or skipped decides when the customer pays and what stays pending.","root_cause":"The none branch clears pending items.","sha256":"312fed9784ac2bc1c98499e6bae479538b1814e9953b24f6aff3779608aaf927","title":"Proration behavior modes and pending items: none keeps pending · 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":48.952,"exit_code":1,"observations":[{"actual":[0,5618,0],"check":"regression 0","expected":[0,2478,0],"passed":false},{"actual":[0,387,0],"check":"regression 1","expected":[0,1574,0],"passed":false},{"actual":[0,418,0],"check":"partial-repair probe 2","expected":[0,0,0],"passed":false},{"actual":[0,-2844,0],"check":"partial-repair probe 3","expected":[0,0,0],"passed":false},{"actual":[0,-3968,0],"check":"normal control 4","expected":[0,-3968,0],"passed":true},{"actual":[3806,0,0],"check":"normal control 5","expected":[3806,0,0],"passed":true},{"actual":[0,-4586,0],"check":"normal control 6","expected":[0,-4586,0],"passed":true},{"actual":[0,6174,0],"check":"normal control 7","expected":[0,6174,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [0, 5618, 0], \"expected\": [0, 2478, 0], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [0, 387, 0], \"expected\": [0, 1574, 0], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [0, 418, 0], \"expected\": [0, 0, 0], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [0, -2844, 0], \"expected\": [0, 0, 0], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [0, -3968, 0], \"expected\": [0, -3968, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [3806, 0, 0], \"expected\": [3806, 0, 0], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [0, -4586, 0], \"expected\": [0, -4586, 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [0, 6174, 0], \"expected\": [0, 6174, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.624,"exit_code":1,"observations":[{"actual":[0,0,0],"check":"regression 0","expected":[0,2478,0],"passed":false},{"actual":[0,0,0],"check":"regression 1","expected":[0,1574,0],"passed":false},{"actual":[0,0,0],"check":"partial-repair probe 2","expected":[0,0,0],"passed":true},{"actual":[0,0,0],"check":"partial-repair probe 3","expected":[0,0,0],"passed":true},{"actual":[0,-3968,0],"check":"normal control 4","expected":[0,-3968,0],"passed":true},{"actual":[3806,0,0],"check":"normal control 5","expected":[3806,0,0],"passed":true},{"actual":[0,-4586,0],"check":"normal control 6","expected":[0,-4586,0],"passed":true},{"actual":[0,6174,0],"check":"normal control 7","expected":[0,6174,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [0, 0, 0], \"expected\": [0, 2478, 0], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [0, 0, 0], \"expected\": [0, 1574, 0], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [0, -3968, 0], \"expected\": [0, -3968, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [3806, 0, 0], \"expected\": [3806, 0, 0], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [0, -4586, 0], \"expected\": [0, -4586, 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [0, 6174, 0], \"expected\": [0, 6174, 0], \"passed\": true}], \"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."}}