FA-99741 / Tool call schema validation / Open access
Required property presence is confused with truthiness · case 01
Required property presence is confused with truthiness.
ROOT CAUSE
The validator treats a present falsey value as absent.
THE FAILURE
The validator treats a present falsey value as absent.
Unsuccessful approach: Rejecting null values still rejects a present property when null is a valid value.
Case contract
A mapping is valid when every required key exists, even if its value is null, false, zero, or empty.
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(obj, required):
return all(obj.get(k) for k in required)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('false value present',solve({'enabled':False},['enabled']),True)
check('zero present',solve({'count':0},['count']),True)
check('null present',solve({'x':None},['x']),True)
check('missing key',solve({'x':1},['y']),False)
check('empty requirements',solve({},[]),True)
check('mixed keys',solve({'a':0,'b':''},['a','b']),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 |
|---|---|---|---|
| false value present | False | True | Failed |
| zero present | False | True | Failed |
| null present | False | True | Failed |
| missing key | False | False | Passed |
| empty requirements | True | True | Passed |
| mixed keys | False | True | Failed |
SHA-256 / 2b7cad37f6abb7505fa839e786c15e0633c5f6f6dccf8ee20b6542a7b3f5ba2b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(obj, required):
return all(k in obj and obj[k] is not None for k in required)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('false value present',solve({'enabled':False},['enabled']),True)
check('zero present',solve({'count':0},['count']),True)
check('null present',solve({'x':None},['x']),True)
check('missing key',solve({'x':1},['y']),False)
check('empty requirements',solve({},[]),True)
check('mixed keys',solve({'a':0,'b':''},['a','b']),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 |
|---|---|---|---|
| false value present | True | True | Passed |
| zero present | True | True | Passed |
| null present | False | True | Failed |
| missing key | False | False | Passed |
| empty requirements | True | True | Passed |
| mixed keys | True | True | Passed |
SHA-256 / a639604ea3df29442f9475f6034404cafb61d84016ede9255b140dcfb4e8871f
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.615698+00:00.
Case digest / 1cf9934f8ad541a4659bb410f7ef06df47412ca2500a839d11f83032ce5396cc