{"abstract":"Content length after coding describes transmitted octets.","category":"Content negotiation","checks":4,"contract":"Given plain, coded, content length after coding describes transmitted octets. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.","evaluation_group":"xh-content-length-after-coding-describes-transmitted-octets","failed_approach":"The attempted repair uses `sum(len(chunk) for chunk in coded) if coded else len(plain.encode(\"utf-8\"))` and still violates a separate fixture.","family":"xh-content-length-after-coding-describes-transmitted-octets","id":"FA-6881","implementations":{"attempt":{"sha256":"0a4fccc41f0a3470788635f1322c5ed553982afe43bca76975646edfe444fc63","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(plain, coded):\n    return sum(len(chunk) for chunk in coded) if coded else len(plain.encode(\"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('é', None), 2)\", \"check('fixture 2', solve('hello', ['a', 'bc']), 3)\", \"check('fixture 3', solve('hello', []), 0)\", \"check('fixture 4', solve('', None), 0)\"]\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":"129f027c670a0bb437cd909e093bd1dc07011b190886033171c6b6533e215cfb","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(plain, coded):\n    return len(plain)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('é', None), 2)\", \"check('fixture 2', solve('hello', ['a', 'bc']), 3)\", \"check('fixture 3', solve('hello', []), 0)\", \"check('fixture 4', solve('', None), 0)\"]\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":"72e57906641b072673221e2b07e0b200a600f51a76c6e7c0470a71ad3e0a999a","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(plain, coded):\n    return sum(len(chunk) for chunk in coded) if coded is not None else len(plain.encode(\"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('é', None), 2)\", \"check('fixture 2', solve('hello', ['a', 'bc']), 3)\", \"check('fixture 3', solve('hello', []), 0)\", \"check('fixture 4', solve('', None), 0)\"]\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-content-length-after-coding-describes-transmitted-octets","generated_at":"2026-09-29T14:38:06.184126+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic content negotiation model isolates the content-length-after-coding-describes-transmitted-octets policy at a network component boundary.","repair":"Apply the explicit content-length-after-coding-describes-transmitted-octets contract, including the tested boundary and negative cases.","root_cause":"The faulty implementation uses `len(plain)` for the content-length-after-coding-describes-transmitted-octets decision.","sha256":"4cc15663b80b50dfa977cff482a890272d0fcdb9fd1c6be7d967cace9465ab1c","title":"Content length after coding describes transmitted octets · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":35.804,"exit_code":1,"observations":[{"actual":3,"check":"fixture 2","expected":3,"passed":true},{"actual":5,"check":"fixture 3","expected":0,"passed":false},{"actual":0,"check":"fixture 4","expected":0,"passed":true},{"actual":2,"check":"fixture 1","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": 5, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.197,"exit_code":1,"observations":[{"actual":5,"check":"fixture 2","expected":3,"passed":false},{"actual":5,"check":"fixture 3","expected":0,"passed":false},{"actual":0,"check":"fixture 4","expected":0,"passed":true},{"actual":1,"check":"fixture 1","expected":2,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": 5, \"expected\": 3, \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": 5, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": 1, \"expected\": 2, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.277,"exit_code":0,"observations":[{"actual":3,"check":"fixture 2","expected":3,"passed":true},{"actual":0,"check":"fixture 3","expected":0,"passed":true},{"actual":0,"check":"fixture 4","expected":0,"passed":true},{"actual":2,"check":"fixture 1","expected":2,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}