{"abstract":"Removes the specific IndexError handler and changes the required Python-language result.","category":"Exception flow","checks":6,"contract":"Dispatch KeyError, IndexError, other LookupError, other Exception, and BaseException separately. Handler order must preserve the specific subclass cases; SystemExit belongs outside Exception. Inputs use the finite Python types shown in the fixtures. An error string denotes the specified caught exception, not an unhandled process failure.","evaluation_group":"xl-exception-handler-hierarchy","failed_approach":"The alternative still fails because it uses BaseException for the ordinary fallback and swallows control-flow exceptions.","family":"xl-exception-handler-hierarchy-index-specific-handler-lost","id":"FA-5221","implementations":{"attempt":{"sha256":"c3cafe18899752b1afb983b17b6b0da7698bdf1e6c022c073bd0227bfbcb3825","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind):\n    try:\n        kinds={'key':KeyError,'index':IndexError,'lookup':LookupError,'value':ValueError,'system':SystemExit}\n        if kind in kinds: raise kinds[kind]('failure')\n        return 'normal'\n    except KeyError: return 'key'\n    except IndexError: return 'index'\n    except LookupError: return 'lookup'\n    except BaseException: return 'other'\n    except BaseException: return 'base'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mapping failure', solve('key'), 'key')\ncheck('sequence failure', solve('index'), 'index')\ncheck('generic lookup failure', solve('lookup'), 'lookup')\ncheck('ordinary other error', solve('value'), 'other')\ncheck('termination is not Exception', solve('system'), 'base')\ncheck('normal path', solve('none'), 'normal')\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":"d474553ca93f75bb7eaff767c01e0d6428ee100c74385df75767ffeaab9ece57","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind):\n    try:\n        kinds={'key':KeyError,'index':IndexError,'lookup':LookupError,'value':ValueError,'system':SystemExit}\n        if kind in kinds: raise kinds[kind]('failure')\n        return 'normal'\n    except KeyError: return 'key'\n    except LookupError: return 'lookup'\n    except Exception: return 'other'\n    except BaseException: return 'base'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mapping failure', solve('key'), 'key')\ncheck('sequence failure', solve('index'), 'index')\ncheck('generic lookup failure', solve('lookup'), 'lookup')\ncheck('ordinary other error', solve('value'), 'other')\ncheck('termination is not Exception', solve('system'), 'base')\ncheck('normal path', solve('none'), 'normal')\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":"4697121472f684b4b3074f09990555dd0e6ee0969cb1153e8b5d78b0c9aa48cb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind):\n    try:\n        kinds={'key':KeyError,'index':IndexError,'lookup':LookupError,'value':ValueError,'system':SystemExit}\n        if kind in kinds: raise kinds[kind]('failure')\n        return 'normal'\n    except KeyError: return 'key'\n    except IndexError: return 'index'\n    except LookupError: return 'lookup'\n    except Exception: return 'other'\n    except BaseException: return 'base'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mapping failure', solve('key'), 'key')\ncheck('sequence failure', solve('index'), 'index')\ncheck('generic lookup failure', solve('lookup'), 'lookup')\ncheck('ordinary other error', solve('value'), 'other')\ncheck('termination is not Exception', solve('system'), 'base')\ncheck('normal path', solve('none'), 'normal')\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":" 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":"xl-exception-handler-hierarchy-index-specific-handler-lost","generated_at":"2026-09-29T14:37:47.222999+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Runs Python standard-library language operations in a deterministic local reproducer. Literal expected answers are authored independently. Related defects share an evaluation group to avoid benchmark split leakage.","repair":"Dispatch KeyError, IndexError, other LookupError, other Exception, and BaseException separately. Handler order must preserve the specific subclass cases; SystemExit belongs outside Exception.","root_cause":"Removes the specific IndexError handler. The executable reproducer isolates this operation from the rest of the contract.","sha256":"8ce4dba45b44674114efa43d74c464d99019d8b5cf9cc1f08388bc4cb6c6f7bd","title":"Exception handler hierarchy: Removes the specific IndexError handler · case 01","variant":1,"variant_policy":"The five numbered cases rerun the same authored boundary fixtures; they are reproducibility runs, not independent input variants.","verification":{"attempt":{"elapsed_ms":35.441,"exit_code":1,"observations":[{"actual":"key","check":"mapping failure","expected":"key","passed":true},{"actual":"index","check":"sequence failure","expected":"index","passed":true},{"actual":"lookup","check":"generic lookup failure","expected":"lookup","passed":true},{"actual":"other","check":"ordinary other error","expected":"other","passed":true},{"actual":"other","check":"termination is not Exception","expected":"base","passed":false},{"actual":"normal","check":"normal path","expected":"normal","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mapping failure\", \"actual\": \"key\", \"expected\": \"key\", \"passed\": true}, {\"check\": \"sequence failure\", \"actual\": \"index\", \"expected\": \"index\", \"passed\": true}, {\"check\": \"generic lookup failure\", \"actual\": \"lookup\", \"expected\": \"lookup\", \"passed\": true}, {\"check\": \"ordinary other error\", \"actual\": \"other\", \"expected\": \"other\", \"passed\": true}, {\"check\": \"termination is not Exception\", \"actual\": \"other\", \"expected\": \"base\", \"passed\": false}, {\"check\": \"normal path\", \"actual\": \"normal\", \"expected\": \"normal\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.718,"exit_code":1,"observations":[{"actual":"key","check":"mapping failure","expected":"key","passed":true},{"actual":"lookup","check":"sequence failure","expected":"index","passed":false},{"actual":"lookup","check":"generic lookup failure","expected":"lookup","passed":true},{"actual":"other","check":"ordinary other error","expected":"other","passed":true},{"actual":"base","check":"termination is not Exception","expected":"base","passed":true},{"actual":"normal","check":"normal path","expected":"normal","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mapping failure\", \"actual\": \"key\", \"expected\": \"key\", \"passed\": true}, {\"check\": \"sequence failure\", \"actual\": \"lookup\", \"expected\": \"index\", \"passed\": false}, {\"check\": \"generic lookup failure\", \"actual\": \"lookup\", \"expected\": \"lookup\", \"passed\": true}, {\"check\": \"ordinary other error\", \"actual\": \"other\", \"expected\": \"other\", \"passed\": true}, {\"check\": \"termination is not Exception\", \"actual\": \"base\", \"expected\": \"base\", \"passed\": true}, {\"check\": \"normal path\", \"actual\": \"normal\", \"expected\": \"normal\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.846,"exit_code":0,"observations":[{"actual":"key","check":"mapping failure","expected":"key","passed":true},{"actual":"index","check":"sequence failure","expected":"index","passed":true},{"actual":"lookup","check":"generic lookup failure","expected":"lookup","passed":true},{"actual":"other","check":"ordinary other error","expected":"other","passed":true},{"actual":"base","check":"termination is not Exception","expected":"base","passed":true},{"actual":"normal","check":"normal path","expected":"normal","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mapping failure\", \"actual\": \"key\", \"expected\": \"key\", \"passed\": true}, {\"check\": \"sequence failure\", \"actual\": \"index\", \"expected\": \"index\", \"passed\": true}, {\"check\": \"generic lookup failure\", \"actual\": \"lookup\", \"expected\": \"lookup\", \"passed\": true}, {\"check\": \"ordinary other error\", \"actual\": \"other\", \"expected\": \"other\", \"passed\": true}, {\"check\": \"termination is not Exception\", \"actual\": \"base\", \"expected\": \"base\", \"passed\": true}, {\"check\": \"normal path\", \"actual\": \"normal\", \"expected\": \"normal\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}