FAILURE MAP
← Case archive

FA-99746 / Tool call schema validation / Open access

Pattern-matched properties are rejected as unknown extras · case 01

Pattern-matched properties are rejected as unknown extras.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The closed-object check recognizes explicit names but never consumes fields governed by pattern rules.

THE FAILURE

The closed-object check recognizes explicit names but never consumes fields governed by pattern rules.

Unsuccessful approach: Allowing names that match a pattern but skipping that pattern’s value constraint admits malformed values.

Case contract

An object field is valid if its name is explicitly declared, or if one or more prefix pattern rules match and its value belongs to every matching rule set. Unmatched extras are invalid.

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, explicit, patterns):
    return all(k in explicit for k in obj)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('explicit property',solve({'name':N},{'name'},[]),True)
check('valid patterned property',solve({'x-id':N},set(),[('x-',{N})]),True)
check('pattern value rejected',solve({'x-id':'bad'},set(),[('x-',{N})]),False)
check('unmatched extra rejected',solve({'other':N},set(),[('x-',{N})]),False)
check('overlapping rules both apply',solve({'x-id':N},set(),[('x-',{N,N+1}),('x-id',{N+1})]),False)
check('empty object',solve({},set(),[('x-',{N})]),True)
check('overlap accepted by both',solve({'x-id':N+1},set(),[('x-',{N,N+1}),('x-id',{N+1})]),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 fixtureActualExpectedOutcome
explicit propertyTrueTruePassed
valid patterned propertyFalseTrueFailed
pattern value rejectedFalseFalsePassed
unmatched extra rejectedFalseFalsePassed
overlapping rules both applyFalseFalsePassed
empty objectTrueTruePassed
overlap accepted by bothFalseTrueFailed

SHA-256 / c044ddb5802c98a93782dc6bb41e7fe88dc5969606608cd3187f644dbd6ce58b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(obj, explicit, patterns):
    return all(k in explicit or any(k.startswith(prefix) for prefix,allowed in patterns) for k in obj)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('explicit property',solve({'name':N},{'name'},[]),True)
check('valid patterned property',solve({'x-id':N},set(),[('x-',{N})]),True)
check('pattern value rejected',solve({'x-id':'bad'},set(),[('x-',{N})]),False)
check('unmatched extra rejected',solve({'other':N},set(),[('x-',{N})]),False)
check('overlapping rules both apply',solve({'x-id':N},set(),[('x-',{N,N+1}),('x-id',{N+1})]),False)
check('empty object',solve({},set(),[('x-',{N})]),True)
check('overlap accepted by both',solve({'x-id':N+1},set(),[('x-',{N,N+1}),('x-id',{N+1})]),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 fixtureActualExpectedOutcome
explicit propertyTrueTruePassed
valid patterned propertyTrueTruePassed
pattern value rejectedTrueFalseFailed
unmatched extra rejectedFalseFalsePassed
overlapping rules both applyTrueFalseFailed
empty objectTrueTruePassed
overlap accepted by bothTrueTruePassed

SHA-256 / 39e4d4f02c768ad36c168c71741a4ac5b7b462fa5c4f2941ae380e6912fc53b2

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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.615588+00:00.

Case digest / 47b37378330e3e53ba5a00fa8e3ecbce473c2fb91d28bd5d28796b2e5970e36b