FAILURE MAP
← Case archive

FA-99796 / Tool call schema validation / Open access

Tuple schema accepts an extra positional item · case 01

Tuple schema accepts an extra positional item.

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

ROOT CAUSE

The validator checks known positions without enforcing arity.

THE FAILURE

The validator checks known positions without enforcing arity.

Unsuccessful approach: Checking only maximum length still accepts missing required tuple positions.

Case contract

Tuple validation requires array length equal to schema count and validates each aligned item.

Why this case matters

Tool argument validation prevents malformed structured payloads from entering a deterministic downstream operation.

1 / The failure

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

N = 1
observations = []
def solve(values, schemas):
    return all(rule(v) for v,rule in zip(values,schemas))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('matching tuple',solve([N,'x'],[lambda x:type(x)is int,lambda x:type(x)is str]),True)
check('extra item',solve([N,'x',0],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('missing item',solve([N],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('empty tuple schema',solve([],[]),True)
check('bad first type',solve(['x','y'],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('bad second type',solve([N,2],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
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
matching tupleTrueTruePassed
extra itemTrueFalseFailed
missing itemTrueFalseFailed
empty tuple schemaTrueTruePassed
bad first typeFalseFalsePassed
bad second typeFalseFalsePassed

SHA-256 / b008a36b2d920a33f740004f950ec4aaba50e1f344db65aa665d0d30528beec4

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(values, schemas):
    return len(values)<=len(schemas) and all(rule(v) for v,rule in zip(values,schemas))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('matching tuple',solve([N,'x'],[lambda x:type(x)is int,lambda x:type(x)is str]),True)
check('extra item',solve([N,'x',0],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('missing item',solve([N],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('empty tuple schema',solve([],[]),True)
check('bad first type',solve(['x','y'],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('bad second type',solve([N,2],[lambda x:type(x)is int,lambda x:type(x)is str]),False)
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
matching tupleTrueTruePassed
extra itemFalseFalsePassed
missing itemTrueFalseFailed
empty tuple schemaTrueTruePassed
bad first typeFalseFalsePassed
bad second typeFalseFalsePassed

SHA-256 / 71b518914cd381075aad27698243af8f59ec22d99267347faaf7ac33ca28a3af

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 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

Self-contained toy JSON-like schema contract over in-memory Python values; no compatibility with a production schema standard or callable binding is claimed. 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-30T16:48:28.093432+00:00.

Case digest / 72dbc7b12cb7751a91e1203fb50a6603643a413d8c5fa20a25741b88c39b61f5