FAILURE MAP
← Case archive

FA-45216 / Data systems / Open access

Nested path resolution restarts from the root for each segment · case 01

Nested path resolution restarts from the root for each segment.

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

ROOT CAUSE

nested-field-path: Nested path resolution restarts from the root for each segment.

VERIFIED REPAIR

Preserve the stated physical representation and operation order: Resolve an explicit sequence of field path segments against each row dictionary. Dots inside a segment are literal characters; empty path returns the whole row. A missing segment, non-dictionary intermediate, or null intermediate yields None; falsy leaf values remain present.

Unsuccessful approach: Preferring a root homonym still shadows the nested child.

Case contract

Resolve an explicit sequence of field path segments against each row dictionary. Dots inside a segment are literal characters; empty path returns the whole row. A missing segment, non-dictionary intermediate, or null intermediate yields None; falsy leaf values remain present.

Why this case matters

A bounded deterministic data engine model makes representation and changelog faults reproducible.

1 / The failure

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

N = 1
observations = []
def solve(d):
    try:
        rows,path=d
        out=[]
        for row in rows:
            value=row
            for segment in path:
                if not isinstance(value,dict): value=None; break
                if segment not in value: value=None; break
                value=row.get(segment)
            out.append(value)
        return out
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('literal dotted field', solve([[{'a.b': 1, 'a': {'b': 2}}], ['a.b']]), [1])
    check('nested homonym', solve([[{'a': {'b': 1}, 'b': 2}], ['a', 'b']]), [1])
    check('missing segment', solve([[{'a': {'b': 1}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 1}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 1}], []]), [{'a': 1}])
    check('multiple rows', solve([[{'a': 1}, {'a': 2}], ['a']]), [1, 2])
elif N == 2:
    check('literal dotted field', solve([[{'a.b': 2, 'a': {'b': 3}}], ['a.b']]), [2])
    check('nested homonym', solve([[{'a': {'b': 2}, 'b': 3}], ['a', 'b']]), [2])
    check('missing segment', solve([[{'a': {'b': 2}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 2}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 2}], []]), [{'a': 2}])
    check('multiple rows', solve([[{'a': 2}, {'a': 3}], ['a']]), [2, 3])
elif N == 3:
    check('literal dotted field', solve([[{'a.b': 3, 'a': {'b': 4}}], ['a.b']]), [3])
    check('nested homonym', solve([[{'a': {'b': 3}, 'b': 4}], ['a', 'b']]), [3])
    check('missing segment', solve([[{'a': {'b': 3}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 3}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 3}], []]), [{'a': 3}])
    check('multiple rows', solve([[{'a': 3}, {'a': 4}], ['a']]), [3, 4])
elif N == 4:
    check('literal dotted field', solve([[{'a.b': 4, 'a': {'b': 5}}], ['a.b']]), [4])
    check('nested homonym', solve([[{'a': {'b': 4}, 'b': 5}], ['a', 'b']]), [4])
    check('missing segment', solve([[{'a': {'b': 4}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 4}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 4}], []]), [{'a': 4}])
    check('multiple rows', solve([[{'a': 4}, {'a': 5}], ['a']]), [4, 5])
elif N == 5:
    check('literal dotted field', solve([[{'a.b': 5, 'a': {'b': 6}}], ['a.b']]), [5])
    check('nested homonym', solve([[{'a': {'b': 5}, 'b': 6}], ['a', 'b']]), [5])
    check('missing segment', solve([[{'a': {'b': 5}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 5}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 5}], []]), [{'a': 5}])
    check('multiple rows', solve([[{'a': 5}, {'a': 6}], ['a']]), [5, 6])
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
literal dotted field[1][1]Passed
nested homonym[2][1]Failed
missing segment[None][None]Passed
scalar intermediate[None][None]Passed
zero leaf[0][0]Passed
empty path[{'a': 1}][{'a': 1}]Passed
multiple rows[1, 2][1, 2]Passed

SHA-256 / 35c640313dc628b58c84f3833955fe1f065ef6d519c8adb05672917406d4cc0a

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        rows,path=d
        out=[]
        for row in rows:
            value=row
            for segment in path:
                if not isinstance(value,dict): value=None; break
                if segment not in value: value=None; break
                value=row.get(segment,value[segment])
            out.append(value)
        return out
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('literal dotted field', solve([[{'a.b': 1, 'a': {'b': 2}}], ['a.b']]), [1])
    check('nested homonym', solve([[{'a': {'b': 1}, 'b': 2}], ['a', 'b']]), [1])
    check('missing segment', solve([[{'a': {'b': 1}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 1}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 1}], []]), [{'a': 1}])
    check('multiple rows', solve([[{'a': 1}, {'a': 2}], ['a']]), [1, 2])
elif N == 2:
    check('literal dotted field', solve([[{'a.b': 2, 'a': {'b': 3}}], ['a.b']]), [2])
    check('nested homonym', solve([[{'a': {'b': 2}, 'b': 3}], ['a', 'b']]), [2])
    check('missing segment', solve([[{'a': {'b': 2}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 2}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 2}], []]), [{'a': 2}])
    check('multiple rows', solve([[{'a': 2}, {'a': 3}], ['a']]), [2, 3])
elif N == 3:
    check('literal dotted field', solve([[{'a.b': 3, 'a': {'b': 4}}], ['a.b']]), [3])
    check('nested homonym', solve([[{'a': {'b': 3}, 'b': 4}], ['a', 'b']]), [3])
    check('missing segment', solve([[{'a': {'b': 3}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 3}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 3}], []]), [{'a': 3}])
    check('multiple rows', solve([[{'a': 3}, {'a': 4}], ['a']]), [3, 4])
elif N == 4:
    check('literal dotted field', solve([[{'a.b': 4, 'a': {'b': 5}}], ['a.b']]), [4])
    check('nested homonym', solve([[{'a': {'b': 4}, 'b': 5}], ['a', 'b']]), [4])
    check('missing segment', solve([[{'a': {'b': 4}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 4}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 4}], []]), [{'a': 4}])
    check('multiple rows', solve([[{'a': 4}, {'a': 5}], ['a']]), [4, 5])
elif N == 5:
    check('literal dotted field', solve([[{'a.b': 5, 'a': {'b': 6}}], ['a.b']]), [5])
    check('nested homonym', solve([[{'a': {'b': 5}, 'b': 6}], ['a', 'b']]), [5])
    check('missing segment', solve([[{'a': {'b': 5}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 5}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 5}], []]), [{'a': 5}])
    check('multiple rows', solve([[{'a': 5}, {'a': 6}], ['a']]), [5, 6])
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
literal dotted field[1][1]Passed
nested homonym[2][1]Failed
missing segment[None][None]Passed
scalar intermediate[None][None]Passed
zero leaf[0][0]Passed
empty path[{'a': 1}][{'a': 1}]Passed
multiple rows[1, 2][1, 2]Passed

SHA-256 / dada5321d84aaa6bb57de1f8d7fd375cb662b695243f5a8b4f86907d51b83e4f

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    try:
        rows,path=d
        out=[]
        for row in rows:
            value=row
            for segment in path:
                if not isinstance(value,dict): value=None; break
                if segment not in value: value=None; break
                value=value[segment]
            out.append(value)
        return out
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('literal dotted field', solve([[{'a.b': 1, 'a': {'b': 2}}], ['a.b']]), [1])
    check('nested homonym', solve([[{'a': {'b': 1}, 'b': 2}], ['a', 'b']]), [1])
    check('missing segment', solve([[{'a': {'b': 1}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 1}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 1}], []]), [{'a': 1}])
    check('multiple rows', solve([[{'a': 1}, {'a': 2}], ['a']]), [1, 2])
elif N == 2:
    check('literal dotted field', solve([[{'a.b': 2, 'a': {'b': 3}}], ['a.b']]), [2])
    check('nested homonym', solve([[{'a': {'b': 2}, 'b': 3}], ['a', 'b']]), [2])
    check('missing segment', solve([[{'a': {'b': 2}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 2}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 2}], []]), [{'a': 2}])
    check('multiple rows', solve([[{'a': 2}, {'a': 3}], ['a']]), [2, 3])
elif N == 3:
    check('literal dotted field', solve([[{'a.b': 3, 'a': {'b': 4}}], ['a.b']]), [3])
    check('nested homonym', solve([[{'a': {'b': 3}, 'b': 4}], ['a', 'b']]), [3])
    check('missing segment', solve([[{'a': {'b': 3}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 3}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 3}], []]), [{'a': 3}])
    check('multiple rows', solve([[{'a': 3}, {'a': 4}], ['a']]), [3, 4])
elif N == 4:
    check('literal dotted field', solve([[{'a.b': 4, 'a': {'b': 5}}], ['a.b']]), [4])
    check('nested homonym', solve([[{'a': {'b': 4}, 'b': 5}], ['a', 'b']]), [4])
    check('missing segment', solve([[{'a': {'b': 4}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 4}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 4}], []]), [{'a': 4}])
    check('multiple rows', solve([[{'a': 4}, {'a': 5}], ['a']]), [4, 5])
elif N == 5:
    check('literal dotted field', solve([[{'a.b': 5, 'a': {'b': 6}}], ['a.b']]), [5])
    check('nested homonym', solve([[{'a': {'b': 5}, 'b': 6}], ['a', 'b']]), [5])
    check('missing segment', solve([[{'a': {'b': 5}}], ['a', 'z']]), [None])
    check('scalar intermediate', solve([[{'a': 5}], ['a', 'b']]), [None])
    check('zero leaf', solve([[{'a': 0}], ['a']]), [0])
    check('empty path', solve([[{'a': 5}], []]), [{'a': 5}])
    check('multiple rows', solve([[{'a': 5}, {'a': 6}], ['a']]), [5, 6])
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
literal dotted field[1][1]Passed
nested homonym[1][1]Passed
missing segment[None][None]Passed
scalar intermediate[None][None]Passed
zero leaf[0][0]Passed
empty path[{'a': 1}][{'a': 1}]Passed
multiple rows[1, 2][1, 2]Passed

SHA-256 / 93f4416078dd2398fc2349473a16b48a5e0137916852d1ca2931260d0a31e0c6

Verification & scope

Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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:44:20.017556+00:00.

Case digest / 2584e67964738466ef2dcf4ca65d59854d954a552e08d01985c7c83cb8a7ae39