{"abstract":"Suppresses unrelated exception types whenever suppression is enabled and changes the required Python-language result.","category":"Context managers","checks":5,"contract":"A context manager suppresses only ValueError when enabled. __exit__ observes the actual exception class or None on normal exit; unsuppressed exceptions reach the outer handler and skip after. 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-context-exception-suppression","failed_approach":"The alternative still fails because it discards the truthy __exit__ decision and propagates ValueError.","family":"xl-context-exception-suppression-swallow-all-errors","id":"FA-5131","implementations":{"attempt":{"sha256":"f7b05733326cc9137c0c1d7c65d636e88597f2eec8c19b780597de98a6a5e349","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(error, enabled):\n    log=[]\n    class Manager:\n        def __enter__(self):\n            log.append('enter')\n            return self\n        def __exit__(self, typ, exc, tb):\n            log.append('exit:'+('none' if typ is None else typ.__name__))\n            return False\n    try:\n        with Manager():\n            log.append('body')\n            if error=='value': raise ValueError('value')\n            if error=='key': raise KeyError('key')\n            if error=='type': raise TypeError('type')\n        log.append('after')\n    except Exception as exc:\n        log.append('caught:'+type(exc).__name__)\n    return log\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('normal exit', solve('none', True), ['enter', 'body', 'exit:none', 'after'])\ncheck('selected error suppressed', solve('value', True), ['enter', 'body', 'exit:ValueError', 'after'])\ncheck('disabled propagation', solve('value', False), ['enter', 'body', 'exit:ValueError', 'caught:ValueError'])\ncheck('unrelated error propagates', solve('key', True), ['enter', 'body', 'exit:KeyError', 'caught:KeyError'])\ncheck('other unrelated type', solve('type', True), ['enter', 'body', 'exit:TypeError', 'caught:TypeError'])\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":"ca759d22e014d4b4d746eecc2052b91a018ba56a5218a007e8159978234d24df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(error, enabled):\n    log=[]\n    class Manager:\n        def __enter__(self):\n            log.append('enter')\n            return self\n        def __exit__(self, typ, exc, tb):\n            log.append('exit:'+('none' if typ is None else typ.__name__))\n            return enabled\n    try:\n        with Manager():\n            log.append('body')\n            if error=='value': raise ValueError('value')\n            if error=='key': raise KeyError('key')\n            if error=='type': raise TypeError('type')\n        log.append('after')\n    except Exception as exc:\n        log.append('caught:'+type(exc).__name__)\n    return log\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('normal exit', solve('none', True), ['enter', 'body', 'exit:none', 'after'])\ncheck('selected error suppressed', solve('value', True), ['enter', 'body', 'exit:ValueError', 'after'])\ncheck('disabled propagation', solve('value', False), ['enter', 'body', 'exit:ValueError', 'caught:ValueError'])\ncheck('unrelated error propagates', solve('key', True), ['enter', 'body', 'exit:KeyError', 'caught:KeyError'])\ncheck('other unrelated type', solve('type', True), ['enter', 'body', 'exit:TypeError', 'caught:TypeError'])\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":"28bc3eb1a5f50a36a2e2c15669ed1394b41285c80e1d21dfd5ce2359cd5baecb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(error, enabled):\n    log=[]\n    class Manager:\n        def __enter__(self):\n            log.append('enter')\n            return self\n        def __exit__(self, typ, exc, tb):\n            log.append('exit:'+('none' if typ is None else typ.__name__))\n            return typ is ValueError and enabled\n    try:\n        with Manager():\n            log.append('body')\n            if error=='value': raise ValueError('value')\n            if error=='key': raise KeyError('key')\n            if error=='type': raise TypeError('type')\n        log.append('after')\n    except Exception as exc:\n        log.append('caught:'+type(exc).__name__)\n    return log\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('normal exit', solve('none', True), ['enter', 'body', 'exit:none', 'after'])\ncheck('selected error suppressed', solve('value', True), ['enter', 'body', 'exit:ValueError', 'after'])\ncheck('disabled propagation', solve('value', False), ['enter', 'body', 'exit:ValueError', 'caught:ValueError'])\ncheck('unrelated error propagates', solve('key', True), ['enter', 'body', 'exit:KeyError', 'caught:KeyError'])\ncheck('other unrelated type', solve('type', True), ['enter', 'body', 'exit:TypeError', 'caught:TypeError'])\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-context-exception-suppression-swallow-all-errors","generated_at":"2026-09-29T14:37:46.426418+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":"A context manager suppresses only ValueError when enabled. __exit__ observes the actual exception class or None on normal exit; unsuppressed exceptions reach the outer handler and skip after.","root_cause":"Suppresses unrelated exception types whenever suppression is enabled. The executable reproducer isolates this operation from the rest of the contract.","sha256":"3a87322b69196a0e1674aa424ac60e593de3fbe70668e24ed1dafafb0b5c5677","title":"Context exception suppression: Suppresses unrelated exception types whenever suppression is enabled · 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":37.481,"exit_code":1,"observations":[{"actual":["enter","body","exit:none","after"],"check":"normal exit","expected":["enter","body","exit:none","after"],"passed":true},{"actual":["enter","body","exit:ValueError","caught:ValueError"],"check":"selected error suppressed","expected":["enter","body","exit:ValueError","after"],"passed":false},{"actual":["enter","body","exit:ValueError","caught:ValueError"],"check":"disabled propagation","expected":["enter","body","exit:ValueError","caught:ValueError"],"passed":true},{"actual":["enter","body","exit:KeyError","caught:KeyError"],"check":"unrelated error propagates","expected":["enter","body","exit:KeyError","caught:KeyError"],"passed":true},{"actual":["enter","body","exit:TypeError","caught:TypeError"],"check":"other unrelated type","expected":["enter","body","exit:TypeError","caught:TypeError"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal exit\", \"actual\": [\"enter\", \"body\", \"exit:none\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:none\", \"after\"], \"passed\": true}, {\"check\": \"selected error suppressed\", \"actual\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"expected\": [\"enter\", \"body\", \"exit:ValueError\", \"after\"], \"passed\": false}, {\"check\": \"disabled propagation\", \"actual\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"expected\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"passed\": true}, {\"check\": \"unrelated error propagates\", \"actual\": [\"enter\", \"body\", \"exit:KeyError\", \"caught:KeyError\"], \"expected\": [\"enter\", \"body\", \"exit:KeyError\", \"caught:KeyError\"], \"passed\": true}, {\"check\": \"other unrelated type\", \"actual\": [\"enter\", \"body\", \"exit:TypeError\", \"caught:TypeError\"], \"expected\": [\"enter\", \"body\", \"exit:TypeError\", \"caught:TypeError\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.464,"exit_code":1,"observations":[{"actual":["enter","body","exit:none","after"],"check":"normal exit","expected":["enter","body","exit:none","after"],"passed":true},{"actual":["enter","body","exit:ValueError","after"],"check":"selected error suppressed","expected":["enter","body","exit:ValueError","after"],"passed":true},{"actual":["enter","body","exit:ValueError","caught:ValueError"],"check":"disabled propagation","expected":["enter","body","exit:ValueError","caught:ValueError"],"passed":true},{"actual":["enter","body","exit:KeyError","after"],"check":"unrelated error propagates","expected":["enter","body","exit:KeyError","caught:KeyError"],"passed":false},{"actual":["enter","body","exit:TypeError","after"],"check":"other unrelated type","expected":["enter","body","exit:TypeError","caught:TypeError"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal exit\", \"actual\": [\"enter\", \"body\", \"exit:none\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:none\", \"after\"], \"passed\": true}, {\"check\": \"selected error suppressed\", \"actual\": [\"enter\", \"body\", \"exit:ValueError\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:ValueError\", \"after\"], \"passed\": true}, {\"check\": \"disabled propagation\", \"actual\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"expected\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"passed\": true}, {\"check\": \"unrelated error propagates\", \"actual\": [\"enter\", \"body\", \"exit:KeyError\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:KeyError\", \"caught:KeyError\"], \"passed\": false}, {\"check\": \"other unrelated type\", \"actual\": [\"enter\", \"body\", \"exit:TypeError\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:TypeError\", \"caught:TypeError\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.575,"exit_code":0,"observations":[{"actual":["enter","body","exit:none","after"],"check":"normal exit","expected":["enter","body","exit:none","after"],"passed":true},{"actual":["enter","body","exit:ValueError","after"],"check":"selected error suppressed","expected":["enter","body","exit:ValueError","after"],"passed":true},{"actual":["enter","body","exit:ValueError","caught:ValueError"],"check":"disabled propagation","expected":["enter","body","exit:ValueError","caught:ValueError"],"passed":true},{"actual":["enter","body","exit:KeyError","caught:KeyError"],"check":"unrelated error propagates","expected":["enter","body","exit:KeyError","caught:KeyError"],"passed":true},{"actual":["enter","body","exit:TypeError","caught:TypeError"],"check":"other unrelated type","expected":["enter","body","exit:TypeError","caught:TypeError"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal exit\", \"actual\": [\"enter\", \"body\", \"exit:none\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:none\", \"after\"], \"passed\": true}, {\"check\": \"selected error suppressed\", \"actual\": [\"enter\", \"body\", \"exit:ValueError\", \"after\"], \"expected\": [\"enter\", \"body\", \"exit:ValueError\", \"after\"], \"passed\": true}, {\"check\": \"disabled propagation\", \"actual\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"expected\": [\"enter\", \"body\", \"exit:ValueError\", \"caught:ValueError\"], \"passed\": true}, {\"check\": \"unrelated error propagates\", \"actual\": [\"enter\", \"body\", \"exit:KeyError\", \"caught:KeyError\"], \"expected\": [\"enter\", \"body\", \"exit:KeyError\", \"caught:KeyError\"], \"passed\": true}, {\"check\": \"other unrelated type\", \"actual\": [\"enter\", \"body\", \"exit:TypeError\", \"caught:TypeError\"], \"expected\": [\"enter\", \"body\", \"exit:TypeError\", \"caught:TypeError\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}