FA-6581 / HTTP semantics / Open access
HEAD suppresses a representation body while retaining its length · case 01
HEAD suppresses a representation body while retaining its length.
ROOT CAUSE
The faulty implementation uses `body` for the head-body decision.
VERIFIED REPAIR
Apply the explicit head-body contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `'' if method in ('HEAD', 'GET') else body` and still violates a separate fixture.
Case contract
HEAD suppresses a representation body while retaining its length: return the result specified by the explicit input/output boundary fixtures.
Why this case matters
This deterministic http semantics model isolates the head-body policy at a network component boundary.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(method, body):
return body
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('HEAD', 'abc'), '')", "check('fixture 2', solve('GET', 'abc'), 'abc')", "check('fixture 3', solve('POST', ''), '')", "check('fixture 4', solve('POST', 'a'), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | abc | abc | Passed |
| fixture 3 | | | Passed |
| fixture 4 | a | a | Passed |
| fixture 1 | abc | | Failed |
SHA-256 / 12039fd9518f89179e18cd2c98e0127499d214eee74ae0c85a26a472cc1d31f7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(method, body):
return '' if method in ('HEAD', 'GET') else body
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('HEAD', 'abc'), '')", "check('fixture 2', solve('GET', 'abc'), 'abc')", "check('fixture 3', solve('POST', ''), '')", "check('fixture 4', solve('POST', 'a'), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | | abc | Failed |
| fixture 3 | | | Passed |
| fixture 4 | a | a | Passed |
| fixture 1 | | | Passed |
SHA-256 / 2a733fc804068363f79661c26ff89e50f419ed4bd1044f351b80284675b7d601
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(method, body):
return '' if method == 'HEAD' else body
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('HEAD', 'abc'), '')", "check('fixture 2', solve('GET', 'abc'), 'abc')", "check('fixture 3', solve('POST', ''), '')", "check('fixture 4', solve('POST', 'a'), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | abc | abc | Passed |
| fixture 3 | | | Passed |
| fixture 4 | a | a | Passed |
| fixture 1 | | | Passed |
SHA-256 / 2bad5f6385d9c1d9a8f844e32f15970ddc1f7dd63095c80bdeadaeacfff91c94
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:03.384969+00:00.
Case digest / 0fce7294322cb8433b479ddec0b46f4475f7d05d4ccac312f23f437bea4248c7