FAILURE MAP
← Case archive

FA-99821 / Tool call schema validation / Open access

Any-of union requires every branch to match · case 01

Any-of union requires every branch to match.

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

ROOT CAUSE

The implementation combines branches conjunctively.

THE FAILURE

The implementation combines branches conjunctively.

Unsuccessful approach: A fixed minimum of two matches rejects valid single-branch values.

Case contract

Any-of is valid when at least one predicate matches.

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(value, predicates):
    return all(p(value) for p in predicates)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first branch',solve(N,[lambda x:type(x)is int,lambda x:x<0]),True)
check('second branch',solve(-N,[lambda x:type(x)is str,lambda x:x<0]),True)
check('neither',solve(None,[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('both',solve(N,[lambda x:type(x)is int,lambda x:x>0]),True)
check('empty union',solve(N,[]),False)
check('single branch',solve('x',[lambda x:type(x)is str]),True)
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
first branchFalseTrueFailed
second branchFalseTrueFailed
neitherFalseFalsePassed
bothTrueTruePassed
empty unionTrueFalseFailed
single branchTrueTruePassed

SHA-256 / 36acd22149a20a4bff4b6cbb558871edfde709d954b80a5e7a9ffbb19a05310b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(value, predicates):
    return sum(bool(p(value)) for p in predicates)>=2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first branch',solve(N,[lambda x:type(x)is int,lambda x:x<0]),True)
check('second branch',solve(-N,[lambda x:type(x)is str,lambda x:x<0]),True)
check('neither',solve(None,[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('both',solve(N,[lambda x:type(x)is int,lambda x:x>0]),True)
check('empty union',solve(N,[]),False)
check('single branch',solve('x',[lambda x:type(x)is str]),True)
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
first branchFalseTrueFailed
second branchFalseTrueFailed
neitherFalseFalsePassed
bothTrueTruePassed
empty unionFalseFalsePassed
single branchFalseTrueFailed

SHA-256 / a57014e8338a76da0c59e9d751baa7338ce0c4fa2ca657d5a2b418c1447aa737

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

Case digest / c9d3efb3eec22d60e93beb5ff288ccd27a57f66ef738e2013866d5cbb6fde3c2