FA-99756 / Tool call schema validation / Open access
Boolean values pass an integer field · case 01
Boolean values pass an integer field.
ROOT CAUSE
A broad integer instance check includes booleans.
THE FAILURE
A broad integer instance check includes booleans.
Unsuccessful approach: Special-casing True rejects that boolean but continues to accept False as an integer.
Case contract
An integer field accepts exact Python ints and rejects bool despite bool being an int subclass.
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('variant integer',solve(N),True)
check('negative integer',solve(-N),True)
check('true is not integer',solve(True),False)
check('false is not integer',solve(False),False)
check('integral float',solve(2.0),False)
check('string digits',solve('2'),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 |
|---|---|---|---|
| variant integer | True | True | Passed |
| negative integer | True | True | Passed |
| true is not integer | True | False | Failed |
| false is not integer | True | False | Failed |
| integral float | False | False | Passed |
| string digits | False | False | Passed |
SHA-256 / 15d831a5700df7777831da4ff95aed271b04ca3f31ef94eeba8dc66b5124ea1f
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 int or value is True
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variant integer',solve(N),True)
check('negative integer',solve(-N),True)
check('true is not integer',solve(True),False)
check('false is not integer',solve(False),False)
check('integral float',solve(2.0),False)
check('string digits',solve('2'),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 |
|---|---|---|---|
| variant integer | True | True | Passed |
| negative integer | True | True | Passed |
| true is not integer | True | False | Failed |
| false is not integer | False | False | Passed |
| integral float | False | False | Passed |
| string digits | False | False | Passed |
SHA-256 / 2bc51179f6536e947cb150fca301c2f911094e46573c34ac0169d087f9fd9c0e
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.645841+00:00.
Case digest / 8249f7d0c51b5485fc9a727f431003a6601c2cee23d30fc9611c7cf2ce1e63dc