{"abstract":"Charset default is not inferred from an unrelated media type.","category":"Content negotiation","checks":4,"contract":"Bounded offline decision model: charset default is not inferred from an unrelated media type. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","evaluation_group":"xh-charset-default-is-not-inferred-from-an-unrelated-media-type","failed_approach":"The attempted repair uses `'utf-8' if media == 'application/json' else None` and still violates a separate fixture.","family":"xh-charset-default-is-not-inferred-from-an-unrelated-media-type","id":"FA-6906","implementations":{"attempt":{"sha256":"e229f4b1113f66247aa44651d8422f8daa26bee003b81cff81bc52e29434e1b3","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(media, declared):\n    return 'utf-8' if media == 'application/json' else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('text/plain', None), None)\", \"check('fixture 2', solve('application/json', None), 'utf-8')\", \"check('fixture 3', solve('text/plain', 'latin1'), 'latin1')\", \"check('fixture 4', solve('image/png', None), 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":"9595fdafe10bc024c48683a2e086889d790a0cf2c35b253362f6a01141ec9456","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(media, declared):\n    return declared or 'utf-8'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('text/plain', None), None)\", \"check('fixture 2', solve('application/json', None), 'utf-8')\", \"check('fixture 3', solve('text/plain', 'latin1'), 'latin1')\", \"check('fixture 4', solve('image/png', None), 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":"6f9f48e319917e176b7270d0e01aa6d5a451ab7bf8d156f2b61ba301fad546e9","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(media, declared):\n    return declared if declared else ('utf-8' if media == 'application/json' else None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('text/plain', None), None)\", \"check('fixture 2', solve('application/json', None), 'utf-8')\", \"check('fixture 3', solve('text/plain', 'latin1'), 'latin1')\", \"check('fixture 4', solve('image/png', None), 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-charset-default-is-not-inferred-from-an-unrelated-media-type","generated_at":"2026-09-29T14:38:06.440521+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic content negotiation model isolates the charset-default-is-not-inferred-from-an-unrelated-media-type policy at a network component boundary.","repair":"Apply the explicit charset-default-is-not-inferred-from-an-unrelated-media-type contract, including the tested boundary and negative cases.","root_cause":"The faulty implementation uses `declared or 'utf-8'` for the charset-default-is-not-inferred-from-an-unrelated-media-type decision.","sha256":"98f577187bc71e54b59bc0c86bc16184e5614829bb4ca8295f194ed146720843","title":"Charset default is not inferred from an unrelated media type · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.091,"exit_code":1,"observations":[{"actual":"utf-8","check":"fixture 2","expected":"utf-8","passed":true},{"actual":null,"check":"fixture 3","expected":"latin1","passed":false},{"actual":null,"check":"fixture 4","expected":null,"passed":true},{"actual":null,"check":"fixture 1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"utf-8\", \"expected\": \"utf-8\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": \"latin1\", \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.524,"exit_code":1,"observations":[{"actual":"utf-8","check":"fixture 2","expected":"utf-8","passed":true},{"actual":"latin1","check":"fixture 3","expected":"latin1","passed":true},{"actual":"utf-8","check":"fixture 4","expected":null,"passed":false},{"actual":"utf-8","check":"fixture 1","expected":null,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"utf-8\", \"expected\": \"utf-8\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"latin1\", \"expected\": \"latin1\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"utf-8\", \"expected\": null, \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"utf-8\", \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.689,"exit_code":0,"observations":[{"actual":"utf-8","check":"fixture 2","expected":"utf-8","passed":true},{"actual":"latin1","check":"fixture 3","expected":"latin1","passed":true},{"actual":null,"check":"fixture 4","expected":null,"passed":true},{"actual":null,"check":"fixture 1","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"utf-8\", \"expected\": \"utf-8\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"latin1\", \"expected\": \"latin1\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}