FA-9596 / Configuration / Open access
Explicit configuration overlay: List overlays accumulate obsolete values · case 01
List overlays accumulate obsolete values.
ROOT CAUSE
The implementation substitutes else: result[key] = result.get(key, []) + value if isinstance(value, list) else value for else: result[key] = value, so list overlays accumulate obsolete values.
VERIFIED REPAIR
Replace lists atomically.
Unsuccessful approach: The attempted repair substitutes else: result[key] = list(dict.fromkeys(result.get(key, []) + value)) if isinstance(value, list) else value. Fixture 6 still yields {'a': [1, 2]} 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 layers:
for key, value in layer.items():
if value is None: result.pop(key, None)
else: result[key] = result.get(key, []) + value if isinstance(value, list) else 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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': [1, 2]} | {'a': [2]} | Failed |
| fixture 7 | {'a': {'y': 2}} | {'a': {'y': 2}} | Passed |
| fixture 8 | {'a': 1, 'b': 2} | {'a': 1, 'b': 2} | Passed |
SHA-256 / d8ac9112690fe34f99b790e8dd0bb0b91beb66d1394277963aecc2dc93864cd6
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 is None: result.pop(key, None)
else: result[key] = list(dict.fromkeys(result.get(key, []) + value)) if isinstance(value, list) else 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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': [1, 2]} | {'a': [2]} | Failed |
| fixture 7 | {'a': {'y': 2}} | {'a': {'y': 2}} | Passed |
| fixture 8 | {'a': 1, 'b': 2} | {'a': 1, 'b': 2} | Passed |
SHA-256 / 6278858febf6389bd5a9cacbf572c757d9079d691bd2c3f79f0ad7dc7fa23cf8
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.410972+00:00.
Case digest / afed320b814612beff0ebbb4c93f2a3cc527f3a2c9071a6399296aaa704cb7a7