FA-99751 / Tool call schema validation / Open access
Integer arguments are accepted as booleans · case 01
Integer arguments are accepted as booleans.
ROOT CAUSE
Python numeric subtype behavior makes integer values pass a bool check.
THE FAILURE
Python numeric subtype behavior makes integer values pass a bool check.
Unsuccessful approach: Rejecting integers but also rejecting False still mishandles a valid boolean.
Case contract
A boolean field accepts only values whose exact type is bool; integer 0 and 1 are not booleans.
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):
return isinstance(value,int)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('true',solve(True),True)
check('false',solve(False),True)
check('integer one',solve(1),False)
check('integer zero',solve(0),False)
check('string',solve('true'),False)
check('null',solve(None),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 |
|---|---|---|---|
| true | True | True | Passed |
| false | True | True | Passed |
| integer one | True | False | Failed |
| integer zero | True | False | Failed |
| string | False | False | Passed |
| null | False | False | Passed |
SHA-256 / 628444622a96b57e3dfe50c4cc92d11dccfeba6fecfa2078f6399d58b9c0ca11
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(value):
return type(value) is bool and value is not False
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('true',solve(True),True)
check('false',solve(False),True)
check('integer one',solve(1),False)
check('integer zero',solve(0),False)
check('string',solve('true'),False)
check('null',solve(None),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 |
|---|---|---|---|
| true | True | True | Passed |
| false | False | True | Failed |
| integer one | False | False | Passed |
| integer zero | False | False | Passed |
| string | False | False | Passed |
| null | False | False | Passed |
SHA-256 / 58f2f7f202327793c3ccb3d38c95623e618bacadff8a83e68f4115564bbd82c6
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:27.615989+00:00.
Case digest / 896b0d81edbab96860762244614cd781a7c0ef1b45a900337a194de89cd652e3