FAILURE MAP
← Case archive

FA-45301 / Data systems / Open access

A vector UDF validates against unfiltered input length · case 01

A vector UDF validates against unfiltered input length.

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

ROOT CAUSE

udf-vector-cardinality: A vector UDF validates against unfiltered input length.

THE FAILURE

udf-vector-cardinality: A vector UDF validates against unfiltered input length.

Unsuccessful approach: An upper-bound check admits truncated results.

Case contract

Execute a stipulated vector UDF result contract. For every selected batch, output length must equal selected input length, and output validity must have the same length. A malformed batch emits LENGTH_ERROR and no partial values. Valid output values use their own validity and retain selected input identities.

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:
        out=[]
        for ids,selection,values,valid in d:
            selected=[ids[i] for i in selection]
            if len(values)!=len(ids) or len(valid)!=len(selected):
                out.append('LENGTH_ERROR'); continue
            out.append([[ident,values[i] if valid[i] else None] for i,ident in enumerate(selected)])
        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('selected ids', solve([[[10, 11, 12], [2, 0], [1, 2], [True, True]]]), [[[12, 1], [10, 2]]])
    check('short result', solve([[[10, 11], [0, 1], [1], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [1], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [1, 2], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [1], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 2:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [2, 3], [True, True]]]), [[[12, 2], [10, 3]]])
    check('short result', solve([[[10, 11], [0, 1], [2], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [2], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [2, 3], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [2], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 3:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [3, 4], [True, True]]]), [[[12, 3], [10, 4]]])
    check('short result', solve([[[10, 11], [0, 1], [3], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [3], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [3, 4], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [3], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 4:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [4, 5], [True, True]]]), [[[12, 4], [10, 5]]])
    check('short result', solve([[[10, 11], [0, 1], [4], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [4], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [4, 5], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [4], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 5:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [5, 6], [True, True]]]), [[[12, 5], [10, 6]]])
    check('short result', solve([[[10, 11], [0, 1], [5], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [5], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [5, 6], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [5], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
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
selected ids['LENGTH_ERROR'][[[12, 1], [10, 2]]]Failed
short result['LENGTH_ERROR']['LENGTH_ERROR']Passed
long validity['LENGTH_ERROR']['LENGTH_ERROR']Passed
short validity['LENGTH_ERROR']['LENGTH_ERROR']Passed
null output[[[10, None]]][[[10, None]]]Passed
empty result['LENGTH_ERROR'][[]]Failed
no invocations[][]Passed

SHA-256 / 59a79dad65d55643bd4c3b787f5a58a381291be4f808eaccda134387e687ac6a

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        out=[]
        for ids,selection,values,valid in d:
            selected=[ids[i] for i in selection]
            if len(values)>len(selected) or len(valid)!=len(selected):
                out.append('LENGTH_ERROR'); continue
            out.append([[ident,values[i] if valid[i] else None] for i,ident in enumerate(selected)])
        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('selected ids', solve([[[10, 11, 12], [2, 0], [1, 2], [True, True]]]), [[[12, 1], [10, 2]]])
    check('short result', solve([[[10, 11], [0, 1], [1], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [1], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [1, 2], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [1], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 2:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [2, 3], [True, True]]]), [[[12, 2], [10, 3]]])
    check('short result', solve([[[10, 11], [0, 1], [2], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [2], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [2, 3], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [2], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 3:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [3, 4], [True, True]]]), [[[12, 3], [10, 4]]])
    check('short result', solve([[[10, 11], [0, 1], [3], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [3], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [3, 4], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [3], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 4:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [4, 5], [True, True]]]), [[[12, 4], [10, 5]]])
    check('short result', solve([[[10, 11], [0, 1], [4], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [4], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [4, 5], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [4], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
elif N == 5:
    check('selected ids', solve([[[10, 11, 12], [2, 0], [5, 6], [True, True]]]), [[[12, 5], [10, 6]]])
    check('short result', solve([[[10, 11], [0, 1], [5], [True, True]]]), ['LENGTH_ERROR'])
    check('long validity', solve([[[10], [0], [5], [True, False]]]), ['LENGTH_ERROR'])
    check('short validity', solve([[[10, 11], [0, 1], [5, 6], [True]]]), ['LENGTH_ERROR'])
    check('null output', solve([[[10], [0], [5], [False]]]), [[[10, None]]])
    check('empty result', solve([[[10], [], [], []]]), [[]])
    check('no invocations', solve([]), [])
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
selected ids[[[12, 1], [10, 2]]][[[12, 1], [10, 2]]]Passed
short result{'representation_error': 'IndexError'}['LENGTH_ERROR']Failed
long validity['LENGTH_ERROR']['LENGTH_ERROR']Passed
short validity['LENGTH_ERROR']['LENGTH_ERROR']Passed
null output[[[10, None]]][[[10, None]]]Passed
empty result[[]][[]]Passed
no invocations[][]Passed

SHA-256 / 608cff326a41766a715099be376888d30e5cfcef3098f55a2f93924b67bf457c

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

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

Case digest / 37db627af56954a703ce2dcbe8489361d8acb3d9b75bb896f85012a92f91510a