{"abstract":"A short pause nested inside a longer one shortens the extension.","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 appends the tail from the previous end, which has negative length for nested pauses.","family":"w2-subscription-proration-pause-period-extension-overlap-merge-extent","id":"FA-59461","implementations":{"attempt":{"sha256":"f58418b79e3cd8cb6034337647952de70c05b704c734dc41c2fc92b9f5cb4487","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), min(b, e)] 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.append([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': 73, 'end': 101, 'pauses': [[82, 97], [85, 93], [79, 80], [82, 85]]}, [117, 16]), ('regression', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('partial-repair probe', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('partial-repair probe', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('normal control', {'start': 34, 'end': 65, 'pauses': [[30, 33], [31, 34]]}, [65, 0]), ('normal control', {'start': 20, 'end': 48, 'pauses': [[28, 28], [16, 30], [23, 23]]}, [58, 10]), ('normal control', {'start': 15, 'end': 45, 'pauses': [[20, 34], [22, 25], [25, 35]]}, [60, 15]), ('normal control', {'start': 28, 'end': 56, 'pauses': [[45, 57], [44, 58], [33, 35], [48, 63]]}, [70, 14])], [('regression', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('regression', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('partial-repair probe', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('partial-repair probe', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('normal control', {'start': 12, 'end': 40, 'pauses': []}, [40, 0]), ('normal control', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('normal control', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('normal control', {'start': 92, 'end': 122, 'pauses': [[121, 121]]}, [122, 0])], [('regression', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('regression', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('partial-repair probe', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('partial-repair probe', {'start': 62, 'end': 93, 'pauses': [[66, 73], [84, 88], [83, 90]]}, [107, 14]), ('normal control', {'start': 100, 'end': 131, 'pauses': [[127, 128], [119, 120], [97, 98], [120, 128]]}, [140, 9]), ('normal control', {'start': 26, 'end': 56, 'pauses': []}, [56, 0]), ('normal control', {'start': 44, 'end': 72, 'pauses': [[58, 64], [45, 58], [59, 70], [41, 49]]}, [98, 26]), ('normal control', {'start': 92, 'end': 120, 'pauses': [[82, 91]]}, [120, 0])], [('regression', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('regression', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('partial-repair probe', {'start': 48, 'end': 78, 'pauses': [[52, 63], [70, 85], [39, 54], [71, 77]]}, [101, 23]), ('partial-repair probe', {'start': 66, 'end': 94, 'pauses': [[63, 73], [69, 72]]}, [101, 7]), ('normal control', {'start': 84, 'end': 115, 'pauses': []}, [115, 0]), ('normal control', {'start': 86, 'end': 114, 'pauses': [[113, 121]]}, [115, 1]), ('normal control', {'start': 0, 'end': 31, 'pauses': [[31, 46], [24, 33], [-7, -3], [-8, 6]]}, [44, 13]), ('normal control', {'start': 96, 'end': 124, 'pauses': [[120, 128], [90, 105], [99, 105], [116, 125]]}, [141, 17])], [('regression', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('regression', {'start': 62, 'end': 93, 'pauses': [[66, 73], [84, 88], [83, 90]]}, [107, 14]), ('partial-repair probe', {'start': 16, 'end': 46, 'pauses': [[36, 37], [37, 38], [39, 54], [36, 43]]}, [56, 10]), ('partial-repair probe', {'start': 1, 'end': 32, 'pauses': [[-9, 3], [9, 19], [7, 18], [10, 13]]}, [46, 14]), ('normal control', {'start': 28, 'end': 56, 'pauses': [[35, 37], [21, 36]]}, [65, 9]), ('normal control', {'start': 14, 'end': 42, 'pauses': []}, [42, 0]), ('normal control', {'start': 56, 'end': 86, 'pauses': []}, [86, 0]), ('normal control', {'start': 94, 'end': 125, 'pauses': [[103, 112], [94, 95], [111, 118], [87, 100]]}, [146, 21])]]\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":"bd816f6335659673b61ebc2770b552a0af9b148a0eba1dde43fd43f9938d8811","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), min(b, e)] 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] = 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': 73, 'end': 101, 'pauses': [[82, 97], [85, 93], [79, 80], [82, 85]]}, [117, 16]), ('regression', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('partial-repair probe', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('partial-repair probe', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('normal control', {'start': 34, 'end': 65, 'pauses': [[30, 33], [31, 34]]}, [65, 0]), ('normal control', {'start': 20, 'end': 48, 'pauses': [[28, 28], [16, 30], [23, 23]]}, [58, 10]), ('normal control', {'start': 15, 'end': 45, 'pauses': [[20, 34], [22, 25], [25, 35]]}, [60, 15]), ('normal control', {'start': 28, 'end': 56, 'pauses': [[45, 57], [44, 58], [33, 35], [48, 63]]}, [70, 14])], [('regression', {'start': 98, 'end': 126, 'pauses': [[121, 127], [123, 125]]}, [131, 5]), ('regression', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('partial-repair probe', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('partial-repair probe', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('normal control', {'start': 12, 'end': 40, 'pauses': []}, [40, 0]), ('normal control', {'start': 82, 'end': 112, 'pauses': [[76, 78], [84, 98], [94, 101], [102, 113]]}, [139, 27]), ('normal control', {'start': 46, 'end': 76, 'pauses': [[72, 81]]}, [80, 4]), ('normal control', {'start': 92, 'end': 122, 'pauses': [[121, 121]]}, [122, 0])], [('regression', {'start': 86, 'end': 116, 'pauses': [[89, 104], [117, 132], [97, 102]]}, [131, 15]), ('regression', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('partial-repair probe', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('partial-repair probe', {'start': 62, 'end': 93, 'pauses': [[66, 73], [84, 88], [83, 90]]}, [107, 14]), ('normal control', {'start': 100, 'end': 131, 'pauses': [[127, 128], [119, 120], [97, 98], [120, 128]]}, [140, 9]), ('normal control', {'start': 26, 'end': 56, 'pauses': []}, [56, 0]), ('normal control', {'start': 44, 'end': 72, 'pauses': [[58, 64], [45, 58], [59, 70], [41, 49]]}, [98, 26]), ('normal control', {'start': 92, 'end': 120, 'pauses': [[82, 91]]}, [120, 0])], [('regression', {'start': 73, 'end': 103, 'pauses': [[70, 72], [68, 79], [74, 86], [77, 84]]}, [116, 13]), ('regression', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('partial-repair probe', {'start': 48, 'end': 78, 'pauses': [[52, 63], [70, 85], [39, 54], [71, 77]]}, [101, 23]), ('partial-repair probe', {'start': 66, 'end': 94, 'pauses': [[63, 73], [69, 72]]}, [101, 7]), ('normal control', {'start': 84, 'end': 115, 'pauses': []}, [115, 0]), ('normal control', {'start': 86, 'end': 114, 'pauses': [[113, 121]]}, [115, 1]), ('normal control', {'start': 0, 'end': 31, 'pauses': [[31, 46], [24, 33], [-7, -3], [-8, 6]]}, [44, 13]), ('normal control', {'start': 96, 'end': 124, 'pauses': [[120, 128], [90, 105], [99, 105], [116, 125]]}, [141, 17])], [('regression', {'start': 91, 'end': 121, 'pauses': [[114, 118], [100, 102], [115, 116]]}, [127, 6]), ('regression', {'start': 62, 'end': 93, 'pauses': [[66, 73], [84, 88], [83, 90]]}, [107, 14]), ('partial-repair probe', {'start': 16, 'end': 46, 'pauses': [[36, 37], [37, 38], [39, 54], [36, 43]]}, [56, 10]), ('partial-repair probe', {'start': 1, 'end': 32, 'pauses': [[-9, 3], [9, 19], [7, 18], [10, 13]]}, [46, 14]), ('normal control', {'start': 28, 'end': 56, 'pauses': [[35, 37], [21, 36]]}, [65, 9]), ('normal control', {'start': 14, 'end': 42, 'pauses': []}, [42, 0]), ('normal control', {'start': 56, 'end': 86, 'pauses': []}, [86, 0]), ('normal control', {'start': 94, 'end': 125, 'pauses': [[103, 112], [94, 95], [111, 118], [87, 100]]}, [146, 21])]]\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-overlap-merge-extent","generated_at":"2026-09-29T14:46:36.563363+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":"Merging replaces the merged end with the new end even when it is earlier.","sha256":"01110b532312fa3a8ed924b1f7c61ef1d46b2c18d4b12d5e714b511723e93522","title":"Paused days extending the billing period: overlap merge extent · 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":41.63,"exit_code":1,"observations":[{"actual":[113,12],"check":"regression 0","expected":[117,16],"passed":false},{"actual":[130,4],"check":"regression 1","expected":[131,5],"passed":false},{"actual":[129,13],"check":"partial-repair probe 2","expected":[131,15],"passed":false},{"actual":[114,11],"check":"partial-repair probe 3","expected":[116,13],"passed":false},{"actual":[65,0],"check":"normal control 4","expected":[65,0],"passed":true},{"actual":[58,10],"check":"normal control 5","expected":[58,10],"passed":true},{"actual":[60,15],"check":"normal control 6","expected":[60,15],"passed":true},{"actual":[70,14],"check":"normal control 7","expected":[70,14],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [113, 12], \"expected\": [117, 16], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [130, 4], \"expected\": [131, 5], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [129, 13], \"expected\": [131, 15], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [114, 11], \"expected\": [116, 13], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [65, 0], \"expected\": [65, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [58, 10], \"expected\": [58, 10], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [60, 15], \"expected\": [60, 15], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [70, 14], \"expected\": [70, 14], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.3,"exit_code":1,"observations":[{"actual":[113,12],"check":"regression 0","expected":[117,16],"passed":false},{"actual":[130,4],"check":"regression 1","expected":[131,5],"passed":false},{"actual":[129,13],"check":"partial-repair probe 2","expected":[131,15],"passed":false},{"actual":[114,11],"check":"partial-repair probe 3","expected":[116,13],"passed":false},{"actual":[65,0],"check":"normal control 4","expected":[65,0],"passed":true},{"actual":[58,10],"check":"normal control 5","expected":[58,10],"passed":true},{"actual":[60,15],"check":"normal control 6","expected":[60,15],"passed":true},{"actual":[70,14],"check":"normal control 7","expected":[70,14],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [113, 12], \"expected\": [117, 16], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [130, 4], \"expected\": [131, 5], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [129, 13], \"expected\": [131, 15], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [114, 11], \"expected\": [116, 13], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [65, 0], \"expected\": [65, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [58, 10], \"expected\": [58, 10], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [60, 15], \"expected\": [60, 15], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [70, 14], \"expected\": [70, 14], \"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."}}