FAILURE MAP
← Case archive

FA-4946 / Call argument binding / Open access

Keyword unpacking collisions: Rejects an empty string although variadic keywords accept it · case 01

Rejects an empty string although variadic keywords accept it and changes the required Python-language result.

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

ROOT CAUSE

Rejects an empty string although variadic keywords accept it. The executable reproducer isolates this operation from the rest of the contract.

THE FAILURE

Rejects an empty string although variadic keywords accept it. The executable reproducer isolates this operation from the rest of the contract.

Unsuccessful approach: The alternative still fails because it requires unpacked keyword names to be lexical identifiers.

Case contract

Invoke f(**left, **right), returning ordered keyword pairs. Reject any duplicate keyword across mappings even when values agree; keys must be strings. Inputs use the finite Python types shown in the fixtures. An error string denotes the specified caught exception, not an unhandled process failure.

Why this case matters

Runs Python standard-library language operations in a deterministic local reproducer. Literal expected answers are authored independently. Related defects share an evaluation group to avoid benchmark split leakage.

1 / The failure

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

N = 1
observations = []
def solve(left, right):
    if "" in left or "" in right: return "TypeError"
    def f(**kw): return [[k,v] for k,v in kw.items()]
    try: return f(**left, **right)
    except TypeError: return "TypeError"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate equal rejected', solve({'a': 1}, {'a': 1}), 'TypeError')
check('duplicate different rejected', solve({'a': 1}, {'a': 2}), 'TypeError')
check('integer key rejected', solve({1: 'v'}, {}), 'TypeError')
check('empty name legal', solve({'': 2}, {}), [['', 2]])
check('hyphenated name legal', solve({'a-b': 3}, {}), [['a-b', 3]])
check('left then right order', solve({'z': 1}, {'a': 2}), [['z', 1], ['a', 2]])
check('empty expansions', solve({}, {}), [])
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
duplicate equal rejectedTypeErrorTypeErrorPassed
duplicate different rejectedTypeErrorTypeErrorPassed
integer key rejectedTypeErrorTypeErrorPassed
empty name legalTypeError[['', 2]]Failed
hyphenated name legal[['a-b', 3]][['a-b', 3]]Passed
left then right order[['z', 1], ['a', 2]][['z', 1], ['a', 2]]Passed
empty expansions[][]Passed

SHA-256 / dc992ef595b60c3352429bc24dd0826127c6cc19567fb1bada5cd71e0a2f154a

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(left, right):
    if any(not isinstance(k,str) or not k.isidentifier() for k in list(left)+list(right)): return "TypeError"
    def f(**kw): return [[k,v] for k,v in kw.items()]
    try: return f(**left, **right)
    except TypeError: return "TypeError"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate equal rejected', solve({'a': 1}, {'a': 1}), 'TypeError')
check('duplicate different rejected', solve({'a': 1}, {'a': 2}), 'TypeError')
check('integer key rejected', solve({1: 'v'}, {}), 'TypeError')
check('empty name legal', solve({'': 2}, {}), [['', 2]])
check('hyphenated name legal', solve({'a-b': 3}, {}), [['a-b', 3]])
check('left then right order', solve({'z': 1}, {'a': 2}), [['z', 1], ['a', 2]])
check('empty expansions', solve({}, {}), [])
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
duplicate equal rejectedTypeErrorTypeErrorPassed
duplicate different rejectedTypeErrorTypeErrorPassed
integer key rejectedTypeErrorTypeErrorPassed
empty name legalTypeError[['', 2]]Failed
hyphenated name legalTypeError[['a-b', 3]]Failed
left then right order[['z', 1], ['a', 2]][['z', 1], ['a', 2]]Passed
empty expansions[][]Passed

SHA-256 / d00eda7241bd760beded30ad7990810db02e0eecd0ebc2fe6237a14730c0896a

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

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-29T14:37:44.451484+00:00.

Case digest / f63e6a8392ba98330f7cba55fcb276eec2a690be3bca05929b368b498906c2af