FA-6721 / HTTP caching / Open access
S maxage overrides max age only in shared cache · case 01
S maxage overrides max age only in shared cache.
ROOT CAUSE
The faulty implementation uses `smax if smax is not None else maxage` for the s-maxage-overrides-max-age-only-in-shared-cache decision.
VERIFIED REPAIR
Apply the explicit s-maxage-overrides-max-age-only-in-shared-cache contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `smax if shared and smax else maxage` and still violates a separate fixture.
Case contract
Bounded offline decision model: s maxage overrides max age only in shared cache. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic http caching model isolates the s-maxage-overrides-max-age-only-in-shared-cache 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(shared, smax, maxage):
return smax if smax is not None else maxage
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 0, 30), 0)", "check('fixture 2', solve(False, 10, 30), 30)", "check('fixture 3', solve(True, None, 30), 30)", "check('fixture 4', solve(True, 10, 30), 10)"]
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 | 10 | 30 | Failed |
| fixture 3 | 30 | 30 | Passed |
| fixture 4 | 10 | 10 | Passed |
| fixture 1 | 0 | 0 | Passed |
SHA-256 / 9768e2f7dffbdb263c98ca430110e335e45465165d134d1183a13205e6833743
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(shared, smax, maxage):
return smax if shared and smax else maxage
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 0, 30), 0)", "check('fixture 2', solve(False, 10, 30), 30)", "check('fixture 3', solve(True, None, 30), 30)", "check('fixture 4', solve(True, 10, 30), 10)"]
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 | 30 | 30 | Passed |
| fixture 3 | 30 | 30 | Passed |
| fixture 4 | 10 | 10 | Passed |
| fixture 1 | 30 | 0 | Failed |
SHA-256 / 1ac80cd907bd9d9b7f82cc3eaa9af4f750b8095472b01525093a2f777465c922
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(shared, smax, maxage):
return smax if shared and smax is not None else maxage
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 0, 30), 0)", "check('fixture 2', solve(False, 10, 30), 30)", "check('fixture 3', solve(True, None, 30), 30)", "check('fixture 4', solve(True, 10, 30), 10)"]
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 | 30 | 30 | Passed |
| fixture 3 | 30 | 30 | Passed |
| fixture 4 | 10 | 10 | Passed |
| fixture 1 | 0 | 0 | Passed |
SHA-256 / f2a69c6565631bf6d608ae2d3f9e6b806193f056479230a435fcb72fdc5f5f9b
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:04.609689+00:00.
Case digest / caa0b464368273d3c75cffe95aa1b52b6c2efc4dcd278dc9cf6d2be0c35d5f70