FA-9656 / Configuration / Open access
Profile inheritance expansion: Inheritance cycles are classified as successful emptiness · case 01
Inheritance cycles are classified as successful emptiness.
ROOT CAUSE
The implementation substitutes if name in seen: return {} for if name in seen: return 'cycle', so inheritance cycles are classified as successful emptiness.
VERIFIED REPAIR
Report cycles distinctly.
Unsuccessful approach: The attempted repair substitutes if name in seen: return 'missing'. Fixture 5 still yields 'missing' instead of 'cycle'.
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 {}
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 | Failed |
| fixture 6 | {'x': False} | {'x': False} | Passed |
| fixture 7 | missing | missing | Passed |
SHA-256 / 0b2cc1272270c6bd4bca383f7c282e00b6b85c6f04e6fb585660831d3e4ec958
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 'missing'
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 | missing | cycle | Failed |
| fixture 6 | {'x': False} | {'x': False} | Passed |
| fixture 7 | missing | missing | Passed |
SHA-256 / 199bf6d9b0e42a56b13ac18887691a23206bd5faf090f5428988b5dbd71f5360
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.892694+00:00.
Case digest / 5969ea448ce27d0d623e186ece62fcf6c267cbfecc89234b95bb777ef4980194