{"abstract":"If none match selects 304 only for safe retrieval.","category":"HTTP caching","checks":4,"contract":"Bounded offline decision model: if none match selects 304 only for safe retrieval. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","evaluation_group":"xh-if-none-match-selects-304-only-for-safe-retrieval","failed_approach":"The attempted repair uses `412 if matches else 200` and still violates a separate fixture.","family":"xh-if-none-match-selects-304-only-for-safe-retrieval","id":"FA-6801","implementations":{"attempt":{"sha256":"cf624f344116134cc0b910c2f61c4e7a6849b3b8c41358cc241eb1e2fdf74caf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(method, matches):\n    return 412 if matches else 200\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('GET', True), 304)\", \"check('fixture 2', solve('PUT', True), 412)\", \"check('fixture 3', solve('HEAD', True), 304)\", \"check('fixture 4', solve('POST', False), 200)\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\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":"94c948651b4d658497dd62752cc9a5d405f213556002d96cf1983b1a82861412","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(method, matches):\n    return 304 if matches else 200\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('GET', True), 304)\", \"check('fixture 2', solve('PUT', True), 412)\", \"check('fixture 3', solve('HEAD', True), 304)\", \"check('fixture 4', solve('POST', False), 200)\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\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":"4346baa755d7391e749d1bc0b8cbbdd7fa6680751e784dc6145675c4d53728c7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(method, matches):\n    return (304 if method in ('GET','HEAD') else 412) if matches else 200\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('GET', True), 304)\", \"check('fixture 2', solve('PUT', True), 412)\", \"check('fixture 3', solve('HEAD', True), 304)\", \"check('fixture 4', solve('POST', False), 200)\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\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":"Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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":"xh-if-none-match-selects-304-only-for-safe-retrieval","generated_at":"2026-09-29T14:38:05.300174+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic http caching model isolates the if-none-match-selects-304-only-for-safe-retrieval policy at a network component boundary.","repair":"Apply the explicit if-none-match-selects-304-only-for-safe-retrieval contract, including the tested boundary and negative cases.","root_cause":"The faulty implementation uses `304 if matches else 200` for the if-none-match-selects-304-only-for-safe-retrieval decision.","sha256":"add426fb46b418bf2b9858f5fe79eb6f41f4935e4da5c0bed27738ddabf84f03","title":"If none match selects 304 only for safe retrieval · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.519,"exit_code":1,"observations":[{"actual":412,"check":"fixture 2","expected":412,"passed":true},{"actual":412,"check":"fixture 3","expected":304,"passed":false},{"actual":200,"check":"fixture 4","expected":200,"passed":true},{"actual":412,"check":"fixture 1","expected":304,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": 412, \"expected\": 412, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": 412, \"expected\": 304, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": 200, \"expected\": 200, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": 412, \"expected\": 304, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.285,"exit_code":1,"observations":[{"actual":304,"check":"fixture 2","expected":412,"passed":false},{"actual":304,"check":"fixture 3","expected":304,"passed":true},{"actual":200,"check":"fixture 4","expected":200,"passed":true},{"actual":304,"check":"fixture 1","expected":304,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": 304, \"expected\": 412, \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": 304, \"expected\": 304, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": 200, \"expected\": 200, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": 304, \"expected\": 304, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.706,"exit_code":0,"observations":[{"actual":412,"check":"fixture 2","expected":412,"passed":true},{"actual":304,"check":"fixture 3","expected":304,"passed":true},{"actual":200,"check":"fixture 4","expected":200,"passed":true},{"actual":304,"check":"fixture 1","expected":304,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": 412, \"expected\": 412, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": 304, \"expected\": 304, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": 200, \"expected\": 200, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": 304, \"expected\": 304, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}