FAILURE MAP
← Case archive

FA-9461 / Dependency resolution / Open access

Peer dependency diagnostics: Missing peers are classified as version failures · case 01

Missing peers are classified as version failures.

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

ROOT CAUSE

The implementation substitutes (name, 'low') for (name, 'missing'), so missing peers are classified as version failures.

VERIFIED REPAIR

Distinguish absent installations from incompatible installed versions.

Unsuccessful approach: The attempted repair substitutes (name, 'high'). Fixture 2 still yields [('a', 'high')] instead of [('a', 'missing')].

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, 'low'))
            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', 'low']][['a', 'missing']]Failed
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 / 8f2418054e8ed6552a241ba596eecab5525224e4fa021cb80be038311a8eb474

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, 'high'))
            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', 'high']][['a', 'missing']]Failed
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 / 53dbe0541df1fe84a4fe99a751ea52983cd232cca6687b61bf93baba02c1dfa1

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

Case digest / 443dad90fe7e280e3e535f59459d1569d2421b9c442cb69b91d6bb8a077d67c7