{"abstract":"Reraises the original exception instead of the requested wrapper and changes the required Python-language result.","category":"Exception flow","checks":4,"contract":"Wrap ValueError in RuntimeError with implicit, explicit, or from-None chaining. Return [error type,cause type or None,context type or None,suppress-context flag]. Suppressing displayed context does not erase __context__. Inputs use the finite Python types shown in the fixtures. An error string denotes the specified caught exception, not an unhandled process failure.","contract_signature":"mode","evaluation_group":"xl-exception-chaining-metadata","failed_approach":"The alternative still fails because it raises the wrapper without its requested explicit cause.","family":"xl-exception-chaining-metadata-wrapper-discarded","id":"FA-5251","implementations":{"attempt":{"sha256":"a8b189773a9846614a97a77a4623d5fac339516dde46bb430efc4fdf6f5f14c7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(mode):\n    try:\n        try:\n            raise ValueError('original')\n        except ValueError as original:\n            error=RuntimeError('wrapper')\n            if mode=='explicit':\n                raise error\n            elif mode=='suppressed':\n                raise error from None\n            else:\n                raise error\n    except BaseException as caught:\n        pass\n        return [type(caught).__name__, None if caught.__cause__ is None else type(caught.__cause__).__name__, None if caught.__context__ is None else type(caught.__context__).__name__, caught.__suppress_context__]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('explicit cause', solve('explicit'), ['RuntimeError', 'ValueError', 'ValueError', True])\ncheck('suppressed display', solve('suppressed'), ['RuntimeError', None, 'ValueError', True])\ncheck('implicit context', solve('implicit'), ['RuntimeError', None, 'ValueError', False])\ncheck('default path remains implicit', solve('other'), ['RuntimeError', None, 'ValueError', False])\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":"b62386b5d839b8fd1ef2f6195e26d77d2cb23ebc6b4b89311f39f049e3a920cc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(mode):\n    try:\n        try:\n            raise ValueError('original')\n        except ValueError as original:\n            error=RuntimeError('wrapper')\n            if mode=='explicit':\n                raise\n            elif mode=='suppressed':\n                raise\n            else:\n                raise\n    except BaseException as caught:\n        pass\n        return [type(caught).__name__, None if caught.__cause__ is None else type(caught.__cause__).__name__, None if caught.__context__ is None else type(caught.__context__).__name__, caught.__suppress_context__]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('explicit cause', solve('explicit'), ['RuntimeError', 'ValueError', 'ValueError', True])\ncheck('suppressed display', solve('suppressed'), ['RuntimeError', None, 'ValueError', True])\ncheck('implicit context', solve('implicit'), ['RuntimeError', None, 'ValueError', False])\ncheck('default path remains implicit', solve('other'), ['RuntimeError', None, 'ValueError', False])\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-chaining-metadata-wrapper-discarded","generated_at":"2026-09-29T14:37:47.624319+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.","root_cause":"Reraises the original exception instead of the requested wrapper. The executable reproducer isolates this operation from the rest of the contract.","sha256":"f1d1d4d3ef8246d15ff3ab98e5cd150bec836ae5b0ed1d5851b4cd2730317a93","title":"Exception chaining metadata: Reraises the original exception instead of the requested wrapper · case 01","variant":1,"variant_policy":"The five numbered cases rerun the same authored boundary fixtures; they are reproducibility runs, not independent input variants.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.453,"exit_code":1,"observations":[{"actual":["RuntimeError",null,"ValueError",false],"check":"explicit cause","expected":["RuntimeError","ValueError","ValueError",true],"passed":false},{"actual":["RuntimeError",null,"ValueError",true],"check":"suppressed display","expected":["RuntimeError",null,"ValueError",true],"passed":true},{"actual":["RuntimeError",null,"ValueError",false],"check":"implicit context","expected":["RuntimeError",null,"ValueError",false],"passed":true},{"actual":["RuntimeError",null,"ValueError",false],"check":"default path remains implicit","expected":["RuntimeError",null,"ValueError",false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit cause\", \"actual\": [\"RuntimeError\", null, \"ValueError\", false], \"expected\": [\"RuntimeError\", \"ValueError\", \"ValueError\", true], \"passed\": false}, {\"check\": \"suppressed display\", \"actual\": [\"RuntimeError\", null, \"ValueError\", true], \"expected\": [\"RuntimeError\", null, \"ValueError\", true], \"passed\": true}, {\"check\": \"implicit context\", \"actual\": [\"RuntimeError\", null, \"ValueError\", false], \"expected\": [\"RuntimeError\", null, \"ValueError\", false], \"passed\": true}, {\"check\": \"default path remains implicit\", \"actual\": [\"RuntimeError\", null, \"ValueError\", false], \"expected\": [\"RuntimeError\", null, \"ValueError\", false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.474,"exit_code":1,"observations":[{"actual":["ValueError",null,null,false],"check":"explicit cause","expected":["RuntimeError","ValueError","ValueError",true],"passed":false},{"actual":["ValueError",null,null,false],"check":"suppressed display","expected":["RuntimeError",null,"ValueError",true],"passed":false},{"actual":["ValueError",null,null,false],"check":"implicit context","expected":["RuntimeError",null,"ValueError",false],"passed":false},{"actual":["ValueError",null,null,false],"check":"default path remains implicit","expected":["RuntimeError",null,"ValueError",false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit cause\", \"actual\": [\"ValueError\", null, null, false], \"expected\": [\"RuntimeError\", \"ValueError\", \"ValueError\", true], \"passed\": false}, {\"check\": \"suppressed display\", \"actual\": [\"ValueError\", null, null, false], \"expected\": [\"RuntimeError\", null, \"ValueError\", true], \"passed\": false}, {\"check\": \"implicit context\", \"actual\": [\"ValueError\", null, null, false], \"expected\": [\"RuntimeError\", null, \"ValueError\", false], \"passed\": false}, {\"check\": \"default path remains implicit\", \"actual\": [\"ValueError\", null, null, false], \"expected\": [\"RuntimeError\", null, \"ValueError\", false], \"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."}}