{"abstract":"Settling on a coupon date charges a full period of accrued interest.","category":"Bond day-count conventions","checks":8,"contract":"Inputs issue date, ascending coupon schedule (last = maturity) and settlement. Settlement before issue returns \"not issued\"; on or after maturity returns \"matured\". Otherwise return [period start, next coupon] where a settlement on a coupon date belongs to the following period and the first period starts at issue.","evaluation_group":"w2-bond_day_count_conventions-coupon-period-lookup","failed_approach":"Special-casing only the first coupon date leaves later coupon dates misassigned.","family":"w2-bond_day_count_conventions-coupon-period-lookup-coupon-date-ownership","id":"FA-61316","implementations":{"attempt":{"sha256":"668b2d0a6e151a5be094ae511c5c94584d83dd5353c7ed5e5a3373a4abded5b7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport bisect\nN = 1\nobservations = []\ndef solve(issue, schedule, settle):\n    I = datetime.date(*issue)\n    dates = [datetime.date(*d) for d in schedule]\n    S = datetime.date(*settle)\n    if S < I:\n        return 'not issued'\n    if S >= dates[-1]:\n        return 'matured'\n    i = bisect.bisect_left(dates, S) + (1 if S == dates[0] else 0)\n    prev = dates[i - 1] if i > 0 else I\n    nxt = dates[i]\n    return [[prev.year, prev.month, prev.day], [nxt.year, nxt.month, nxt.day]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression coupon date ownership 1', [[2036, 10, 5], [[2037, 2, 28], [2038, 2, 28], [2039, 2, 28], [2040, 2, 28], [2041, 2, 28], [2042, 2, 28]], [2037, 2, 28]], [[2037, 2, 28], [2038, 2, 28]]], ['regression coupon date ownership 2', [[2005, 3, 14], [[2006, 1, 30], [2006, 7, 30], [2007, 1, 30], [2007, 7, 30]], [2007, 1, 30]], [[2007, 1, 30], [2007, 7, 30]]], ['partial repair probe 1', [[2020, 11, 21], [[2021, 1, 31], [2021, 4, 30], [2021, 7, 31], [2021, 10, 31], [2022, 1, 31]], [2021, 7, 31]], [[2021, 7, 31], [2021, 10, 31]]], ['partial repair probe 2', [[2027, 7, 19], [[2028, 3, 31], [2028, 9, 30], [2029, 3, 31], [2029, 9, 30], [2030, 3, 31], [2030, 9, 30]], [2029, 3, 31]], [[2029, 3, 31], [2029, 9, 30]]], ['normal control 1', [[2035, 7, 30], [[2036, 7, 4], [2036, 10, 4]], [2036, 7, 22]], [[2036, 7, 4], [2036, 10, 4]]], ['normal control 2', [[2017, 9, 22], [[2018, 5, 31], [2018, 8, 31], [2018, 11, 30], [2019, 2, 28], [2019, 5, 31], [2019, 8, 31]], [2018, 4, 14]], [[2017, 9, 22], [2018, 5, 31]]], ['normal control 3', [[2007, 11, 1], [[2008, 4, 20], [2009, 4, 20], [2010, 4, 20], [2011, 4, 20], [2012, 4, 20], [2013, 4, 20]], [2012, 8, 17]], [[2012, 4, 20], [2013, 4, 20]]], ['normal control 4', [[2035, 7, 7], [[2035, 12, 1], [2036, 12, 1], [2037, 12, 1], [2038, 12, 1], [2039, 12, 1]], [2035, 9, 22]], [[2035, 7, 7], [2035, 12, 1]]]], [['regression coupon date ownership 1', [[2004, 9, 18], [[2005, 5, 31], [2006, 5, 31], [2007, 5, 31], [2008, 5, 31]], [2007, 5, 31]], [[2007, 5, 31], [2008, 5, 31]]], ['regression coupon date ownership 2', [[2037, 4, 15], [[2038, 5, 9], [2038, 11, 9], [2039, 5, 9], [2039, 11, 9], [2040, 5, 9], [2040, 11, 9]], [2038, 11, 9]], [[2038, 11, 9], [2039, 5, 9]]], ['partial repair probe 1', [[2037, 2, 10], [[2038, 1, 19], [2038, 7, 19], [2039, 1, 19], [2039, 7, 19]], [2038, 7, 19]], [[2038, 7, 19], [2039, 1, 19]]], ['partial repair probe 2', [[2029, 12, 28], [[2030, 8, 25], [2030, 11, 25], [2031, 2, 25], [2031, 5, 25], [2031, 8, 25], [2031, 11, 25]], [2031, 8, 25]], [[2031, 8, 25], [2031, 11, 25]]], ['normal control 1', [[2011, 8, 10], [[2012, 8, 20], [2013, 8, 20], [2014, 8, 20], [2015, 8, 20], [2016, 8, 20]], [2014, 4, 14]], [[2013, 8, 20], [2014, 8, 20]]], ['normal control 2', [[2006, 1, 31], [[2006, 4, 22], [2006, 10, 22], [2007, 4, 22]], [2006, 2, 9]], [[2006, 1, 31], [2006, 4, 22]]], ['normal control 3', [[2017, 7, 2], [[2018, 7, 29], [2019, 7, 29], [2020, 7, 29], [2021, 7, 29], [2022, 7, 29], [2023, 7, 29]], [2017, 12, 19]], [[2017, 7, 2], [2018, 7, 29]]], ['normal control 4', [[2009, 4, 28], [[2009, 8, 28], [2009, 11, 28], [2010, 2, 28], [2010, 5, 28], [2010, 8, 28]], [2009, 4, 26]], 'not issued']], [['regression coupon date ownership 1', [[2026, 6, 8], [[2027, 1, 31], [2027, 7, 31], [2028, 1, 31], [2028, 7, 31], [2029, 1, 31]], [2027, 1, 31]], [[2027, 1, 31], [2027, 7, 31]]], ['regression coupon date ownership 2', [[2021, 7, 26], [[2022, 4, 30], [2022, 7, 30], [2022, 10, 30]], [2022, 7, 30]], [[2022, 7, 30], [2022, 10, 30]]], ['partial repair probe 1', [[2006, 6, 11], [[2007, 6, 8], [2007, 9, 8], [2007, 12, 8], [2008, 3, 8], [2008, 6, 8], [2008, 9, 8]], [2008, 6, 8]], [[2008, 6, 8], [2008, 9, 8]]], ['partial repair probe 2', [[2024, 8, 18], [[2025, 6, 18], [2025, 9, 18], [2025, 12, 18], [2026, 3, 18]], [2025, 9, 18]], [[2025, 9, 18], [2025, 12, 18]]], ['normal control 1', [[2038, 8, 29], [[2038, 12, 21], [2039, 3, 21], [2039, 6, 21], [2039, 9, 21], [2039, 12, 21]], [2039, 5, 16]], [[2039, 3, 21], [2039, 6, 21]]], ['normal control 2', [[2008, 1, 6], [[2008, 4, 30], [2008, 7, 30]], [2008, 4, 11]], [[2008, 1, 6], [2008, 4, 30]]], ['normal control 3', [[2013, 8, 10], [[2014, 1, 30], [2015, 1, 30], [2016, 1, 30], [2017, 1, 30], [2018, 1, 30], [2019, 1, 30]], [2019, 1, 30]], 'matured'], ['normal control 4', [[2007, 8, 10], [[2008, 2, 27], [2008, 5, 27]], [2007, 12, 1]], [[2007, 8, 10], [2008, 2, 27]]]], [['regression coupon date ownership 1', [[2037, 7, 21], [[2038, 2, 27], [2038, 5, 27], [2038, 8, 27]], [2038, 2, 27]], [[2038, 2, 27], [2038, 5, 27]]], ['regression coupon date ownership 2', [[2018, 2, 25], [[2019, 3, 10], [2019, 9, 10], [2020, 3, 10], [2020, 9, 10]], [2019, 3, 10]], [[2019, 3, 10], [2019, 9, 10]]], ['partial repair probe 1', [[2032, 3, 12], [[2032, 12, 14], [2033, 6, 14], [2033, 12, 14], [2034, 6, 14], [2034, 12, 14]], [2034, 6, 14]], [[2034, 6, 14], [2034, 12, 14]]], ['partial repair probe 2', [[2016, 5, 5], [[2016, 10, 31], [2017, 1, 31], [2017, 4, 30], [2017, 7, 31], [2017, 10, 31]], [2017, 4, 30]], [[2017, 4, 30], [2017, 7, 31]]], ['normal control 1', [[2040, 3, 17], [[2040, 12, 17], [2041, 6, 17]], [2040, 6, 8]], [[2040, 3, 17], [2040, 12, 17]]], ['normal control 2', [[2006, 2, 27], [[2006, 11, 2], [2007, 5, 2]], [2006, 4, 2]], [[2006, 2, 27], [2006, 11, 2]]], ['normal control 3', [[2023, 4, 11], [[2024, 4, 20], [2025, 4, 20], [2026, 4, 20], [2027, 4, 20], [2028, 4, 20]], [2024, 4, 4]], [[2023, 4, 11], [2024, 4, 20]]], ['normal control 4', [[2040, 10, 29], [[2040, 11, 13], [2041, 2, 13], [2041, 5, 13], [2041, 8, 13], [2041, 11, 13], [2042, 2, 13]], [2040, 11, 7]], [[2040, 10, 29], [2040, 11, 13]]]], [['regression coupon date ownership 1', [[2037, 11, 10], [[2038, 3, 31], [2038, 6, 30], [2038, 9, 30], [2038, 12, 31]], [2038, 3, 31]], [[2038, 3, 31], [2038, 6, 30]]], ['regression coupon date ownership 2', [[2019, 2, 10], [[2019, 11, 28], [2020, 5, 28], [2020, 11, 28], [2021, 5, 28]], [2020, 5, 28]], [[2020, 5, 28], [2020, 11, 28]]], ['partial repair probe 1', [[2010, 6, 29], [[2011, 5, 31], [2012, 5, 31], [2013, 5, 31], [2014, 5, 31], [2015, 5, 31]], [2012, 5, 31]], [[2012, 5, 31], [2013, 5, 31]]], ['partial repair probe 2', [[2004, 11, 28], [[2005, 8, 24], [2006, 8, 24], [2007, 8, 24], [2008, 8, 24], [2009, 8, 24]], [2008, 8, 24]], [[2008, 8, 24], [2009, 8, 24]]], ['normal control 1', [[2023, 2, 24], [[2023, 6, 18], [2023, 12, 18], [2024, 6, 18], [2024, 12, 18], [2025, 6, 18], [2025, 12, 18]], [2023, 9, 4]], [[2023, 6, 18], [2023, 12, 18]]], ['normal control 2', [[2032, 10, 14], [[2033, 5, 30], [2034, 5, 30], [2035, 5, 30], [2036, 5, 30], [2037, 5, 30], [2038, 5, 30]], [2034, 2, 28]], [[2033, 5, 30], [2034, 5, 30]]], ['normal control 3', [[2021, 9, 10], [[2022, 4, 21], [2023, 4, 21]], [2023, 4, 21]], 'matured'], ['normal control 4', [[2010, 11, 2], [[2011, 3, 17], [2011, 9, 17], [2012, 3, 17]], [2011, 12, 2]], [[2011, 9, 17], [2012, 3, 17]]]]]\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":"2a3f7b4c941ead41d3e71d5e3c8b06086335ed81ee6a00424ebfe988a287e6bb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport bisect\nN = 1\nobservations = []\ndef solve(issue, schedule, settle):\n    I = datetime.date(*issue)\n    dates = [datetime.date(*d) for d in schedule]\n    S = datetime.date(*settle)\n    if S < I:\n        return 'not issued'\n    if S >= dates[-1]:\n        return 'matured'\n    i = bisect.bisect_left(dates, S)\n    prev = dates[i - 1] if i > 0 else I\n    nxt = dates[i]\n    return [[prev.year, prev.month, prev.day], [nxt.year, nxt.month, nxt.day]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression coupon date ownership 1', [[2036, 10, 5], [[2037, 2, 28], [2038, 2, 28], [2039, 2, 28], [2040, 2, 28], [2041, 2, 28], [2042, 2, 28]], [2037, 2, 28]], [[2037, 2, 28], [2038, 2, 28]]], ['regression coupon date ownership 2', [[2005, 3, 14], [[2006, 1, 30], [2006, 7, 30], [2007, 1, 30], [2007, 7, 30]], [2007, 1, 30]], [[2007, 1, 30], [2007, 7, 30]]], ['partial repair probe 1', [[2020, 11, 21], [[2021, 1, 31], [2021, 4, 30], [2021, 7, 31], [2021, 10, 31], [2022, 1, 31]], [2021, 7, 31]], [[2021, 7, 31], [2021, 10, 31]]], ['partial repair probe 2', [[2027, 7, 19], [[2028, 3, 31], [2028, 9, 30], [2029, 3, 31], [2029, 9, 30], [2030, 3, 31], [2030, 9, 30]], [2029, 3, 31]], [[2029, 3, 31], [2029, 9, 30]]], ['normal control 1', [[2035, 7, 30], [[2036, 7, 4], [2036, 10, 4]], [2036, 7, 22]], [[2036, 7, 4], [2036, 10, 4]]], ['normal control 2', [[2017, 9, 22], [[2018, 5, 31], [2018, 8, 31], [2018, 11, 30], [2019, 2, 28], [2019, 5, 31], [2019, 8, 31]], [2018, 4, 14]], [[2017, 9, 22], [2018, 5, 31]]], ['normal control 3', [[2007, 11, 1], [[2008, 4, 20], [2009, 4, 20], [2010, 4, 20], [2011, 4, 20], [2012, 4, 20], [2013, 4, 20]], [2012, 8, 17]], [[2012, 4, 20], [2013, 4, 20]]], ['normal control 4', [[2035, 7, 7], [[2035, 12, 1], [2036, 12, 1], [2037, 12, 1], [2038, 12, 1], [2039, 12, 1]], [2035, 9, 22]], [[2035, 7, 7], [2035, 12, 1]]]], [['regression coupon date ownership 1', [[2004, 9, 18], [[2005, 5, 31], [2006, 5, 31], [2007, 5, 31], [2008, 5, 31]], [2007, 5, 31]], [[2007, 5, 31], [2008, 5, 31]]], ['regression coupon date ownership 2', [[2037, 4, 15], [[2038, 5, 9], [2038, 11, 9], [2039, 5, 9], [2039, 11, 9], [2040, 5, 9], [2040, 11, 9]], [2038, 11, 9]], [[2038, 11, 9], [2039, 5, 9]]], ['partial repair probe 1', [[2037, 2, 10], [[2038, 1, 19], [2038, 7, 19], [2039, 1, 19], [2039, 7, 19]], [2038, 7, 19]], [[2038, 7, 19], [2039, 1, 19]]], ['partial repair probe 2', [[2029, 12, 28], [[2030, 8, 25], [2030, 11, 25], [2031, 2, 25], [2031, 5, 25], [2031, 8, 25], [2031, 11, 25]], [2031, 8, 25]], [[2031, 8, 25], [2031, 11, 25]]], ['normal control 1', [[2011, 8, 10], [[2012, 8, 20], [2013, 8, 20], [2014, 8, 20], [2015, 8, 20], [2016, 8, 20]], [2014, 4, 14]], [[2013, 8, 20], [2014, 8, 20]]], ['normal control 2', [[2006, 1, 31], [[2006, 4, 22], [2006, 10, 22], [2007, 4, 22]], [2006, 2, 9]], [[2006, 1, 31], [2006, 4, 22]]], ['normal control 3', [[2017, 7, 2], [[2018, 7, 29], [2019, 7, 29], [2020, 7, 29], [2021, 7, 29], [2022, 7, 29], [2023, 7, 29]], [2017, 12, 19]], [[2017, 7, 2], [2018, 7, 29]]], ['normal control 4', [[2009, 4, 28], [[2009, 8, 28], [2009, 11, 28], [2010, 2, 28], [2010, 5, 28], [2010, 8, 28]], [2009, 4, 26]], 'not issued']], [['regression coupon date ownership 1', [[2026, 6, 8], [[2027, 1, 31], [2027, 7, 31], [2028, 1, 31], [2028, 7, 31], [2029, 1, 31]], [2027, 1, 31]], [[2027, 1, 31], [2027, 7, 31]]], ['regression coupon date ownership 2', [[2021, 7, 26], [[2022, 4, 30], [2022, 7, 30], [2022, 10, 30]], [2022, 7, 30]], [[2022, 7, 30], [2022, 10, 30]]], ['partial repair probe 1', [[2006, 6, 11], [[2007, 6, 8], [2007, 9, 8], [2007, 12, 8], [2008, 3, 8], [2008, 6, 8], [2008, 9, 8]], [2008, 6, 8]], [[2008, 6, 8], [2008, 9, 8]]], ['partial repair probe 2', [[2024, 8, 18], [[2025, 6, 18], [2025, 9, 18], [2025, 12, 18], [2026, 3, 18]], [2025, 9, 18]], [[2025, 9, 18], [2025, 12, 18]]], ['normal control 1', [[2038, 8, 29], [[2038, 12, 21], [2039, 3, 21], [2039, 6, 21], [2039, 9, 21], [2039, 12, 21]], [2039, 5, 16]], [[2039, 3, 21], [2039, 6, 21]]], ['normal control 2', [[2008, 1, 6], [[2008, 4, 30], [2008, 7, 30]], [2008, 4, 11]], [[2008, 1, 6], [2008, 4, 30]]], ['normal control 3', [[2013, 8, 10], [[2014, 1, 30], [2015, 1, 30], [2016, 1, 30], [2017, 1, 30], [2018, 1, 30], [2019, 1, 30]], [2019, 1, 30]], 'matured'], ['normal control 4', [[2007, 8, 10], [[2008, 2, 27], [2008, 5, 27]], [2007, 12, 1]], [[2007, 8, 10], [2008, 2, 27]]]], [['regression coupon date ownership 1', [[2037, 7, 21], [[2038, 2, 27], [2038, 5, 27], [2038, 8, 27]], [2038, 2, 27]], [[2038, 2, 27], [2038, 5, 27]]], ['regression coupon date ownership 2', [[2018, 2, 25], [[2019, 3, 10], [2019, 9, 10], [2020, 3, 10], [2020, 9, 10]], [2019, 3, 10]], [[2019, 3, 10], [2019, 9, 10]]], ['partial repair probe 1', [[2032, 3, 12], [[2032, 12, 14], [2033, 6, 14], [2033, 12, 14], [2034, 6, 14], [2034, 12, 14]], [2034, 6, 14]], [[2034, 6, 14], [2034, 12, 14]]], ['partial repair probe 2', [[2016, 5, 5], [[2016, 10, 31], [2017, 1, 31], [2017, 4, 30], [2017, 7, 31], [2017, 10, 31]], [2017, 4, 30]], [[2017, 4, 30], [2017, 7, 31]]], ['normal control 1', [[2040, 3, 17], [[2040, 12, 17], [2041, 6, 17]], [2040, 6, 8]], [[2040, 3, 17], [2040, 12, 17]]], ['normal control 2', [[2006, 2, 27], [[2006, 11, 2], [2007, 5, 2]], [2006, 4, 2]], [[2006, 2, 27], [2006, 11, 2]]], ['normal control 3', [[2023, 4, 11], [[2024, 4, 20], [2025, 4, 20], [2026, 4, 20], [2027, 4, 20], [2028, 4, 20]], [2024, 4, 4]], [[2023, 4, 11], [2024, 4, 20]]], ['normal control 4', [[2040, 10, 29], [[2040, 11, 13], [2041, 2, 13], [2041, 5, 13], [2041, 8, 13], [2041, 11, 13], [2042, 2, 13]], [2040, 11, 7]], [[2040, 10, 29], [2040, 11, 13]]]], [['regression coupon date ownership 1', [[2037, 11, 10], [[2038, 3, 31], [2038, 6, 30], [2038, 9, 30], [2038, 12, 31]], [2038, 3, 31]], [[2038, 3, 31], [2038, 6, 30]]], ['regression coupon date ownership 2', [[2019, 2, 10], [[2019, 11, 28], [2020, 5, 28], [2020, 11, 28], [2021, 5, 28]], [2020, 5, 28]], [[2020, 5, 28], [2020, 11, 28]]], ['partial repair probe 1', [[2010, 6, 29], [[2011, 5, 31], [2012, 5, 31], [2013, 5, 31], [2014, 5, 31], [2015, 5, 31]], [2012, 5, 31]], [[2012, 5, 31], [2013, 5, 31]]], ['partial repair probe 2', [[2004, 11, 28], [[2005, 8, 24], [2006, 8, 24], [2007, 8, 24], [2008, 8, 24], [2009, 8, 24]], [2008, 8, 24]], [[2008, 8, 24], [2009, 8, 24]]], ['normal control 1', [[2023, 2, 24], [[2023, 6, 18], [2023, 12, 18], [2024, 6, 18], [2024, 12, 18], [2025, 6, 18], [2025, 12, 18]], [2023, 9, 4]], [[2023, 6, 18], [2023, 12, 18]]], ['normal control 2', [[2032, 10, 14], [[2033, 5, 30], [2034, 5, 30], [2035, 5, 30], [2036, 5, 30], [2037, 5, 30], [2038, 5, 30]], [2034, 2, 28]], [[2033, 5, 30], [2034, 5, 30]]], ['normal control 3', [[2021, 9, 10], [[2022, 4, 21], [2023, 4, 21]], [2023, 4, 21]], 'matured'], ['normal control 4', [[2010, 11, 2], [[2011, 3, 17], [2011, 9, 17], [2012, 3, 17]], [2011, 12, 2]], [[2011, 9, 17], [2012, 3, 17]]]]]\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"},"fixed":{"sha256":"c8e1da18f4d87042880b49831e59b69dfc04a4183bf0b0c5b1d568af215fb86c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport bisect\nN = 1\nobservations = []\ndef solve(issue, schedule, settle):\n    I = datetime.date(*issue)\n    dates = [datetime.date(*d) for d in schedule]\n    S = datetime.date(*settle)\n    if S < I:\n        return 'not issued'\n    if S >= dates[-1]:\n        return 'matured'\n    i = bisect.bisect_right(dates, S)\n    prev = dates[i - 1] if i > 0 else I\n    nxt = dates[i]\n    return [[prev.year, prev.month, prev.day], [nxt.year, nxt.month, nxt.day]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression coupon date ownership 1', [[2036, 10, 5], [[2037, 2, 28], [2038, 2, 28], [2039, 2, 28], [2040, 2, 28], [2041, 2, 28], [2042, 2, 28]], [2037, 2, 28]], [[2037, 2, 28], [2038, 2, 28]]], ['regression coupon date ownership 2', [[2005, 3, 14], [[2006, 1, 30], [2006, 7, 30], [2007, 1, 30], [2007, 7, 30]], [2007, 1, 30]], [[2007, 1, 30], [2007, 7, 30]]], ['partial repair probe 1', [[2020, 11, 21], [[2021, 1, 31], [2021, 4, 30], [2021, 7, 31], [2021, 10, 31], [2022, 1, 31]], [2021, 7, 31]], [[2021, 7, 31], [2021, 10, 31]]], ['partial repair probe 2', [[2027, 7, 19], [[2028, 3, 31], [2028, 9, 30], [2029, 3, 31], [2029, 9, 30], [2030, 3, 31], [2030, 9, 30]], [2029, 3, 31]], [[2029, 3, 31], [2029, 9, 30]]], ['normal control 1', [[2035, 7, 30], [[2036, 7, 4], [2036, 10, 4]], [2036, 7, 22]], [[2036, 7, 4], [2036, 10, 4]]], ['normal control 2', [[2017, 9, 22], [[2018, 5, 31], [2018, 8, 31], [2018, 11, 30], [2019, 2, 28], [2019, 5, 31], [2019, 8, 31]], [2018, 4, 14]], [[2017, 9, 22], [2018, 5, 31]]], ['normal control 3', [[2007, 11, 1], [[2008, 4, 20], [2009, 4, 20], [2010, 4, 20], [2011, 4, 20], [2012, 4, 20], [2013, 4, 20]], [2012, 8, 17]], [[2012, 4, 20], [2013, 4, 20]]], ['normal control 4', [[2035, 7, 7], [[2035, 12, 1], [2036, 12, 1], [2037, 12, 1], [2038, 12, 1], [2039, 12, 1]], [2035, 9, 22]], [[2035, 7, 7], [2035, 12, 1]]]], [['regression coupon date ownership 1', [[2004, 9, 18], [[2005, 5, 31], [2006, 5, 31], [2007, 5, 31], [2008, 5, 31]], [2007, 5, 31]], [[2007, 5, 31], [2008, 5, 31]]], ['regression coupon date ownership 2', [[2037, 4, 15], [[2038, 5, 9], [2038, 11, 9], [2039, 5, 9], [2039, 11, 9], [2040, 5, 9], [2040, 11, 9]], [2038, 11, 9]], [[2038, 11, 9], [2039, 5, 9]]], ['partial repair probe 1', [[2037, 2, 10], [[2038, 1, 19], [2038, 7, 19], [2039, 1, 19], [2039, 7, 19]], [2038, 7, 19]], [[2038, 7, 19], [2039, 1, 19]]], ['partial repair probe 2', [[2029, 12, 28], [[2030, 8, 25], [2030, 11, 25], [2031, 2, 25], [2031, 5, 25], [2031, 8, 25], [2031, 11, 25]], [2031, 8, 25]], [[2031, 8, 25], [2031, 11, 25]]], ['normal control 1', [[2011, 8, 10], [[2012, 8, 20], [2013, 8, 20], [2014, 8, 20], [2015, 8, 20], [2016, 8, 20]], [2014, 4, 14]], [[2013, 8, 20], [2014, 8, 20]]], ['normal control 2', [[2006, 1, 31], [[2006, 4, 22], [2006, 10, 22], [2007, 4, 22]], [2006, 2, 9]], [[2006, 1, 31], [2006, 4, 22]]], ['normal control 3', [[2017, 7, 2], [[2018, 7, 29], [2019, 7, 29], [2020, 7, 29], [2021, 7, 29], [2022, 7, 29], [2023, 7, 29]], [2017, 12, 19]], [[2017, 7, 2], [2018, 7, 29]]], ['normal control 4', [[2009, 4, 28], [[2009, 8, 28], [2009, 11, 28], [2010, 2, 28], [2010, 5, 28], [2010, 8, 28]], [2009, 4, 26]], 'not issued']], [['regression coupon date ownership 1', [[2026, 6, 8], [[2027, 1, 31], [2027, 7, 31], [2028, 1, 31], [2028, 7, 31], [2029, 1, 31]], [2027, 1, 31]], [[2027, 1, 31], [2027, 7, 31]]], ['regression coupon date ownership 2', [[2021, 7, 26], [[2022, 4, 30], [2022, 7, 30], [2022, 10, 30]], [2022, 7, 30]], [[2022, 7, 30], [2022, 10, 30]]], ['partial repair probe 1', [[2006, 6, 11], [[2007, 6, 8], [2007, 9, 8], [2007, 12, 8], [2008, 3, 8], [2008, 6, 8], [2008, 9, 8]], [2008, 6, 8]], [[2008, 6, 8], [2008, 9, 8]]], ['partial repair probe 2', [[2024, 8, 18], [[2025, 6, 18], [2025, 9, 18], [2025, 12, 18], [2026, 3, 18]], [2025, 9, 18]], [[2025, 9, 18], [2025, 12, 18]]], ['normal control 1', [[2038, 8, 29], [[2038, 12, 21], [2039, 3, 21], [2039, 6, 21], [2039, 9, 21], [2039, 12, 21]], [2039, 5, 16]], [[2039, 3, 21], [2039, 6, 21]]], ['normal control 2', [[2008, 1, 6], [[2008, 4, 30], [2008, 7, 30]], [2008, 4, 11]], [[2008, 1, 6], [2008, 4, 30]]], ['normal control 3', [[2013, 8, 10], [[2014, 1, 30], [2015, 1, 30], [2016, 1, 30], [2017, 1, 30], [2018, 1, 30], [2019, 1, 30]], [2019, 1, 30]], 'matured'], ['normal control 4', [[2007, 8, 10], [[2008, 2, 27], [2008, 5, 27]], [2007, 12, 1]], [[2007, 8, 10], [2008, 2, 27]]]], [['regression coupon date ownership 1', [[2037, 7, 21], [[2038, 2, 27], [2038, 5, 27], [2038, 8, 27]], [2038, 2, 27]], [[2038, 2, 27], [2038, 5, 27]]], ['regression coupon date ownership 2', [[2018, 2, 25], [[2019, 3, 10], [2019, 9, 10], [2020, 3, 10], [2020, 9, 10]], [2019, 3, 10]], [[2019, 3, 10], [2019, 9, 10]]], ['partial repair probe 1', [[2032, 3, 12], [[2032, 12, 14], [2033, 6, 14], [2033, 12, 14], [2034, 6, 14], [2034, 12, 14]], [2034, 6, 14]], [[2034, 6, 14], [2034, 12, 14]]], ['partial repair probe 2', [[2016, 5, 5], [[2016, 10, 31], [2017, 1, 31], [2017, 4, 30], [2017, 7, 31], [2017, 10, 31]], [2017, 4, 30]], [[2017, 4, 30], [2017, 7, 31]]], ['normal control 1', [[2040, 3, 17], [[2040, 12, 17], [2041, 6, 17]], [2040, 6, 8]], [[2040, 3, 17], [2040, 12, 17]]], ['normal control 2', [[2006, 2, 27], [[2006, 11, 2], [2007, 5, 2]], [2006, 4, 2]], [[2006, 2, 27], [2006, 11, 2]]], ['normal control 3', [[2023, 4, 11], [[2024, 4, 20], [2025, 4, 20], [2026, 4, 20], [2027, 4, 20], [2028, 4, 20]], [2024, 4, 4]], [[2023, 4, 11], [2024, 4, 20]]], ['normal control 4', [[2040, 10, 29], [[2040, 11, 13], [2041, 2, 13], [2041, 5, 13], [2041, 8, 13], [2041, 11, 13], [2042, 2, 13]], [2040, 11, 7]], [[2040, 10, 29], [2040, 11, 13]]]], [['regression coupon date ownership 1', [[2037, 11, 10], [[2038, 3, 31], [2038, 6, 30], [2038, 9, 30], [2038, 12, 31]], [2038, 3, 31]], [[2038, 3, 31], [2038, 6, 30]]], ['regression coupon date ownership 2', [[2019, 2, 10], [[2019, 11, 28], [2020, 5, 28], [2020, 11, 28], [2021, 5, 28]], [2020, 5, 28]], [[2020, 5, 28], [2020, 11, 28]]], ['partial repair probe 1', [[2010, 6, 29], [[2011, 5, 31], [2012, 5, 31], [2013, 5, 31], [2014, 5, 31], [2015, 5, 31]], [2012, 5, 31]], [[2012, 5, 31], [2013, 5, 31]]], ['partial repair probe 2', [[2004, 11, 28], [[2005, 8, 24], [2006, 8, 24], [2007, 8, 24], [2008, 8, 24], [2009, 8, 24]], [2008, 8, 24]], [[2008, 8, 24], [2009, 8, 24]]], ['normal control 1', [[2023, 2, 24], [[2023, 6, 18], [2023, 12, 18], [2024, 6, 18], [2024, 12, 18], [2025, 6, 18], [2025, 12, 18]], [2023, 9, 4]], [[2023, 6, 18], [2023, 12, 18]]], ['normal control 2', [[2032, 10, 14], [[2033, 5, 30], [2034, 5, 30], [2035, 5, 30], [2036, 5, 30], [2037, 5, 30], [2038, 5, 30]], [2034, 2, 28]], [[2033, 5, 30], [2034, 5, 30]]], ['normal control 3', [[2021, 9, 10], [[2022, 4, 21], [2023, 4, 21]], [2023, 4, 21]], 'matured'], ['normal control 4', [[2010, 11, 2], [[2011, 3, 17], [2011, 9, 17], [2012, 3, 17]], [2011, 12, 2]], [[2011, 9, 17], [2012, 3, 17]]]]]\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 toy contract stated explicitly in the contract field; no claim of conformance to any published convention text. 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-bond_day_count_conventions-coupon-period-lookup-coupon-date-ownership","generated_at":"2026-09-29T14:46:54.210959+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.","repair":"Use bisect_right so a coupon date starts the next period.","root_cause":"The search uses bisect_left, which places an exact coupon date in the preceding period.","sha256":"c28fca7bc84bd094f4139462aabb866ecbfc383a4944ba1535d4e08c0f344b04","title":"Coupon period lookup for a settlement date: a settlement on a coupon date is assigned to the ending period · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.866,"exit_code":1,"observations":[{"actual":[[2037,2,28],[2038,2,28]],"check":"regression coupon date ownership 1","expected":[[2037,2,28],[2038,2,28]],"passed":true},{"actual":[[2006,7,30],[2007,1,30]],"check":"regression coupon date ownership 2","expected":[[2007,1,30],[2007,7,30]],"passed":false},{"actual":[[2021,4,30],[2021,7,31]],"check":"partial repair probe 1","expected":[[2021,7,31],[2021,10,31]],"passed":false},{"actual":[[2028,9,30],[2029,3,31]],"check":"partial repair probe 2","expected":[[2029,3,31],[2029,9,30]],"passed":false},{"actual":[[2036,7,4],[2036,10,4]],"check":"normal control 1","expected":[[2036,7,4],[2036,10,4]],"passed":true},{"actual":[[2017,9,22],[2018,5,31]],"check":"normal control 2","expected":[[2017,9,22],[2018,5,31]],"passed":true},{"actual":[[2012,4,20],[2013,4,20]],"check":"normal control 3","expected":[[2012,4,20],[2013,4,20]],"passed":true},{"actual":[[2035,7,7],[2035,12,1]],"check":"normal control 4","expected":[[2035,7,7],[2035,12,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression coupon date ownership 1\", \"actual\": [[2037, 2, 28], [2038, 2, 28]], \"expected\": [[2037, 2, 28], [2038, 2, 28]], \"passed\": true}, {\"check\": \"regression coupon date ownership 2\", \"actual\": [[2006, 7, 30], [2007, 1, 30]], \"expected\": [[2007, 1, 30], [2007, 7, 30]], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [[2021, 4, 30], [2021, 7, 31]], \"expected\": [[2021, 7, 31], [2021, 10, 31]], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [[2028, 9, 30], [2029, 3, 31]], \"expected\": [[2029, 3, 31], [2029, 9, 30]], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [[2036, 7, 4], [2036, 10, 4]], \"expected\": [[2036, 7, 4], [2036, 10, 4]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[2017, 9, 22], [2018, 5, 31]], \"expected\": [[2017, 9, 22], [2018, 5, 31]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [[2012, 4, 20], [2013, 4, 20]], \"expected\": [[2012, 4, 20], [2013, 4, 20]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [[2035, 7, 7], [2035, 12, 1]], \"expected\": [[2035, 7, 7], [2035, 12, 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.836,"exit_code":1,"observations":[{"actual":[[2036,10,5],[2037,2,28]],"check":"regression coupon date ownership 1","expected":[[2037,2,28],[2038,2,28]],"passed":false},{"actual":[[2006,7,30],[2007,1,30]],"check":"regression coupon date ownership 2","expected":[[2007,1,30],[2007,7,30]],"passed":false},{"actual":[[2021,4,30],[2021,7,31]],"check":"partial repair probe 1","expected":[[2021,7,31],[2021,10,31]],"passed":false},{"actual":[[2028,9,30],[2029,3,31]],"check":"partial repair probe 2","expected":[[2029,3,31],[2029,9,30]],"passed":false},{"actual":[[2036,7,4],[2036,10,4]],"check":"normal control 1","expected":[[2036,7,4],[2036,10,4]],"passed":true},{"actual":[[2017,9,22],[2018,5,31]],"check":"normal control 2","expected":[[2017,9,22],[2018,5,31]],"passed":true},{"actual":[[2012,4,20],[2013,4,20]],"check":"normal control 3","expected":[[2012,4,20],[2013,4,20]],"passed":true},{"actual":[[2035,7,7],[2035,12,1]],"check":"normal control 4","expected":[[2035,7,7],[2035,12,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression coupon date ownership 1\", \"actual\": [[2036, 10, 5], [2037, 2, 28]], \"expected\": [[2037, 2, 28], [2038, 2, 28]], \"passed\": false}, {\"check\": \"regression coupon date ownership 2\", \"actual\": [[2006, 7, 30], [2007, 1, 30]], \"expected\": [[2007, 1, 30], [2007, 7, 30]], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [[2021, 4, 30], [2021, 7, 31]], \"expected\": [[2021, 7, 31], [2021, 10, 31]], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [[2028, 9, 30], [2029, 3, 31]], \"expected\": [[2029, 3, 31], [2029, 9, 30]], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [[2036, 7, 4], [2036, 10, 4]], \"expected\": [[2036, 7, 4], [2036, 10, 4]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[2017, 9, 22], [2018, 5, 31]], \"expected\": [[2017, 9, 22], [2018, 5, 31]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [[2012, 4, 20], [2013, 4, 20]], \"expected\": [[2012, 4, 20], [2013, 4, 20]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [[2035, 7, 7], [2035, 12, 1]], \"expected\": [[2035, 7, 7], [2035, 12, 1]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.37,"exit_code":0,"observations":[{"actual":[[2037,2,28],[2038,2,28]],"check":"regression coupon date ownership 1","expected":[[2037,2,28],[2038,2,28]],"passed":true},{"actual":[[2007,1,30],[2007,7,30]],"check":"regression coupon date ownership 2","expected":[[2007,1,30],[2007,7,30]],"passed":true},{"actual":[[2021,7,31],[2021,10,31]],"check":"partial repair probe 1","expected":[[2021,7,31],[2021,10,31]],"passed":true},{"actual":[[2029,3,31],[2029,9,30]],"check":"partial repair probe 2","expected":[[2029,3,31],[2029,9,30]],"passed":true},{"actual":[[2036,7,4],[2036,10,4]],"check":"normal control 1","expected":[[2036,7,4],[2036,10,4]],"passed":true},{"actual":[[2017,9,22],[2018,5,31]],"check":"normal control 2","expected":[[2017,9,22],[2018,5,31]],"passed":true},{"actual":[[2012,4,20],[2013,4,20]],"check":"normal control 3","expected":[[2012,4,20],[2013,4,20]],"passed":true},{"actual":[[2035,7,7],[2035,12,1]],"check":"normal control 4","expected":[[2035,7,7],[2035,12,1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression coupon date ownership 1\", \"actual\": [[2037, 2, 28], [2038, 2, 28]], \"expected\": [[2037, 2, 28], [2038, 2, 28]], \"passed\": true}, {\"check\": \"regression coupon date ownership 2\", \"actual\": [[2007, 1, 30], [2007, 7, 30]], \"expected\": [[2007, 1, 30], [2007, 7, 30]], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [[2021, 7, 31], [2021, 10, 31]], \"expected\": [[2021, 7, 31], [2021, 10, 31]], \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": [[2029, 3, 31], [2029, 9, 30]], \"expected\": [[2029, 3, 31], [2029, 9, 30]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [[2036, 7, 4], [2036, 10, 4]], \"expected\": [[2036, 7, 4], [2036, 10, 4]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[2017, 9, 22], [2018, 5, 31]], \"expected\": [[2017, 9, 22], [2018, 5, 31]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [[2012, 4, 20], [2013, 4, 20]], \"expected\": [[2012, 4, 20], [2013, 4, 20]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [[2035, 7, 7], [2035, 12, 1]], \"expected\": [[2035, 7, 7], [2035, 12, 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}