FA-99816 / Tool call schema validation / Open access
One-of union accepts values matching both branches · case 01
One-of union accepts values matching both branches.
ROOT CAUSE
The union uses any-match semantics, which belongs to an any-of rule.
THE FAILURE
The union uses any-match semantics, which belongs to an any-of rule.
Unsuccessful approach: Rejecting all values matching multiple branches but not counting zero matches admits invalid values.
Case contract
One-of is valid when exactly 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 any(p(value) for p in predicates)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('only first',solve(N,[lambda x:type(x)is int,lambda x:x<0]),True)
check('both match',solve(N,[lambda x:type(x)is int,lambda x:x>0]),False)
check('only second',solve(-N,[lambda x:type(x)is str,lambda x:x<0]),True)
check('no branch',solve(None,[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('empty branches',solve(N,[]),False)
check('one predicate',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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| only first | True | True | Passed |
| both match | True | False | Failed |
| only second | True | True | Passed |
| no branch | False | False | Passed |
| empty branches | False | False | Passed |
| one predicate | True | True | Passed |
SHA-256 / 9e4ab63ab51a54efd0958c3c21396c7b1290be83bce282dd18c4a1879fac0c15
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)<=1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('only first',solve(N,[lambda x:type(x)is int,lambda x:x<0]),True)
check('both match',solve(N,[lambda x:type(x)is int,lambda x:x>0]),False)
check('only second',solve(-N,[lambda x:type(x)is str,lambda x:x<0]),True)
check('no branch',solve(None,[lambda x:type(x)is int,lambda x:type(x)is str]),False)
check('empty branches',solve(N,[]),False)
check('one predicate',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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| only first | True | True | Passed |
| both match | False | False | Passed |
| only second | True | True | Passed |
| no branch | True | False | Failed |
| empty branches | True | False | Failed |
| one predicate | True | True | Passed |
SHA-256 / 6682672fa65f15d680d400cae2f1727d95c713fe1229c58efb4ce32f461b7b7c
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.522211+00:00.
Case digest / ec49b33e46c4f988dd4dc750d0ea1c9f466a64ad79eac505b73c5df06c0defb0