FA-9356 / Version constraints / Open access
Closed-open version range intersection: A zero lower bound is treated as absent · case 01
A zero lower bound is treated as absent.
ROOT CAUSE
The implementation substitutes if lo for if lo is not None, so a zero lower bound is treated as absent.
VERIFIED REPAIR
Use explicit None checks for lower bounds.
Unsuccessful approach: The attempted repair substitutes if lo not in (None, 0). Fixture 6 still yields (None, 3) instead of (0, 3).
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]
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 | [None, 3] | [0, 3] | Failed |
| fixture 7 | [None, 3] | [0, 3] | Failed |
| fixture 8 | [None, None] | [0, None] | Failed |
| fixture 9 | [None, 0] | [None, 0] | Passed |
SHA-256 / 80578749df329d4ceabf0c31a6419f9d5a9de8b3ff62cc029069e5dc97b85613
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 not in (None, 0)]
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 | [None, 3] | [0, 3] | Failed |
| fixture 7 | [None, 3] | [0, 3] | Failed |
| fixture 8 | [None, None] | [0, None] | Failed |
| fixture 9 | [None, 0] | [None, 0] | Passed |
SHA-256 / 6e26132fa9ef87bc6bb270620c345ec36eb1e4400f819dc686815323c60fad2b
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.197622+00:00.
Case digest / 9e5154f350d8be55c4fd62ef8e9ab2ea3c834d9adabfd116600c628e02c8240e