FAILURE MAP
← Case archive

FA-9581 / Configuration / Open access

Explicit configuration overlay: Earlier configuration layers override later ones · case 01

Earlier configuration layers override later ones.

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

ROOT CAUSE

The implementation substitutes for layer in reversed(layers): for for layer in layers:, so earlier configuration layers override later ones.

THE FAILURE

The implementation substitutes for layer in reversed(layers): for for layer in layers:, so earlier configuration layers override later ones.

Unsuccessful approach: The attempted repair substitutes for layer in layers[:1]:. Fixture 2 still yields {'a': 1} instead of {'a': 2}.

Case contract

Merge mappings left to right. None deletes a key, false and zero are retained, lists replace instead of concatenate, and mapping values replace atomically.

Why this case matters

An offline model of explicit configuration overlay, 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(layers):
    result = {}
    for layer in reversed(layers):
        for key, value in layer.items():
            if value is None: result.pop(key, None)
            else: result[key] = value
    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}, {'a': 2}]), {'a': 2})
check('fixture 3', solve([{'a': 1}, {'a': None}]), {})
check('fixture 4', solve([{'a': True}, {'a': False}]), {'a': False})
check('fixture 5', solve([{'a': 2}, {'a': 0}]), {'a': 0})
check('fixture 6', solve([{'a': [1]}, {'a': [2]}]), {'a': [2]})
check('fixture 7', solve([{'a': {'x': 1}}, {'a': {'y': 2}}]), {'a': {'y': 2}})
check('fixture 8', solve([{'a': 1}, {'b': 2}]), {'a': 1, 'b': 2})
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': 1}{'a': 2}Failed
fixture 3{'a': 1}{}Failed
fixture 4{'a': True}{'a': False}Failed
fixture 5{'a': 2}{'a': 0}Failed
fixture 6{'a': [1]}{'a': [2]}Failed
fixture 7{'a': {'x': 1}}{'a': {'y': 2}}Failed
fixture 8{'a': 1, 'b': 2}{'a': 1, 'b': 2}Passed

SHA-256 / c57ee74f1b4013b714498d98e9d7fea13cf7f6c8e23948b7e765234736ffbd15

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(layers):
    result = {}
    for layer in layers[:1]:
        for key, value in layer.items():
            if value is None: result.pop(key, None)
            else: result[key] = value
    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}, {'a': 2}]), {'a': 2})
check('fixture 3', solve([{'a': 1}, {'a': None}]), {})
check('fixture 4', solve([{'a': True}, {'a': False}]), {'a': False})
check('fixture 5', solve([{'a': 2}, {'a': 0}]), {'a': 0})
check('fixture 6', solve([{'a': [1]}, {'a': [2]}]), {'a': [2]})
check('fixture 7', solve([{'a': {'x': 1}}, {'a': {'y': 2}}]), {'a': {'y': 2}})
check('fixture 8', solve([{'a': 1}, {'b': 2}]), {'a': 1, 'b': 2})
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': 1}{'a': 2}Failed
fixture 3{'a': 1}{}Failed
fixture 4{'a': True}{'a': False}Failed
fixture 5{'a': 2}{'a': 0}Failed
fixture 6{'a': [1]}{'a': [2]}Failed
fixture 7{'a': {'x': 1}}{'a': {'y': 2}}Failed
fixture 8{'a': 1}{'a': 1, 'b': 2}Failed

SHA-256 / c6267dd0f9026f63c42abda87ae7f7a9b683744be9736565cc96ed0d680f1844

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / bc06c5cc32408cfaadfc01d18a53e4ac5c71f22b215577d99cad692ea4c8e310