{"abstract":"Deletes the stored context when only context display should be suppressed 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 reraises the original exception instead of the requested wrapper.","family":"xl-exception-chaining-metadata-suppression-erases-context","id":"FA-5246","implementations":{"attempt":{"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"},"broken":{"sha256":"4c1a8015a097b22a5f860007b35fb625df679c6850518d5b5701c9e363bc9855","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 from original\n            elif mode=='suppressed':\n                raise error from None\n            else:\n                raise error\n    except BaseException as caught:\n        if caught.__suppress_context__: caught.__context__=None\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-suppression-erases-context","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":"Deletes the stored context when only context display should be suppressed. The executable reproducer isolates this operation from the rest of the contract.","sha256":"487cd4db8f60017edf529abaaf3fc843fb496b03f97e7c8757e440362b4e6d2f","title":"Exception chaining metadata: Deletes the stored context when only context display should be suppressed · 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":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"},"broken":{"elapsed_ms":38.888,"exit_code":1,"observations":[{"actual":["RuntimeError","ValueError",null,true],"check":"explicit cause","expected":["RuntimeError","ValueError","ValueError",true],"passed":false},{"actual":["RuntimeError",null,null,true],"check":"suppressed display","expected":["RuntimeError",null,"ValueError",true],"passed":false},{"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\", \"ValueError\", null, true], \"expected\": [\"RuntimeError\", \"ValueError\", \"ValueError\", true], \"passed\": false}, {\"check\": \"suppressed display\", \"actual\": [\"RuntimeError\", null, null, true], \"expected\": [\"RuntimeError\", null, \"ValueError\", true], \"passed\": false}, {\"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"}},"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."}}