FA-99806 / Tool call schema validation / Open access
Default insertion overwrites explicit null · case 01
Default insertion overwrites explicit null.
ROOT CAUSE
A null value is treated as though the property were omitted.
THE FAILURE
A null value is treated as though the property were omitted.
Unsuccessful approach: Substituting only for None preserves other values but incorrectly replaces an explicit null.
Case contract
Copy an object and insert the default only when the key is absent; explicit null is preserved.
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, key, default):
out=dict(obj); out[key]=obj.get(key) or default; return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing',solve({},'x',N),{'x':N})
check('null retained',solve({'x':None},'x',N),{'x':None})
check('false retained',solve({'x':False},'x',N),{'x':False})
check('zero retained',solve({'x':0},'x',N),{'x':0})
check('existing text',solve({'x':'ok'},'x','d'),{'x':'ok'})
check('other properties',solve({'a':1},'x',N),{'a':1,'x':N})
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 |
|---|---|---|---|
| missing | {'x': 1} | {'x': 1} | Passed |
| null retained | {'x': 1} | {'x': None} | Failed |
| false retained | {'x': 1} | {'x': False} | Failed |
| zero retained | {'x': 1} | {'x': 0} | Failed |
| existing text | {'x': 'ok'} | {'x': 'ok'} | Passed |
| other properties | {'a': 1, 'x': 1} | {'a': 1, 'x': 1} | Passed |
SHA-256 / d8acbd8a7040d239bf086eea21fcccaf8b92190810c642f4aca8a5863c9c6ad8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(obj, key, default):
out=dict(obj); out[key]=obj[key] if key in obj and obj[key] is not None else default; return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing',solve({},'x',N),{'x':N})
check('null retained',solve({'x':None},'x',N),{'x':None})
check('false retained',solve({'x':False},'x',N),{'x':False})
check('zero retained',solve({'x':0},'x',N),{'x':0})
check('existing text',solve({'x':'ok'},'x','d'),{'x':'ok'})
check('other properties',solve({'a':1},'x',N),{'a':1,'x':N})
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 |
|---|---|---|---|
| missing | {'x': 1} | {'x': 1} | Passed |
| null retained | {'x': 1} | {'x': None} | Failed |
| false retained | {'x': False} | {'x': False} | Passed |
| zero retained | {'x': 0} | {'x': 0} | Passed |
| existing text | {'x': 'ok'} | {'x': 'ok'} | Passed |
| other properties | {'a': 1, 'x': 1} | {'a': 1, 'x': 1} | Passed |
SHA-256 / 1a26b1fca5d7d0471aa2575841d76ed96bfdb7ade152e8c1aaa6993d52f4af0e
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.519610+00:00.
Case digest / 187cc80f2a6759f71c6c7c495559fd9de898c5768069bed836cac8e1a03f55c1