{"abstract":"Cache variants distinguish missing header from empty header.","category":"HTTP caching","checks":4,"contract":"Bounded offline decision model: cache variants distinguish missing header from empty header. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","evaluation_group":"xh-cache-variants-distinguish-missing-header-from-empty-header","failed_approach":"The attempted repair uses `bool(headers.get(name))` and still violates a separate fixture.","family":"xh-cache-variants-distinguish-missing-header-from-empty-header","id":"FA-6821","implementations":{"attempt":{"sha256":"3c5be4930b90711a02fbc6d1fbd4d8938019def10d48b5a3f001fbe7b0ba4d8f","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(headers, name):\n    return bool(headers.get(name))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve({}, 'accept'), (False, None))\", \"check('fixture 2', solve({'accept': ''}, 'accept'), (True, ''))\", \"check('fixture 3', solve({'accept': 'x'}, 'accept'), (True, 'x'))\", \"check('fixture 4', solve({'other': 'x'}, 'accept'), (False, None))\"]\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":"967a6e8250c26154da29e77388bd18d8578919a62e7ed90655091dc4a285b74b","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(headers, name):\n    return headers.get(name, \"\")\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve({}, 'accept'), (False, None))\", \"check('fixture 2', solve({'accept': ''}, 'accept'), (True, ''))\", \"check('fixture 3', solve({'accept': 'x'}, 'accept'), (True, 'x'))\", \"check('fixture 4', solve({'other': 'x'}, 'accept'), (False, None))\"]\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":"4100ef6cc5bea00d2a01de9556a94ce5a42ff816202683f495edc3ea8f941f8d","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(headers, name):\n    return (name in headers, headers.get(name))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve({}, 'accept'), (False, None))\", \"check('fixture 2', solve({'accept': ''}, 'accept'), (True, ''))\", \"check('fixture 3', solve({'accept': 'x'}, 'accept'), (True, 'x'))\", \"check('fixture 4', solve({'other': 'x'}, 'accept'), (False, None))\"]\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-cache-variants-distinguish-missing-header-from-empty-header","generated_at":"2026-09-29T14:38:05.565723+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic http caching model isolates the cache-variants-distinguish-missing-header-from-empty-header policy at a network component boundary.","repair":"Apply the explicit cache-variants-distinguish-missing-header-from-empty-header contract, including the tested boundary and negative cases.","root_cause":"The faulty implementation uses `headers.get(name, \"\")` for the cache-variants-distinguish-missing-header-from-empty-header decision.","sha256":"bb0edd37fc3b94379e9003437a6864650df52f0ff555953ded8f38b1a430468e","title":"Cache variants distinguish missing header from empty header · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.266,"exit_code":1,"observations":[{"actual":false,"check":"fixture 2","expected":[true,""],"passed":false},{"actual":true,"check":"fixture 3","expected":[true,"x"],"passed":false},{"actual":false,"check":"fixture 4","expected":[false,null],"passed":false},{"actual":false,"check":"fixture 1","expected":[false,null],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": false, \"expected\": [true, \"\"], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": true, \"expected\": [true, \"x\"], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": false, \"expected\": [false, null], \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": false, \"expected\": [false, null], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":70.957,"exit_code":1,"observations":[{"actual":"","check":"fixture 2","expected":[true,""],"passed":false},{"actual":"x","check":"fixture 3","expected":[true,"x"],"passed":false},{"actual":"","check":"fixture 4","expected":[false,null],"passed":false},{"actual":"","check":"fixture 1","expected":[false,null],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"\", \"expected\": [true, \"\"], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"x\", \"expected\": [true, \"x\"], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": \"\", \"expected\": [false, null], \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"\", \"expected\": [false, null], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.728,"exit_code":0,"observations":[{"actual":[true,""],"check":"fixture 2","expected":[true,""],"passed":true},{"actual":[true,"x"],"check":"fixture 3","expected":[true,"x"],"passed":true},{"actual":[false,null],"check":"fixture 4","expected":[false,null],"passed":true},{"actual":[false,null],"check":"fixture 1","expected":[false,null],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": [true, \"\"], \"expected\": [true, \"\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [true, \"x\"], \"expected\": [true, \"x\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [false, null], \"expected\": [false, null], \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": [false, null], \"expected\": [false, null], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}