FA-4891 / Call argument binding / Open access
Variadic positional binding: Flattens nested positional values while collecting tail · case 01
Flattens nested positional values while collecting tail and changes the required Python-language result.
ROOT CAUSE
Flattens nested positional values while collecting tail. The executable reproducer isolates this operation from the rest of the contract.
VERIFIED REPAIR
Call f(a, *tail, flag=False), returning [a,list(tail),flag]. flag must be named; arbitrary extra positions belong to tail.
Unsuccessful approach: The alternative still fails because it drops the first variadic argument after binding.
Case contract
Call f(a, *tail, flag=False), returning [a,list(tail),flag]. flag must be named; arbitrary extra positions belong to tail. 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, *tail, flag=False):
return [a,[item for v in tail for item in (v if isinstance(v,list) else [v])],flag]
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('only required', solve([1], {}), [1, [], False])
check('several extras', solve([1, 2, 3], {}), [1, [2, 3], False])
check('named flag', solve([1, 2], {'flag': True}), [1, [2], True])
check('nested tail preserved', solve([1, [2, 3]], {}), [1, [[2, 3]], False])
check('unknown keyword', solve([1], {'other': 2}), 'TypeError')
check('missing required', solve([], {}), 'TypeError')
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 |
|---|---|---|---|
| only required | [1, [], False] | [1, [], False] | Passed |
| several extras | [1, [2, 3], False] | [1, [2, 3], False] | Passed |
| named flag | [1, [2], True] | [1, [2], True] | Passed |
| nested tail preserved | [1, [2, 3], False] | [1, [[2, 3]], False] | Failed |
| unknown keyword | TypeError | TypeError | Passed |
| missing required | TypeError | TypeError | Passed |
SHA-256 / f590178f50b60774948cfa44d33d50f30111b23a9f5d75f34bad9afa2c7b1d22
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, *tail, flag=False):
return [a,list(tail[1:]),flag]
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('only required', solve([1], {}), [1, [], False])
check('several extras', solve([1, 2, 3], {}), [1, [2, 3], False])
check('named flag', solve([1, 2], {'flag': True}), [1, [2], True])
check('nested tail preserved', solve([1, [2, 3]], {}), [1, [[2, 3]], False])
check('unknown keyword', solve([1], {'other': 2}), 'TypeError')
check('missing required', solve([], {}), 'TypeError')
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 |
|---|---|---|---|
| only required | [1, [], False] | [1, [], False] | Passed |
| several extras | [1, [3], False] | [1, [2, 3], False] | Failed |
| named flag | [1, [], True] | [1, [2], True] | Failed |
| nested tail preserved | [1, [], False] | [1, [[2, 3]], False] | Failed |
| unknown keyword | TypeError | TypeError | Passed |
| missing required | TypeError | TypeError | Passed |
SHA-256 / b041e88f271e3abecd95ef47062035f7c8e9bef889719f080a710165b2983432
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, *tail, flag=False):
return [a,list(tail),flag]
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('only required', solve([1], {}), [1, [], False])
check('several extras', solve([1, 2, 3], {}), [1, [2, 3], False])
check('named flag', solve([1, 2], {'flag': True}), [1, [2], True])
check('nested tail preserved', solve([1, [2, 3]], {}), [1, [[2, 3]], False])
check('unknown keyword', solve([1], {'other': 2}), 'TypeError')
check('missing required', solve([], {}), 'TypeError')
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 |
|---|---|---|---|
| only required | [1, [], False] | [1, [], False] | Passed |
| several extras | [1, [2, 3], False] | [1, [2, 3], False] | Passed |
| named flag | [1, [2], True] | [1, [2], True] | Passed |
| nested tail preserved | [1, [[2, 3]], False] | [1, [[2, 3]], False] | Passed |
| unknown keyword | TypeError | TypeError | Passed |
| missing required | TypeError | TypeError | Passed |
SHA-256 / 4ac73ad54c79a5d43136214b918328ca30ee71b3109960da0e81e9c5678cfc8e
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.833932+00:00.
Case digest / 05b470d62804d4eff04e36377d9d6c90749bc9b49fc4003ec741223ec491234f