FAILURE MAP
← Case archive

FA-9411 / Configuration / Open access

Layered dependency override resolution: An unrelated override changes the selected package · case 01

An unrelated override changes the selected package.

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

ROOT CAUSE

The implementation substitutes if not layer: continue layer = {name: next(iter(layer.values()))} for if name not in layer: continue, so an unrelated override changes the selected package.

VERIFIED REPAIR

Ignore layers without the exact package key.

Unsuccessful approach: The attempted repair substitutes if name not in layer: return None. Fixture 5 still yields None instead of 'base'.

Case contract

Apply global then workspace then package overrides. Only exact package keys participate; None deletes an override and empty string is a preserved explicit value. Return base if deleted or absent.

Why this case matters

An offline model of layered dependency override resolution, 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(name, base, layers):
    result = base
    for layer in layers:
        if not layer: continue
        layer = {name: next(iter(layer.values()))}
        value = layer[name]
        if value is None: result = base
        else: result = value
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('a', 'base', []), 'base')
check('fixture 2', solve('a', 'base', [{'a': 'one'}, {'a': 'two'}]), 'two')
check('fixture 3', solve('a', 'base', [{'a': 'one'}, {'a': None}]), 'base')
check('fixture 4', solve('a', 'base', [{'a': ''}]), '')
check('fixture 5', solve('a', 'base', [{'b': 'other'}]), 'base')
check('fixture 6', solve('a', 'base', [{'a': None}, {'a': 'three'}]), 'three')
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 1basebasePassed
fixture 2twotwoPassed
fixture 3basebasePassed
fixture 4Passed
fixture 5otherbaseFailed
fixture 6threethreePassed

SHA-256 / c88ecf1d530b54ef64d91d789f8e51cdc5b1710622eab4197faf51bed2a77d4f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(name, base, layers):
    result = base
    for layer in layers:
        if name not in layer: return None
        value = layer[name]
        if value is None: result = base
        else: result = value
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('a', 'base', []), 'base')
check('fixture 2', solve('a', 'base', [{'a': 'one'}, {'a': 'two'}]), 'two')
check('fixture 3', solve('a', 'base', [{'a': 'one'}, {'a': None}]), 'base')
check('fixture 4', solve('a', 'base', [{'a': ''}]), '')
check('fixture 5', solve('a', 'base', [{'b': 'other'}]), 'base')
check('fixture 6', solve('a', 'base', [{'a': None}, {'a': 'three'}]), 'three')
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 1basebasePassed
fixture 2twotwoPassed
fixture 3basebasePassed
fixture 4Passed
fixture 5NonebaseFailed
fixture 6threethreePassed

SHA-256 / 4580c809f5fff17239a56787c764fc64d3dc4f0cda4b0c477cf05a60bf9067c3

3 / The verified repair

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

N = 1
observations = []
def solve(name, base, layers):
    result = base
    for layer in layers:
        if name not in layer: continue
        value = layer[name]
        if value is None: result = base
        else: result = value
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('a', 'base', []), 'base')
check('fixture 2', solve('a', 'base', [{'a': 'one'}, {'a': 'two'}]), 'two')
check('fixture 3', solve('a', 'base', [{'a': 'one'}, {'a': None}]), 'base')
check('fixture 4', solve('a', 'base', [{'a': ''}]), '')
check('fixture 5', solve('a', 'base', [{'b': 'other'}]), 'base')
check('fixture 6', solve('a', 'base', [{'a': None}, {'a': 'three'}]), 'three')
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 1basebasePassed
fixture 2twotwoPassed
fixture 3basebasePassed
fixture 4Passed
fixture 5basebasePassed
fixture 6threethreePassed

SHA-256 / 36ce0fe2809da06d5d3a70aa9a0815abf59954b0bb9d2efafe03fab413103961

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

Case digest / baa008edd21b96fd34629ed3958bc124e01819256d86a825c7f3e4c2f4671260