FAILURE MAP
← Case archive

FA-9471 / Dependency resolution / Open access

Peer dependency diagnostics: The excluded upper peer version is accepted · case 01

The excluded upper peer version is accepted.

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

ROOT CAUSE

The implementation substitutes version > high for version >= high, so the excluded upper peer version is accepted.

VERIFIED REPAIR

Reject the upper endpoint and all greater versions.

Unsuccessful approach: The attempted repair substitutes version == high. Fixture 8 still yields [] instead of [('a', 'high')].

Case contract

For each peer in declaration order, ignore missing optional peers, report missing required peers, report too-old installed peers, report too-new peers, and accept inclusive lower/exclusive upper versions.

Why this case matters

An offline model of peer dependency diagnostics, 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(peers, installed):
    result = []
    for name, low, high, optional in peers:
        if name not in installed:
            if not optional: result.append((name, 'missing'))
            continue
        version = installed[name]
        if version < low: result.append((name, 'low'))
        elif version > high: result.append((name, 'high'))
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], {}), [])
check('fixture 2', solve([('a', 1, 3, False)], {}), [('a', 'missing')])
check('fixture 3', solve([('a', 1, 3, True)], {}), [])
check('fixture 4', solve([('a', 1, 3, False)], {'a': 0}), [('a', 'low')])
check('fixture 5', solve([('a', 1, 3, False)], {'a': 1}), [])
check('fixture 6', solve([('a', 1, 3, False)], {'a': 2}), [])
check('fixture 7', solve([('a', 1, 3, False)], {'a': 3}), [('a', 'high')])
check('fixture 8', solve([('a', 1, 3, False)], {'a': 4}), [('a', 'high')])
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 1[][]Passed
fixture 2[['a', 'missing']][['a', 'missing']]Passed
fixture 3[][]Passed
fixture 4[['a', 'low']][['a', 'low']]Passed
fixture 5[][]Passed
fixture 6[][]Passed
fixture 7[][['a', 'high']]Failed
fixture 8[['a', 'high']][['a', 'high']]Passed

SHA-256 / b19f74056403bdc894dfbfa908ecd9257c7874bd4814952d7f49f0d0964e44fe

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(peers, installed):
    result = []
    for name, low, high, optional in peers:
        if name not in installed:
            if not optional: result.append((name, 'missing'))
            continue
        version = installed[name]
        if version < low: result.append((name, 'low'))
        elif version == high: result.append((name, 'high'))
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], {}), [])
check('fixture 2', solve([('a', 1, 3, False)], {}), [('a', 'missing')])
check('fixture 3', solve([('a', 1, 3, True)], {}), [])
check('fixture 4', solve([('a', 1, 3, False)], {'a': 0}), [('a', 'low')])
check('fixture 5', solve([('a', 1, 3, False)], {'a': 1}), [])
check('fixture 6', solve([('a', 1, 3, False)], {'a': 2}), [])
check('fixture 7', solve([('a', 1, 3, False)], {'a': 3}), [('a', 'high')])
check('fixture 8', solve([('a', 1, 3, False)], {'a': 4}), [('a', 'high')])
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 1[][]Passed
fixture 2[['a', 'missing']][['a', 'missing']]Passed
fixture 3[][]Passed
fixture 4[['a', 'low']][['a', 'low']]Passed
fixture 5[][]Passed
fixture 6[][]Passed
fixture 7[['a', 'high']][['a', 'high']]Passed
fixture 8[][['a', 'high']]Failed

SHA-256 / bc90876367932687f7ff4fd28682cd3b85732a4320ad0da3c7c8643bf499b100

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(peers, installed):
    result = []
    for name, low, high, optional in peers:
        if name not in installed:
            if not optional: result.append((name, 'missing'))
            continue
        version = installed[name]
        if version < low: result.append((name, 'low'))
        elif version >= high: result.append((name, 'high'))
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], {}), [])
check('fixture 2', solve([('a', 1, 3, False)], {}), [('a', 'missing')])
check('fixture 3', solve([('a', 1, 3, True)], {}), [])
check('fixture 4', solve([('a', 1, 3, False)], {'a': 0}), [('a', 'low')])
check('fixture 5', solve([('a', 1, 3, False)], {'a': 1}), [])
check('fixture 6', solve([('a', 1, 3, False)], {'a': 2}), [])
check('fixture 7', solve([('a', 1, 3, False)], {'a': 3}), [('a', 'high')])
check('fixture 8', solve([('a', 1, 3, False)], {'a': 4}), [('a', 'high')])
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 1[][]Passed
fixture 2[['a', 'missing']][['a', 'missing']]Passed
fixture 3[][]Passed
fixture 4[['a', 'low']][['a', 'low']]Passed
fixture 5[][]Passed
fixture 6[][]Passed
fixture 7[['a', 'high']][['a', 'high']]Passed
fixture 8[['a', 'high']][['a', 'high']]Passed

SHA-256 / ce7871ca447a0375c01414401f4069f99495a3b156059158d057f3ca3c2d867d

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

Case digest / d2e1387db3cfff096a6d9581bc5d8d2afa126689c76d9c5afc958026e094bc44