FAILURE MAP
← Case archive

FA-4846 / Call argument binding / Open access

Positional only binding: Changes the omitted second-argument default · case 01

Changes the omitted second-argument default and changes the required Python-language result.

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

ROOT CAUSE

Changes the omitted second-argument default. The executable reproducer isolates this operation from the rest of the contract.

THE FAILURE

Changes the omitted second-argument default. The executable reproducer isolates this operation from the rest of the contract.

Unsuccessful approach: The alternative still fails because it adds a default to the required first parameter.

Case contract

Call f(a, /, b=10) and return [a,b]. The first parameter is required and positional-only; b accepts position or keyword. 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=None):
        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('keyword first rejected', solve([], {'a': 1}), 'TypeError')
check('omitted optional', solve([1], {}), [1, 10])
check('two positions', solve([1, 2], {}), [1, 2])
check('named second', solve([1], {'b': 3}), [1, 3])
check('missing first', solve([], {}), 'TypeError')
check('duplicate apparent first', solve([1], {'a': 2}), '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 fixtureActualExpectedOutcome
keyword first rejectedTypeErrorTypeErrorPassed
omitted optional[1, None][1, 10]Failed
two positions[1, 2][1, 2]Passed
named second[1, 3][1, 3]Passed
missing firstTypeErrorTypeErrorPassed
duplicate apparent firstTypeErrorTypeErrorPassed

SHA-256 / e281190fad5fa06ccb1c95904bfbb058243d50b5ab40b9baf4800fba8dc6d58b

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=0, /, 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('keyword first rejected', solve([], {'a': 1}), 'TypeError')
check('omitted optional', solve([1], {}), [1, 10])
check('two positions', solve([1, 2], {}), [1, 2])
check('named second', solve([1], {'b': 3}), [1, 3])
check('missing first', solve([], {}), 'TypeError')
check('duplicate apparent first', solve([1], {'a': 2}), '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 fixtureActualExpectedOutcome
keyword first rejectedTypeErrorTypeErrorPassed
omitted optional[1, 10][1, 10]Passed
two positions[1, 2][1, 2]Passed
named second[1, 3][1, 3]Passed
missing first[0, 10]TypeErrorFailed
duplicate apparent firstTypeErrorTypeErrorPassed

SHA-256 / fa0f1cbd4589c0595774fb459e67615b54d8660c49eeac9b9aaeeec8a557e370

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

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.585858+00:00.

Case digest / 69bffb8d60b2c9f0fe2584557d162add8b65d4b402b66aaa69f5f44902eaab77