FA-9661 / Configuration / Open access
Profile inheritance expansion: Missing parents are treated as empty profiles · case 01
Missing parents are treated as empty profiles.
ROOT CAUSE
The implementation substitutes if name not in profiles: break for if name not in profiles: return 'missing', so missing parents are treated as empty profiles.
VERIFIED REPAIR
Fail profile expansion when a named parent does not exist.
Unsuccessful approach: The attempted repair substitutes if name not in profiles: return {}. Fixture 2 still yields {} instead of 'missing'.
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: break
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {} | {} | Passed |
| fixture 2 | {} | missing | Failed |
| fixture 3 | {'x': 1} | {'x': 1} | Passed |
| fixture 4 | {'x': 2, 'y': 4} | {'x': 2, 'y': 4} | Passed |
| fixture 5 | cycle | cycle | Passed |
| fixture 6 | {'x': False} | {'x': False} | Passed |
| fixture 7 | {} | missing | Failed |
SHA-256 / d4638afb33b8690529b430e7ebf29bd7e98d624015614106243d72bb5cf723e3
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 {}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {} | {} | Passed |
| fixture 2 | {} | missing | Failed |
| fixture 3 | {'x': 1} | {'x': 1} | Passed |
| fixture 4 | {'x': 2, 'y': 4} | {'x': 2, 'y': 4} | Passed |
| fixture 5 | cycle | cycle | Passed |
| fixture 6 | {'x': False} | {'x': False} | Passed |
| fixture 7 | {} | missing | Failed |
SHA-256 / 03e1b174f87b518b9f84983762aac90eb0b827cb36ddbf5739da23622b43da73
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {} | {} | Passed |
| fixture 2 | missing | missing | Passed |
| fixture 3 | {'x': 1} | {'x': 1} | Passed |
| fixture 4 | {'x': 2, 'y': 4} | {'x': 2, 'y': 4} | Passed |
| fixture 5 | cycle | cycle | Passed |
| fixture 6 | {'x': False} | {'x': False} | Passed |
| fixture 7 | missing | missing | Passed |
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:31.945644+00:00.
Case digest / 08328f94d6074765ca196d39a1d587b4cf7f3c9dcd017f377325713bee903f38