FA-6746 / HTTP caching / Open access
Max stale allows only bounded staleness · case 01
Max stale allows only bounded staleness.
ROOT CAUSE
The faulty implementation uses `age <= allowance` for the max-stale-allows-only-bounded-staleness decision.
VERIFIED REPAIR
Apply the explicit max-stale-allows-only-bounded-staleness contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `age < life+allowance` and still violates a separate fixture.
Case contract
Bounded offline decision model: max stale allows only bounded staleness. 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 max-stale-allows-only-bounded-staleness 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(age, life, allowance):
return age <= allowance
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(15, 10, 5), True)", "check('fixture 2', solve(16, 10, 5), False)", "check('fixture 3', solve(5, 10, 0), True)", "check('fixture 4', solve(10, 10, 0), True)"]
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 | False | False | Passed |
| fixture 3 | False | True | Failed |
| fixture 4 | False | True | Failed |
| fixture 1 | False | True | Failed |
SHA-256 / 324553da81760a2ffe30436f38ecaa43bbe5c939d66c02fa8ca6fb5404c9fb2c
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(age, life, allowance):
return age < life+allowance
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(15, 10, 5), True)", "check('fixture 2', solve(16, 10, 5), False)", "check('fixture 3', solve(5, 10, 0), True)", "check('fixture 4', solve(10, 10, 0), True)"]
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 | False | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | True | Failed |
| fixture 1 | False | True | Failed |
SHA-256 / ad1c3be936bcd84c677e418f303942d7c029306489c358572e6dc92263838fef
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(age, life, allowance):
return age <= life+allowance
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(15, 10, 5), True)", "check('fixture 2', solve(16, 10, 5), False)", "check('fixture 3', solve(5, 10, 0), True)", "check('fixture 4', solve(10, 10, 0), True)"]
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 | False | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | True | True | Passed |
SHA-256 / b78296cc99b250042c4fa4901902e22615e60c226883250bd6ac6a604abf8467
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.887666+00:00.
Case digest / 8f5975f46176de5cc7c2296077bf788556d0e200b750823b086bd5d79681f843