FA-9366 / Version constraints / Open access
Closed-open version range intersection: Intersection chooses the least restrictive lower bound · case 01
Intersection chooses the least restrictive lower bound.
ROOT CAUSE
The implementation substitutes min(lows) for max(lows), so intersection chooses the least restrictive lower bound.
VERIFIED REPAIR
Take the maximum lower bound.
Unsuccessful approach: The attempted repair substitutes lows[0]. Fixture 3 still yields (1, 6) instead of (3, 6).
Case contract
Intersect all inclusive lower and exclusive upper bounds. None means unbounded. Return empty if lower >= upper, otherwise a bound pair.
Why this case matters
An offline model of closed-open version range intersection, suitable for testing build and release tooling without external services.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ranges):
lows = [lo for lo, hi in ranges if lo is not None]
highs = [hi for lo, hi in ranges if hi is not None]
lo = min(lows) if lows else None
hi = min(highs) if highs else None
if lo is not None and hi is not None and lo >= hi: return 'empty'
return (lo, hi)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), (None, None))
check('fixture 2', solve([(None, None)]), (None, None))
check('fixture 3', solve([(1, 8), (3, 6)]), (3, 6))
check('fixture 4', solve([(2, 2)]), 'empty')
check('fixture 5', solve([(4, 2)]), 'empty')
check('fixture 6', solve([(None, 3), (0, None)]), (0, 3))
check('fixture 7', solve([(0, 3)]), (0, 3))
check('fixture 8', solve([(0, None)]), (0, None))
check('fixture 9', solve([(None, 0)]), (None, 0))
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 1 | [None, None] | [None, None] | Passed |
| fixture 2 | [None, None] | [None, None] | Passed |
| fixture 3 | [1, 6] | [3, 6] | Failed |
| fixture 4 | empty | empty | Passed |
| fixture 5 | empty | empty | Passed |
| fixture 6 | [0, 3] | [0, 3] | Passed |
| fixture 7 | [0, 3] | [0, 3] | Passed |
| fixture 8 | [0, None] | [0, None] | Passed |
| fixture 9 | [None, 0] | [None, 0] | Passed |
SHA-256 / 96cc141940c948c1f583fefb7aa2a9aafd38196488d43d6d49933767fd2d5b99
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ranges):
lows = [lo for lo, hi in ranges if lo is not None]
highs = [hi for lo, hi in ranges if hi is not None]
lo = lows[0] if lows else None
hi = min(highs) if highs else None
if lo is not None and hi is not None and lo >= hi: return 'empty'
return (lo, hi)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), (None, None))
check('fixture 2', solve([(None, None)]), (None, None))
check('fixture 3', solve([(1, 8), (3, 6)]), (3, 6))
check('fixture 4', solve([(2, 2)]), 'empty')
check('fixture 5', solve([(4, 2)]), 'empty')
check('fixture 6', solve([(None, 3), (0, None)]), (0, 3))
check('fixture 7', solve([(0, 3)]), (0, 3))
check('fixture 8', solve([(0, None)]), (0, None))
check('fixture 9', solve([(None, 0)]), (None, 0))
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 1 | [None, None] | [None, None] | Passed |
| fixture 2 | [None, None] | [None, None] | Passed |
| fixture 3 | [1, 6] | [3, 6] | Failed |
| fixture 4 | empty | empty | Passed |
| fixture 5 | empty | empty | Passed |
| fixture 6 | [0, 3] | [0, 3] | Passed |
| fixture 7 | [0, 3] | [0, 3] | Passed |
| fixture 8 | [0, None] | [0, None] | Passed |
| fixture 9 | [None, 0] | [None, 0] | Passed |
SHA-256 / 2607d5c386b65ac8076c9a46d6ec2a12dbf8d6585d673114267c3f0a7aca3ff6
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ranges):
lows = [lo for lo, hi in ranges if lo is not None]
highs = [hi for lo, hi in ranges if hi is not None]
lo = max(lows) if lows else None
hi = min(highs) if highs else None
if lo is not None and hi is not None and lo >= hi: return 'empty'
return (lo, hi)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), (None, None))
check('fixture 2', solve([(None, None)]), (None, None))
check('fixture 3', solve([(1, 8), (3, 6)]), (3, 6))
check('fixture 4', solve([(2, 2)]), 'empty')
check('fixture 5', solve([(4, 2)]), 'empty')
check('fixture 6', solve([(None, 3), (0, None)]), (0, 3))
check('fixture 7', solve([(0, 3)]), (0, 3))
check('fixture 8', solve([(0, None)]), (0, None))
check('fixture 9', solve([(None, 0)]), (None, 0))
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 1 | [None, None] | [None, None] | Passed |
| fixture 2 | [None, None] | [None, None] | Passed |
| fixture 3 | [3, 6] | [3, 6] | Passed |
| fixture 4 | empty | empty | Passed |
| fixture 5 | empty | empty | Passed |
| fixture 6 | [0, 3] | [0, 3] | Passed |
| fixture 7 | [0, 3] | [0, 3] | Passed |
| fixture 8 | [0, None] | [0, None] | Passed |
| fixture 9 | [None, 0] | [None, 0] | Passed |
SHA-256 / de0ccae071432a76da4d8357340efd69052fd91a4601bd470286d6fec79a1b49
Verification & scope
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:29.289080+00:00.
Case digest / a35865a4331e3c123a4f4fe0b11baa6d42cecc7b8a01c3a929d9c5fa8cbfb57f