FAILURE MAP
← Case archive

FA-9671 / Configuration / Open access

Profile inheritance expansion: The parent directive leaks into application settings · case 01

The parent directive leaks into application settings.

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

ROOT CAUSE

The implementation substitutes if True for if k != 'parent', so the parent directive leaks into application settings.

VERIFIED REPAIR

Remove the inheritance directive from resolved settings.

Unsuccessful approach: The attempted repair substitutes if k == 'parent'. Fixture 3 still yields {} instead of {'x': 1}.

Case contract

Resolve parent chains before child values, reject missing profiles, reject cycles, remove the reserved parent field, and allow explicit false values to override.

Why this case matters

An offline model of profile inheritance expansion, 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(profiles, name):
    chain = []
    seen = set()
    while name is not None:
        if name in seen: return 'cycle'
        if name not in profiles: return 'missing'
        seen.add(name)
        chain.append(profiles[name])
        name = profiles[name].get('parent')
    result = {}
    for profile in reversed(chain):
        result.update({k:v for k,v in profile.items() if True})
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, None), {})
check('fixture 2', solve({}, 'x'), 'missing')
check('fixture 3', solve({'a': {'x': 1}}, 'a'), {'x': 1})
check('fixture 4', solve({'a': {'x': 1, 'y': 4}, 'b': {'parent': 'a', 'x': 2}}, 'b'), {'x': 2, 'y': 4})
check('fixture 5', solve({'a': {'parent': 'b'}, 'b': {'parent': 'a'}}, 'a'), 'cycle')
check('fixture 6', solve({'a': {'x': True}, 'b': {'parent': 'a', 'x': False}}, 'b'), {'x': False})
check('fixture 7', solve({'a': {'parent': 'absent'}}, 'a'), 'missing')
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 2missingmissingPassed
fixture 3{'x': 1}{'x': 1}Passed
fixture 4{'parent': 'a', 'x': 2, 'y': 4}{'x': 2, 'y': 4}Failed
fixture 5cyclecyclePassed
fixture 6{'parent': 'a', 'x': False}{'x': False}Failed
fixture 7missingmissingPassed

SHA-256 / 7e7285fbf597f1c5bec0324d0fd234618abbc13c57a962763ee2080a4d8898c3

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(profiles, name):
    chain = []
    seen = set()
    while name is not None:
        if name in seen: return 'cycle'
        if name not in profiles: return 'missing'
        seen.add(name)
        chain.append(profiles[name])
        name = profiles[name].get('parent')
    result = {}
    for profile in reversed(chain):
        result.update({k:v for k,v in profile.items() if k == 'parent'})
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, None), {})
check('fixture 2', solve({}, 'x'), 'missing')
check('fixture 3', solve({'a': {'x': 1}}, 'a'), {'x': 1})
check('fixture 4', solve({'a': {'x': 1, 'y': 4}, 'b': {'parent': 'a', 'x': 2}}, 'b'), {'x': 2, 'y': 4})
check('fixture 5', solve({'a': {'parent': 'b'}, 'b': {'parent': 'a'}}, 'a'), 'cycle')
check('fixture 6', solve({'a': {'x': True}, 'b': {'parent': 'a', 'x': False}}, 'b'), {'x': False})
check('fixture 7', solve({'a': {'parent': 'absent'}}, 'a'), 'missing')
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 2missingmissingPassed
fixture 3{}{'x': 1}Failed
fixture 4{'parent': 'a'}{'x': 2, 'y': 4}Failed
fixture 5cyclecyclePassed
fixture 6{'parent': 'a'}{'x': False}Failed
fixture 7missingmissingPassed

SHA-256 / 3c38900474b31092abf038f6a028608d968afa9c9ff4275fedd94e8dccb3bd6c

3 / The verified repair

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

N = 1
observations = []
def solve(profiles, name):
    chain = []
    seen = set()
    while name is not None:
        if name in seen: return 'cycle'
        if name not in profiles: return 'missing'
        seen.add(name)
        chain.append(profiles[name])
        name = profiles[name].get('parent')
    result = {}
    for profile in reversed(chain):
        result.update({k:v for k,v in profile.items() if k != 'parent'})
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, None), {})
check('fixture 2', solve({}, 'x'), 'missing')
check('fixture 3', solve({'a': {'x': 1}}, 'a'), {'x': 1})
check('fixture 4', solve({'a': {'x': 1, 'y': 4}, 'b': {'parent': 'a', 'x': 2}}, 'b'), {'x': 2, 'y': 4})
check('fixture 5', solve({'a': {'parent': 'b'}, 'b': {'parent': 'a'}}, 'a'), 'cycle')
check('fixture 6', solve({'a': {'x': True}, 'b': {'parent': 'a', 'x': False}}, 'b'), {'x': False})
check('fixture 7', solve({'a': {'parent': 'absent'}}, 'a'), 'missing')
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 2missingmissingPassed
fixture 3{'x': 1}{'x': 1}Passed
fixture 4{'x': 2, 'y': 4}{'x': 2, 'y': 4}Passed
fixture 5cyclecyclePassed
fixture 6{'x': False}{'x': False}Passed
fixture 7missingmissingPassed

SHA-256 / 6a1cce5e15fa2ca759e9c4e412da8f8392a5a05b28d9bd0b964eab12773d920a

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

Case digest / ecc2147de173ead0efe2bafb1030e07a856a90356c310cab2bdab596d7b82e46