FA-9666 / Configuration / Open access
Profile inheritance expansion: Parent values override child configuration · case 01
Parent values override child configuration.
ROOT CAUSE
The implementation substitutes for profile in chain: for for profile in reversed(chain):, so parent values override child configuration.
THE FAILURE
The implementation substitutes for profile in chain: for for profile in reversed(chain):, so parent values override child configuration.
Unsuccessful approach: The attempted repair substitutes for profile in chain[:1]:. Fixture 4 still yields {'x': 2} instead of {'x': 2, 'y': 4}.
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 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': 1, 'y': 4} | {'x': 2, 'y': 4} | Failed |
| fixture 5 | cycle | cycle | Passed |
| fixture 6 | {'x': True} | {'x': False} | Failed |
| fixture 7 | missing | missing | Passed |
SHA-256 / ac64617f5e90cd88f86f8ad85eb8412f370b46eaa051f59b44d979bc63644d72
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 chain[:1]:
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} | {'x': 2, 'y': 4} | Failed |
| fixture 5 | cycle | cycle | Passed |
| fixture 6 | {'x': False} | {'x': False} | Passed |
| fixture 7 | missing | missing | Passed |
SHA-256 / 785c43d83031fbbfe54c6a50cb087de8f577b361707bb4714742871fc7c1f9e1
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.097773+00:00.
Case digest / 465dff1120f569846c7788ec589e9e4e411caed22a61a17e207cb440bdbd447c