FAILURE MAP
← Case archive

FA-9591 / Configuration / Open access

Explicit configuration overlay: False and zero are confused with deletion · case 01

False and zero are confused with deletion.

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

ROOT CAUSE

The implementation substitutes if not value: for if value is None:, so false and zero are confused with deletion.

VERIFIED REPAIR

Only None denotes deletion.

Unsuccessful approach: The attempted repair substitutes if value in (None, False):. Fixture 4 still yields {} instead of {'a': False}.

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 layers:
        for key, value in layer.items():
            if not value: 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': 2}{'a': 2}Passed
fixture 3{}{}Passed
fixture 4{}{'a': False}Failed
fixture 5{}{'a': 0}Failed
fixture 6{'a': [2]}{'a': [2]}Passed
fixture 7{'a': {'y': 2}}{'a': {'y': 2}}Passed
fixture 8{'a': 1, 'b': 2}{'a': 1, 'b': 2}Passed

SHA-256 / e5536732b36c01d36bdd61247d21541afb508cc293da5c48f2d9b9ae761ecb97

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:
        for key, value in layer.items():
            if value in (None, False): 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': 2}{'a': 2}Passed
fixture 3{}{}Passed
fixture 4{}{'a': False}Failed
fixture 5{}{'a': 0}Failed
fixture 6{'a': [2]}{'a': [2]}Passed
fixture 7{'a': {'y': 2}}{'a': {'y': 2}}Passed
fixture 8{'a': 1, 'b': 2}{'a': 1, 'b': 2}Passed

SHA-256 / 3dbbb2d39f156f7a5debe44863e284ffa6de67e5f95d668295f269e5e781e36f

3 / The verified repair

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

N = 1
observations = []
def solve(layers):
    result = {}
    for layer in 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': 2}{'a': 2}Passed
fixture 3{}{}Passed
fixture 4{'a': False}{'a': False}Passed
fixture 5{'a': 0}{'a': 0}Passed
fixture 6{'a': [2]}{'a': [2]}Passed
fixture 7{'a': {'y': 2}}{'a': {'y': 2}}Passed
fixture 8{'a': 1, 'b': 2}{'a': 1, 'b': 2}Passed

SHA-256 / 8845a91a710aed09a7bf06ad103edfcb31567144e9bbc2f1bf66b53475a06d40

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

Case digest / 4a3450924df373d7dd7c263bf26ace6fa2c7d58685c9955050cfdec44d022b7e