{"abstract":"Pauses that straddle the renewal extend the period by days that belong to the next period.","category":"Subscription proration billing","checks":8,"contract":"Input {start, end (exclusive) day numbers, pauses: [[from, to)]}. Pause intervals are clipped to the period, empty ones dropped, then overlapping ones merged. The period end moves out by the number of distinct paused days. Return [new_end, paused_days].","contract_signature":"x","evaluation_group":"w2-subscription-proration-pause-period-extension","failed_approach":"The attempt clips the start but not the end of each pause.","family":"w2-subscription-proration-pause-period-extension-clip-pauses-to-period","id":"FA-59456","implementations":{"attempt":{"sha256":"da43528157d59104267286f0f2dbd2a7428c1f6f0555361bf66aa33b3ce304ff","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s, e = x['start'], x['end']\n    iv = sorted([max(a, s), b] for a, b in x['pauses'])\n    iv = [p for p in iv if p[0] < p[1]]\n    merged = []\n    for a, b in iv:\n        if merged and a <= merged[-1][1]:\n            merged[-1][1] = max(merged[-1][1], b)\n        else:\n            merged.append([a, b])\n    paused = sum(b - a for a, b in merged)\n    return [e + paused, paused]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'start': 28, 'end': 56, 'pauses': [[45, 57], [44, 58], [33, 35], [48, 63]]}, [70, 14]), ('regression', {'start': 34, 'end': 65, 'pauses': [[30, 33], [31, 34]]}, [65, 0]), ('partial-repair probe', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('partial-repair probe', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('normal control', {'start': 15, 'end': 45, 'pauses': [[20, 34], [22, 25], [25, 35]]}, [60, 15]), ('normal control', {'start': 12, 'end': 40, 'pauses': []}, [40, 0]), ('normal control', {'start': 73, 'end': 101, 'pauses': [[82, 97], [85, 93], [79, 80], [82, 85]]}, [117, 16]), ('normal control', {'start': 92, 'end': 122, 'pauses': [[121, 121]]}, [122, 0])], [('regression', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('regression', {'start': 20, 'end': 48, 'pauses': [[28, 28], [16, 30], [23, 23]]}, [58, 10]), ('partial-repair probe', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('partial-repair probe', {'start': 86, 'end': 114, 'pauses': [[113, 121]]}, [115, 1]), ('normal control', {'start': 26, 'end': 56, 'pauses': []}, [56, 0]), ('normal control', {'start': 84, 'end': 115, 'pauses': []}, [115, 0]), ('normal control', {'start': 14, 'end': 42, 'pauses': []}, [42, 0]), ('normal control', {'start': 56, 'end': 86, 'pauses': []}, [86, 0])], [('regression', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('regression', {'start': 28, 'end': 56, 'pauses': [[45, 57], [44, 58], [33, 35], [48, 63]]}, [70, 14]), ('partial-repair probe', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('partial-repair probe', {'start': 0, 'end': 31, 'pauses': [[31, 46], [24, 33], [-7, -3], [-8, 6]]}, [44, 13]), ('normal control', {'start': 65, 'end': 93, 'pauses': []}, [93, 0]), ('normal control', {'start': 89, 'end': 119, 'pauses': [[109, 109]]}, [119, 0]), ('normal control', {'start': 99, 'end': 127, 'pauses': [[115, 120]]}, [132, 5]), ('normal control', {'start': 88, 'end': 118, 'pauses': [[105, 110], [103, 103], [95, 110], [104, 108]]}, [133, 15])], [('regression', {'start': 86, 'end': 114, 'pauses': [[113, 121]]}, [115, 1]), ('regression', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('partial-repair probe', {'start': 96, 'end': 124, 'pauses': [[120, 128], [90, 105], [99, 105], [116, 125]]}, [141, 17]), ('partial-repair probe', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('normal control', {'start': 9, 'end': 37, 'pauses': [[26, 26]]}, [37, 0]), ('normal control', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('normal control', {'start': 95, 'end': 126, 'pauses': [[89, 89]]}, [126, 0]), ('normal control', {'start': 74, 'end': 105, 'pauses': [[77, 77], [87, 92]]}, [110, 5])], [('regression', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('regression', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('partial-repair probe', {'start': 60, 'end': 88, 'pauses': [[92, 102], [57, 65], [85, 100]]}, [96, 8]), ('partial-repair probe', {'start': 94, 'end': 124, 'pauses': [[96, 99], [128, 143], [115, 130]]}, [136, 12]), ('normal control', {'start': 54, 'end': 84, 'pauses': [[76, 80], [66, 79]]}, [98, 14]), ('normal control', {'start': 66, 'end': 97, 'pauses': [[87, 97], [71, 85]]}, [121, 24]), ('normal control', {'start': 62, 'end': 93, 'pauses': [[66, 73], [84, 88], [83, 90]]}, [107, 14]), ('normal control', {'start': 81, 'end': 111, 'pauses': []}, [111, 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":"ad1949442785c1de65f8be6886fe55943cc9af34fbbc20be5016d68dc52d6511","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s, e = x['start'], x['end']\n    iv = sorted([a, b] for a, b in x['pauses'])\n    iv = [p for p in iv if p[0] < p[1]]\n    merged = []\n    for a, b in iv:\n        if merged and a <= merged[-1][1]:\n            merged[-1][1] = max(merged[-1][1], b)\n        else:\n            merged.append([a, b])\n    paused = sum(b - a for a, b in merged)\n    return [e + paused, paused]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'start': 28, 'end': 56, 'pauses': [[45, 57], [44, 58], [33, 35], [48, 63]]}, [70, 14]), ('regression', {'start': 34, 'end': 65, 'pauses': [[30, 33], [31, 34]]}, [65, 0]), ('partial-repair probe', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('partial-repair probe', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('normal control', {'start': 15, 'end': 45, 'pauses': [[20, 34], [22, 25], [25, 35]]}, [60, 15]), ('normal control', {'start': 12, 'end': 40, 'pauses': []}, [40, 0]), ('normal control', {'start': 73, 'end': 101, 'pauses': [[82, 97], [85, 93], [79, 80], [82, 85]]}, [117, 16]), ('normal control', {'start': 92, 'end': 122, 'pauses': [[121, 121]]}, [122, 0])], [('regression', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('regression', {'start': 20, 'end': 48, 'pauses': [[28, 28], [16, 30], [23, 23]]}, [58, 10]), ('partial-repair probe', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('partial-repair probe', {'start': 86, 'end': 114, 'pauses': [[113, 121]]}, [115, 1]), ('normal control', {'start': 26, 'end': 56, 'pauses': []}, [56, 0]), ('normal control', {'start': 84, 'end': 115, 'pauses': []}, [115, 0]), ('normal control', {'start': 14, 'end': 42, 'pauses': []}, [42, 0]), ('normal control', {'start': 56, 'end': 86, 'pauses': []}, [86, 0])], [('regression', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('regression', {'start': 28, 'end': 56, 'pauses': [[45, 57], [44, 58], [33, 35], [48, 63]]}, [70, 14]), ('partial-repair probe', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('partial-repair probe', {'start': 0, 'end': 31, 'pauses': [[31, 46], [24, 33], [-7, -3], [-8, 6]]}, [44, 13]), ('normal control', {'start': 65, 'end': 93, 'pauses': []}, [93, 0]), ('normal control', {'start': 89, 'end': 119, 'pauses': [[109, 109]]}, [119, 0]), ('normal control', {'start': 99, 'end': 127, 'pauses': [[115, 120]]}, [132, 5]), ('normal control', {'start': 88, 'end': 118, 'pauses': [[105, 110], [103, 103], [95, 110], [104, 108]]}, [133, 15])], [('regression', {'start': 86, 'end': 114, 'pauses': [[113, 121]]}, [115, 1]), ('regression', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('partial-repair probe', {'start': 96, 'end': 124, 'pauses': [[120, 128], [90, 105], [99, 105], [116, 125]]}, [141, 17]), ('partial-repair probe', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('normal control', {'start': 9, 'end': 37, 'pauses': [[26, 26]]}, [37, 0]), ('normal control', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('normal control', {'start': 95, 'end': 126, 'pauses': [[89, 89]]}, [126, 0]), ('normal control', {'start': 74, 'end': 105, 'pauses': [[77, 77], [87, 92]]}, [110, 5])], [('regression', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('regression', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('partial-repair probe', {'start': 60, 'end': 88, 'pauses': [[92, 102], [57, 65], [85, 100]]}, [96, 8]), ('partial-repair probe', {'start': 94, 'end': 124, 'pauses': [[96, 99], [128, 143], [115, 130]]}, [136, 12]), ('normal control', {'start': 54, 'end': 84, 'pauses': [[76, 80], [66, 79]]}, [98, 14]), ('normal control', {'start': 66, 'end': 97, 'pauses': [[87, 97], [71, 85]]}, [121, 24]), ('normal control', {'start': 62, 'end': 93, 'pauses': [[66, 73], [84, 88], [83, 90]]}, [107, 14]), ('normal control', {'start': 81, 'end': 111, 'pauses': []}, [111, 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-pause-period-extension-clip-pauses-to-period","generated_at":"2026-09-29T14:46:36.548080+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Pausing a subscription should extend paid service exactly by the paused time, no more and no less.","root_cause":"Pause intervals are not clipped to the current billing period.","sha256":"7c92eee2cab9bd8f4b067b310e4a7a7b75b8bbdd722d690a61cea77bfb38df9c","title":"Paused days extending the billing period: clip pauses to period · 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.0,"exit_code":1,"observations":[{"actual":[77,21],"check":"regression 0","expected":[70,14],"passed":false},{"actual":[65,0],"check":"regression 1","expected":[65,0],"passed":true},{"actual":[140,28],"check":"partial-repair probe 2","expected":[139,27],"passed":false},{"actual":[85,9],"check":"partial-repair probe 3","expected":[80,4],"passed":false},{"actual":[60,15],"check":"normal control 4","expected":[60,15],"passed":true},{"actual":[40,0],"check":"normal control 5","expected":[40,0],"passed":true},{"actual":[117,16],"check":"normal control 6","expected":[117,16],"passed":true},{"actual":[122,0],"check":"normal control 7","expected":[122,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [77, 21], \"expected\": [70, 14], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [65, 0], \"expected\": [65, 0], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [140, 28], \"expected\": [139, 27], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [85, 9], \"expected\": [80, 4], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [60, 15], \"expected\": [60, 15], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [40, 0], \"expected\": [40, 0], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [117, 16], \"expected\": [117, 16], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [122, 0], \"expected\": [122, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.033,"exit_code":1,"observations":[{"actual":[77,21],"check":"regression 0","expected":[70,14],"passed":false},{"actual":[69,4],"check":"regression 1","expected":[65,0],"passed":false},{"actual":[142,30],"check":"partial-repair probe 2","expected":[139,27],"passed":false},{"actual":[85,9],"check":"partial-repair probe 3","expected":[80,4],"passed":false},{"actual":[60,15],"check":"normal control 4","expected":[60,15],"passed":true},{"actual":[40,0],"check":"normal control 5","expected":[40,0],"passed":true},{"actual":[117,16],"check":"normal control 6","expected":[117,16],"passed":true},{"actual":[122,0],"check":"normal control 7","expected":[122,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [77, 21], \"expected\": [70, 14], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [69, 4], \"expected\": [65, 0], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [142, 30], \"expected\": [139, 27], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [85, 9], \"expected\": [80, 4], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [60, 15], \"expected\": [60, 15], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [40, 0], \"expected\": [40, 0], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [117, 16], \"expected\": [117, 16], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [122, 0], \"expected\": [122, 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."}}