FA-7696 / WebSocket and browser transport policies / Open access
Cors preflight max age is capped by browser policy · case 01
Cors preflight max age is capped by browser policy.
ROOT CAUSE
The faulty implementation uses `advertised` for the cors-preflight-max-age-is-capped-by-browser-policy decision.
VERIFIED REPAIR
Apply the explicit cors-preflight-max-age-is-capped-by-browser-policy contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `min(advertised,cap)` and still violates a separate fixture.
Case contract
Bounded offline decision model: cors preflight max age is capped by browser policy. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic websocket and browser transport policies model isolates the cors-preflight-max-age-is-capped-by-browser-policy 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(advertised, cap):
return advertised
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1000, 600), 600)", "check('fixture 2', solve(-1, 600), 0)", "check('fixture 3', solve(10, 600), 10)", "check('fixture 4', solve(0, 600), 0)"]
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 | -1 | 0 | Failed |
| fixture 3 | 10 | 10 | Passed |
| fixture 4 | 0 | 0 | Passed |
| fixture 1 | 1000 | 600 | Failed |
SHA-256 / 470fe19ac6746aa7dd5e6d5bae54a8578a03f4bedc20a04927a9d4279e889971
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(advertised, cap):
return min(advertised,cap)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1000, 600), 600)", "check('fixture 2', solve(-1, 600), 0)", "check('fixture 3', solve(10, 600), 10)", "check('fixture 4', solve(0, 600), 0)"]
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 | -1 | 0 | Failed |
| fixture 3 | 10 | 10 | Passed |
| fixture 4 | 0 | 0 | Passed |
| fixture 1 | 600 | 600 | Passed |
SHA-256 / 3d47ad7879b48ea9d6915266022ea5d7f87776138cf21a0d2d869f4d38b4346b
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(advertised, cap):
return max(0,min(advertised,cap))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1000, 600), 600)", "check('fixture 2', solve(-1, 600), 0)", "check('fixture 3', solve(10, 600), 10)", "check('fixture 4', solve(0, 600), 0)"]
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 | 0 | 0 | Passed |
| fixture 3 | 10 | 10 | Passed |
| fixture 4 | 0 | 0 | Passed |
| fixture 1 | 600 | 600 | Passed |
SHA-256 / d07d5f92248e322a7629795a6fe2b40e5acef8d2b41dcf60dfbefb861b1cfdc0
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:14.422410+00:00.
Case digest / f0daa6734d8724646d948e93a970760d4f00faf869238ffaf6012dd40b014526