FA-99786 / Tool call schema validation / Open access
Invalid array elements escape item validation · case 01
Invalid array elements escape item validation.
ROOT CAUSE
Only the first array member is checked.
THE FAILURE
Only the first array member is checked.
Unsuccessful approach: Rejecting arrays longer than one fixes some examples but excludes valid arrays.
Case contract
Every array item must be in the declared allowed set; empty arrays are valid.
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, allowed):
return not values or values[0] in allowed
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('valid singleton',solve([N],[N]),True)
check('invalid first',solve(['x',N],[N]),False)
check('invalid later',solve([N,'x'],[N]),False)
check('empty array',solve([],[]),True)
check('all allowed repeats',solve([N,N],[N]),True)
check('all disallowed',solve(['x','y'],[N]),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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid singleton | True | True | Passed |
| invalid first | False | False | Passed |
| invalid later | True | False | Failed |
| empty array | True | True | Passed |
| all allowed repeats | True | True | Passed |
| all disallowed | False | False | Passed |
SHA-256 / cb6aebafa77f7c5d08603a76141d152e148e0abcc01fb90bdd92a3f7c4e86237
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values, allowed):
return len(values)<=1 and all(v in allowed for v in values)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('valid singleton',solve([N],[N]),True)
check('invalid first',solve(['x',N],[N]),False)
check('invalid later',solve([N,'x'],[N]),False)
check('empty array',solve([],[]),True)
check('all allowed repeats',solve([N,N],[N]),True)
check('all disallowed',solve(['x','y'],[N]),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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid singleton | True | True | Passed |
| invalid first | False | False | Passed |
| invalid later | False | False | Passed |
| empty array | True | True | Passed |
| all allowed repeats | False | True | Failed |
| all disallowed | False | False | Passed |
SHA-256 / 4e3e26fefbf21d4ed3627aad0cb8de78da366159c1935ed325f9092eaacb1ea9
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.064631+00:00.
Case digest / 19865ca34ea48da13b8762236ce959c947f7477d7d29fd061e646cda331e0a83