{"abstract":"Non-median quantiles are reversed.","category":"Actuarial life tables","checks":8,"contract":"Input l (from age x) and p (per mille surviving, 0<p<1000 else 'invalid'; also l_0<=0). Find the first t with l_t <= l_0 p/1000 and interpolate linearly: t-1 + (l_{t-1}-target)/(l_{t-1}-l_t). No crossing -> 'beyond table'. Rounded to 6.","contract_signature":"x","evaluation_group":"w2-actuarial_life_tables-median-future-lifetime","failed_approach":"Reading p as a percentage makes the target exceed l_0.","family":"w2-actuarial_life_tables-median-future-lifetime-target-survivors","id":"FA-63826","implementations":{"attempt":{"sha256":"1cb2ab66be91207c41978be8985c602f2d787cbec4f97494bd268996988cb4d2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    l=x['l']\n    if l[0]<=0 or not 0<x['p']<1000: return 'invalid'\n    target=Fraction(l[0]*x['p'],100)\n    for t in range(1,len(l)):\n        if l[t]<=target:\n            frac=(l[t-1]-target)/(l[t-1]-l[t])\n            return round(float(t-1+frac),6)\n    return 'beyond table'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['median', {'l': [100000, 99387, 98676, 97881, 96960, 95885, 94662, 93295, 91792, 90121, 88233, 0], 'p': 500}, 10.433319], ['upper quartile survival', {'l': [100000, 99475, 98885, 98208, 97456, 96585, 95576, 94404, 93122, 91705, 90114, 0], 'p': 750}, 10.167721], ['crossing in first year', {'l': [1000, 301, 100, 0], 'p': 500}, 0.715308], ['crossing at last age', {'l': [1000, 900, 800, 399], 'p': 500}, 2.74813], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99796, 99551, 99257, 98907, 98508, 98032, 97478, 96832, 96111, 95312, 0], 'p': 101}, 10.894032]], [['median', {'l': [100000, 99728, 99400, 99011, 98531, 97972, 97317, 96577, 95722, 94733, 93633, 0], 'p': 500}, 10.466], ['upper quartile survival', {'l': [100000, 99497, 98924, 98231, 97459, 96611, 95636, 94522, 93247, 91843, 90240, 0], 'p': 750}, 10.168883], ['crossing in first year', {'l': [1000, 302, 100, 0], 'p': 500}, 0.716332], ['crossing at last age', {'l': [1000, 900, 800, 398], 'p': 500}, 2.746269], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99549, 99016, 98408, 97709, 96926, 96052, 95042, 93885, 92604, 91159, 0], 'p': 102}, 10.888108]], [['median', {'l': [100000, 99519, 98953, 98284, 97516, 96640, 95632, 94490, 93212, 91778, 90214, 0], 'p': 500}, 10.445762], ['upper quartile survival', {'l': [100000, 99696, 99292, 98815, 98275, 97687, 97001, 96211, 95276, 94196, 92976, 0], 'p': 750}, 10.19334], ['crossing in first year', {'l': [1000, 303, 100, 0], 'p': 500}, 0.71736], ['crossing at last age', {'l': [1000, 900, 800, 397], 'p': 500}, 2.744417], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99674, 99256, 98791, 98244, 97618, 96907, 96078, 95119, 94025, 92792, 0], 'p': 103}, 10.888999]], [['median', {'l': [100000, 99629, 99193, 98668, 98069, 97392, 96584, 95658, 94604, 93390, 92018, 0], 'p': 500}, 10.456628], ['upper quartile survival', {'l': [100000, 99416, 98748, 97985, 97109, 96096, 94934, 93641, 92205, 90578, 88748, 0], 'p': 750}, 10.154911], ['crossing in first year', {'l': [1000, 304, 100, 0], 'p': 500}, 0.718391], ['crossing at last age', {'l': [1000, 900, 800, 396], 'p': 500}, 2.742574], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99428, 98766, 98052, 97212, 96267, 95157, 93939, 92567, 91036, 89325, 0], 'p': 104}, 10.883571]], [['median', {'l': [100000, 99481, 98876, 98212, 97434, 96547, 95571, 94472, 93234, 91812, 90252, 0], 'p': 500}, 10.445996], ['upper quartile survival', {'l': [100000, 99429, 98814, 98062, 97236, 96330, 95319, 94161, 92874, 91437, 89822, 0], 'p': 750}, 10.165015], ['crossing in first year', {'l': [1000, 305, 100, 0], 'p': 500}, 0.719424], ['crossing at last age', {'l': [1000, 900, 800, 395], 'p': 500}, 2.740741], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99395, 98716, 97924, 97019, 95986, 94803, 93476, 91996, 90309, 88450, 0], 'p': 105}, 10.881289]]]\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":"0f258e79b6fd2945346a2dbe3ee932e4cb73b0a169e2d491f952dd9d651fd105","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    l=x['l']\n    if l[0]<=0 or not 0<x['p']<1000: return 'invalid'\n    target=Fraction(l[0]*(1000-x['p']),1000)\n    for t in range(1,len(l)):\n        if l[t]<=target:\n            frac=(l[t-1]-target)/(l[t-1]-l[t])\n            return round(float(t-1+frac),6)\n    return 'beyond table'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['median', {'l': [100000, 99387, 98676, 97881, 96960, 95885, 94662, 93295, 91792, 90121, 88233, 0], 'p': 500}, 10.433319], ['upper quartile survival', {'l': [100000, 99475, 98885, 98208, 97456, 96585, 95576, 94404, 93122, 91705, 90114, 0], 'p': 750}, 10.167721], ['crossing in first year', {'l': [1000, 301, 100, 0], 'p': 500}, 0.715308], ['crossing at last age', {'l': [1000, 900, 800, 399], 'p': 500}, 2.74813], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99796, 99551, 99257, 98907, 98508, 98032, 97478, 96832, 96111, 95312, 0], 'p': 101}, 10.894032]], [['median', {'l': [100000, 99728, 99400, 99011, 98531, 97972, 97317, 96577, 95722, 94733, 93633, 0], 'p': 500}, 10.466], ['upper quartile survival', {'l': [100000, 99497, 98924, 98231, 97459, 96611, 95636, 94522, 93247, 91843, 90240, 0], 'p': 750}, 10.168883], ['crossing in first year', {'l': [1000, 302, 100, 0], 'p': 500}, 0.716332], ['crossing at last age', {'l': [1000, 900, 800, 398], 'p': 500}, 2.746269], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99549, 99016, 98408, 97709, 96926, 96052, 95042, 93885, 92604, 91159, 0], 'p': 102}, 10.888108]], [['median', {'l': [100000, 99519, 98953, 98284, 97516, 96640, 95632, 94490, 93212, 91778, 90214, 0], 'p': 500}, 10.445762], ['upper quartile survival', {'l': [100000, 99696, 99292, 98815, 98275, 97687, 97001, 96211, 95276, 94196, 92976, 0], 'p': 750}, 10.19334], ['crossing in first year', {'l': [1000, 303, 100, 0], 'p': 500}, 0.71736], ['crossing at last age', {'l': [1000, 900, 800, 397], 'p': 500}, 2.744417], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99674, 99256, 98791, 98244, 97618, 96907, 96078, 95119, 94025, 92792, 0], 'p': 103}, 10.888999]], [['median', {'l': [100000, 99629, 99193, 98668, 98069, 97392, 96584, 95658, 94604, 93390, 92018, 0], 'p': 500}, 10.456628], ['upper quartile survival', {'l': [100000, 99416, 98748, 97985, 97109, 96096, 94934, 93641, 92205, 90578, 88748, 0], 'p': 750}, 10.154911], ['crossing in first year', {'l': [1000, 304, 100, 0], 'p': 500}, 0.718391], ['crossing at last age', {'l': [1000, 900, 800, 396], 'p': 500}, 2.742574], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99428, 98766, 98052, 97212, 96267, 95157, 93939, 92567, 91036, 89325, 0], 'p': 104}, 10.883571]], [['median', {'l': [100000, 99481, 98876, 98212, 97434, 96547, 95571, 94472, 93234, 91812, 90252, 0], 'p': 500}, 10.445996], ['upper quartile survival', {'l': [100000, 99429, 98814, 98062, 97236, 96330, 95319, 94161, 92874, 91437, 89822, 0], 'p': 750}, 10.165015], ['crossing in first year', {'l': [1000, 305, 100, 0], 'p': 500}, 0.719424], ['crossing at last age', {'l': [1000, 900, 800, 395], 'p': 500}, 2.740741], ['never crosses', {'l': [1000, 950, 900], 'p': 500}, 'beyond table'], ['p zero rejected', {'l': [1000, 500, 0], 'p': 0}, 'invalid'], ['p full rejected', {'l': [1000, 500, 0], 'p': 1000}, 'invalid'], ['low quantile', {'l': [100000, 99395, 98716, 97924, 97019, 95986, 94803, 93476, 91996, 90309, 88450, 0], 'p': 105}, 10.881289]]]\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":"A deterministic bounded teaching model of a stipulated toy actuarial contract. Rates are small synthetic tables, exact rationals are used where practical and floats are rounded at the output; it makes no claim of conformance with any published table, standard of practice or regulation. 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-actuarial_life_tables-median-future-lifetime-target-survivors","generated_at":"2026-09-29T14:47:18.418553+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Life-table arithmetic compounds across ages, so one misplaced index or assumption shifts every downstream value.","root_cause":"The target uses 1-p.","sha256":"7cdb55b24f4bf1c2d8f610da92332e5cb8db73a8ef65de39b2a0502c055b7520","title":"Median and quantile future lifetime: Target is the fraction dead instead of surviving · 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":44.27,"exit_code":1,"observations":[{"actual":-652.528548,"check":"median","expected":10.433319,"passed":false},{"actual":-1238.095238,"check":"upper quartile survival","expected":10.167721,"passed":false},{"actual":-5.722461,"check":"crossing in first year","expected":0.715308,"passed":false},{"actual":-40.0,"check":"crossing at last age","expected":2.74813,"passed":false},{"actual":-80.0,"check":"never crosses","expected":"beyond table","passed":false},{"actual":"invalid","check":"p zero rejected","expected":"invalid","passed":true},{"actual":"invalid","check":"p full rejected","expected":"invalid","passed":true},{"actual":-4.901961,"check":"low quantile","expected":10.894032,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"median\", \"actual\": -652.528548, \"expected\": 10.433319, \"passed\": false}, {\"check\": \"upper quartile survival\", \"actual\": -1238.095238, \"expected\": 10.167721, \"passed\": false}, {\"check\": \"crossing in first year\", \"actual\": -5.722461, \"expected\": 0.715308, \"passed\": false}, {\"check\": \"crossing at last age\", \"actual\": -40.0, \"expected\": 2.74813, \"passed\": false}, {\"check\": \"never crosses\", \"actual\": -80.0, \"expected\": \"beyond table\", \"passed\": false}, {\"check\": \"p zero rejected\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"p full rejected\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"low quantile\", \"actual\": -4.901961, \"expected\": 10.894032, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.935,"exit_code":1,"observations":[{"actual":10.433319,"check":"median","expected":10.433319,"passed":true},{"actual":10.722574,"check":"upper quartile survival","expected":10.167721,"passed":false},{"actual":0.715308,"check":"crossing in first year","expected":0.715308,"passed":true},{"actual":2.74813,"check":"crossing at last age","expected":2.74813,"passed":true},{"actual":"beyond table","check":"never crosses","expected":"beyond table","passed":true},{"actual":"invalid","check":"p zero rejected","expected":"invalid","passed":true},{"actual":"invalid","check":"p full rejected","expected":"invalid","passed":true},{"actual":10.056782,"check":"low quantile","expected":10.894032,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"median\", \"actual\": 10.433319, \"expected\": 10.433319, \"passed\": true}, {\"check\": \"upper quartile survival\", \"actual\": 10.722574, \"expected\": 10.167721, \"passed\": false}, {\"check\": \"crossing in first year\", \"actual\": 0.715308, \"expected\": 0.715308, \"passed\": true}, {\"check\": \"crossing at last age\", \"actual\": 2.74813, \"expected\": 2.74813, \"passed\": true}, {\"check\": \"never crosses\", \"actual\": \"beyond table\", \"expected\": \"beyond table\", \"passed\": true}, {\"check\": \"p zero rejected\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"p full rejected\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"low quantile\", \"actual\": 10.056782, \"expected\": 10.894032, \"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."}}