FA-4866 / Call argument binding / Open access
Keyword only binding: Makes an optional keyword-only parameter required · case 01
Makes an optional keyword-only parameter required and changes the required Python-language result.
ROOT CAUSE
Makes an optional keyword-only parameter required. The executable reproducer isolates this operation from the rest of the contract.
VERIFIED REPAIR
Call f(a, *, b=10) and return [a,b]. Reject extra positional arguments, unknown keywords and repeated binding of a.
Unsuccessful approach: The alternative still fails because it silently accepts unexpected keywords.
Case contract
Call f(a, *, b=10) and return [a,b]. Reject extra positional arguments, unknown keywords and repeated binding of a. 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(args, kwargs):
def f(a, *, b):
return [a,b]
try:
return f(*args, **kwargs)
except TypeError:
return "TypeError"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('second positional rejected', solve([1, 2], {}), 'TypeError')
check('all named', solve([], {'a': 1, 'b': 2}), [1, 2])
check('optional omitted', solve([1], {}), [1, 10])
check('unknown name', solve([1], {'c': 3}), 'TypeError')
check('a bound twice', solve([1], {'a': 2}), 'TypeError')
check('explicit None', solve([None], {'b': None}), [None, None])
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 |
|---|---|---|---|
| second positional rejected | TypeError | TypeError | Passed |
| all named | [1, 2] | [1, 2] | Passed |
| optional omitted | TypeError | [1, 10] | Failed |
| unknown name | TypeError | TypeError | Passed |
| a bound twice | TypeError | TypeError | Passed |
| explicit None | [None, None] | [None, None] | Passed |
SHA-256 / b787156e5d733c0d0431181c8bdef94a9e2260ad28763a79860f9f6e4ea45ba1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(args, kwargs):
def f(a, *, b=10, **rest):
return [a,b]
try:
return f(*args, **kwargs)
except TypeError:
return "TypeError"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('second positional rejected', solve([1, 2], {}), 'TypeError')
check('all named', solve([], {'a': 1, 'b': 2}), [1, 2])
check('optional omitted', solve([1], {}), [1, 10])
check('unknown name', solve([1], {'c': 3}), 'TypeError')
check('a bound twice', solve([1], {'a': 2}), 'TypeError')
check('explicit None', solve([None], {'b': None}), [None, None])
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 |
|---|---|---|---|
| second positional rejected | TypeError | TypeError | Passed |
| all named | [1, 2] | [1, 2] | Passed |
| optional omitted | [1, 10] | [1, 10] | Passed |
| unknown name | [1, 10] | TypeError | Failed |
| a bound twice | TypeError | TypeError | Passed |
| explicit None | [None, None] | [None, None] | Passed |
SHA-256 / fe8c0c5e0a78b7a91d0d56c6c7d061da37253126f473b7f274a65b2a263e395f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(args, kwargs):
def f(a, *, b=10):
return [a,b]
try:
return f(*args, **kwargs)
except TypeError:
return "TypeError"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('second positional rejected', solve([1, 2], {}), 'TypeError')
check('all named', solve([], {'a': 1, 'b': 2}), [1, 2])
check('optional omitted', solve([1], {}), [1, 10])
check('unknown name', solve([1], {'c': 3}), 'TypeError')
check('a bound twice', solve([1], {'a': 2}), 'TypeError')
check('explicit None', solve([None], {'b': None}), [None, None])
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 |
|---|---|---|---|
| second positional rejected | TypeError | TypeError | Passed |
| all named | [1, 2] | [1, 2] | Passed |
| optional omitted | [1, 10] | [1, 10] | Passed |
| unknown name | TypeError | TypeError | Passed |
| a bound twice | TypeError | TypeError | Passed |
| explicit None | [None, None] | [None, None] | Passed |
SHA-256 / 9c02d25496faa5bb1fd109dd76ed2b2ffc3bdc873b6d14978860386fb86b583c
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:43.629202+00:00.
Case digest / 14a2c4b1d9ddd765b60aac44b6e628671b819c09eaa77481515d269b2f3df384