FAILURE MAP
← Case archive

FA-7476 / Multiplexed protocols / Open access

Http2 data credit is constrained by stream and connection · case 01

Http2 data credit is constrained by stream and connection.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The faulty implementation uses `max(0,min(stream_credit,wanted))` for the http2-data-credit-is-constrained-by-stream-and-connection decision.

VERIFIED REPAIR

Apply the explicit http2-data-credit-is-constrained-by-stream-and-connection contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `max(0,min(connection_credit,wanted))` and still violates a separate fixture.

Case contract

Bounded offline decision model: http2 data credit is constrained by stream and connection. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

Why this case matters

This deterministic multiplexed protocols model isolates the http2-data-credit-is-constrained-by-stream-and-connection 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(stream_credit, connection_credit, wanted):
    return max(0,min(stream_credit,wanted))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 3, 8), 3)", "check('fixture 2', solve(3, 10, 8), 3)", "check('fixture 3', solve(-2, 10, 8), 0)", "check('fixture 4', solve(10, 10, 8), 8)"]
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 fixtureActualExpectedOutcome
fixture 233Passed
fixture 300Passed
fixture 488Passed
fixture 183Failed

SHA-256 / 619f8825ef6d97c63b25727cb134a58ccfa8b355ed7468f53c62092f0e03c1be

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(stream_credit, connection_credit, wanted):
    return max(0,min(connection_credit,wanted))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 3, 8), 3)", "check('fixture 2', solve(3, 10, 8), 3)", "check('fixture 3', solve(-2, 10, 8), 0)", "check('fixture 4', solve(10, 10, 8), 8)"]
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 fixtureActualExpectedOutcome
fixture 283Failed
fixture 380Failed
fixture 488Passed
fixture 133Passed

SHA-256 / 12116e106777820dae3b0e0493c19fac3ab62d193cbef2ca07c5067627312c2b

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(stream_credit, connection_credit, wanted):
    return max(0,min(stream_credit,connection_credit,wanted))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 3, 8), 3)", "check('fixture 2', solve(3, 10, 8), 3)", "check('fixture 3', solve(-2, 10, 8), 0)", "check('fixture 4', solve(10, 10, 8), 8)"]
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 fixtureActualExpectedOutcome
fixture 233Passed
fixture 300Passed
fixture 488Passed
fixture 133Passed

SHA-256 / 484b9bd44bb9862813e623a2267ea87360671288af6dc7e5f5f6b31f3c604717

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:12.408949+00:00.

Case digest / 65eddb31017a783339ba5b812db1c9a677c62a2f3c0ffa57841742b0aefe16e5