FA-56846 / Auction allocation rules / Open access
Deposit admission: restricted tranche · case 01
Restricted deposit tranches are available to a new award.
ROOT CAUSE
Restricted deposit tranches are available to a new award.
VERIFIED REPAIR
For restricted tranche, apply the stipulated decision max(0,x["cleared"]-x["restricted"]).
Unsuccessful approach: The attempted repair uses max(0,x["cleared"]-x["locked"]); the explicit regression cases demonstrate that this still violates the stipulated auction rule.
Case contract
Toy bidder deposits consist of cleared, pending and restricted tranches. Deposits are auction-scoped and denomination-specific. Admission capacity is per bidder; a waiver substitutes for a required deposit without turning a pending transfer into cash. Named decision restricted-tranche: For restricted tranche, apply the stipulated decision max(0,x["cleared"]-x["restricted"]).
Why this case matters
Offline administrative auction model for software failure analysis.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["cleared"]>=x["required"]
v1 = x["cleared"]
v2 = x["waiver"] or x["cleared"]>=x["required"]
v3 = x["auction"]==x["deposit_auction"]
v4 = x["currency"]==x["deposit_currency"]
v5 = max(0,x["cleared"]-x["chargeback"])
v6 = max(0,x["cleared"]-x["locked"])
v7 = x["owner"]==x["beneficiary"] and x["owner"] in x["owners"]
v8 = 0 if x["expired"] else x["cleared"]+(x["topup"] if x["confirmed"] else 0)
v9 = min(x["refunded"],max(0,x["cleared"]-x["locked"]))
return {'cleared-admission':v0,'restricted-tranche':v1,'deposit-waiver-admission':v2,'auction-scope':v3,'denomination-scope':v4,'chargeback-recovery':v5,'withdrawable-deposit':v6,'beneficial-owner':v7,'topup-posting':v8,'refund-available-ceiling':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('cleared sufficient', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 10, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('deposit waived', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': True, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('wrong auction', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'B', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('wrong denomination', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'ALT', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('expired deposit', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': True, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('topup confirmed', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': True, 'refunded': 4}, [13, 26, 39, 52, 65]), ('chargeback consumes balance', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 30, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('all locked', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 30, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65])]
def vary(value):
if type(value) is int: return value*N
if isinstance(value,list): return [vary(v) for v in value]
if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
return value
for label, request, expected in fixtures:
check(label, solve(vary(request))['restricted-tranche'], expected[N-1])
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 |
|---|---|---|---|
| normal contract | 20 | 13 | Failed |
| cleared sufficient | 20 | 13 | Failed |
| deposit waived | 20 | 13 | Failed |
| wrong auction | 20 | 13 | Failed |
| wrong denomination | 20 | 13 | Failed |
| expired deposit | 20 | 13 | Failed |
| topup confirmed | 20 | 13 | Failed |
| chargeback consumes balance | 20 | 13 | Failed |
| all locked | 20 | 13 | Failed |
SHA-256 / 0d8a6d7646edc93305b11e4871fdc0c310f0520d26cfd56ccb8f7e25ad399aaf
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["cleared"]>=x["required"]
v1 = max(0,x["cleared"]-x["locked"])
v2 = x["waiver"] or x["cleared"]>=x["required"]
v3 = x["auction"]==x["deposit_auction"]
v4 = x["currency"]==x["deposit_currency"]
v5 = max(0,x["cleared"]-x["chargeback"])
v6 = max(0,x["cleared"]-x["locked"])
v7 = x["owner"]==x["beneficiary"] and x["owner"] in x["owners"]
v8 = 0 if x["expired"] else x["cleared"]+(x["topup"] if x["confirmed"] else 0)
v9 = min(x["refunded"],max(0,x["cleared"]-x["locked"]))
return {'cleared-admission':v0,'restricted-tranche':v1,'deposit-waiver-admission':v2,'auction-scope':v3,'denomination-scope':v4,'chargeback-recovery':v5,'withdrawable-deposit':v6,'beneficial-owner':v7,'topup-posting':v8,'refund-available-ceiling':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('cleared sufficient', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 10, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('deposit waived', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': True, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('wrong auction', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'B', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('wrong denomination', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'ALT', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('expired deposit', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': True, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('topup confirmed', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': True, 'refunded': 4}, [13, 26, 39, 52, 65]), ('chargeback consumes balance', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 30, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('all locked', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 30, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65])]
def vary(value):
if type(value) is int: return value*N
if isinstance(value,list): return [vary(v) for v in value]
if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
return value
for label, request, expected in fixtures:
check(label, solve(vary(request))['restricted-tranche'], expected[N-1])
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 |
|---|---|---|---|
| normal contract | 14 | 13 | Failed |
| cleared sufficient | 14 | 13 | Failed |
| deposit waived | 14 | 13 | Failed |
| wrong auction | 14 | 13 | Failed |
| wrong denomination | 14 | 13 | Failed |
| expired deposit | 14 | 13 | Failed |
| topup confirmed | 14 | 13 | Failed |
| chargeback consumes balance | 14 | 13 | Failed |
| all locked | 0 | 13 | Failed |
SHA-256 / 3a9f78c2fa0868cdbe23ee8d26cf4b9393a83f3bbdefe0f586c51d29f3ca8e10
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["cleared"]>=x["required"]
v1 = max(0,x["cleared"]-x["restricted"])
v2 = x["waiver"] or x["cleared"]>=x["required"]
v3 = x["auction"]==x["deposit_auction"]
v4 = x["currency"]==x["deposit_currency"]
v5 = max(0,x["cleared"]-x["chargeback"])
v6 = max(0,x["cleared"]-x["locked"])
v7 = x["owner"]==x["beneficiary"] and x["owner"] in x["owners"]
v8 = 0 if x["expired"] else x["cleared"]+(x["topup"] if x["confirmed"] else 0)
v9 = min(x["refunded"],max(0,x["cleared"]-x["locked"]))
return {'cleared-admission':v0,'restricted-tranche':v1,'deposit-waiver-admission':v2,'auction-scope':v3,'denomination-scope':v4,'chargeback-recovery':v5,'withdrawable-deposit':v6,'beneficial-owner':v7,'topup-posting':v8,'refund-available-ceiling':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('cleared sufficient', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 10, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('deposit waived', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': True, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('wrong auction', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'B', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('wrong denomination', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'ALT', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('expired deposit', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': True, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('topup confirmed', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': True, 'refunded': 4}, [13, 26, 39, 52, 65]), ('chargeback consumes balance', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 30, 'locked': 6, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65]), ('all locked', {'cleared': 20, 'pending': 15, 'restricted': 7, 'required': 25, 'waiver': False, 'auction': 'A', 'deposit_auction': 'A', 'currency': 'TOK', 'deposit_currency': 'TOK', 'chargeback': 3, 'locked': 30, 'owners': ['a', 'b'], 'owner': 'a', 'beneficiary': 'a', 'expired': False, 'topup': 8, 'confirmed': False, 'refunded': 4}, [13, 26, 39, 52, 65])]
def vary(value):
if type(value) is int: return value*N
if isinstance(value,list): return [vary(v) for v in value]
if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
return value
for label, request, expected in fixtures:
check(label, solve(vary(request))['restricted-tranche'], expected[N-1])
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 |
|---|---|---|---|
| normal contract | 13 | 13 | Passed |
| cleared sufficient | 13 | 13 | Passed |
| deposit waived | 13 | 13 | Passed |
| wrong auction | 13 | 13 | Passed |
| wrong denomination | 13 | 13 | Passed |
| expired deposit | 13 | 13 | Passed |
| topup confirmed | 13 | 13 | Passed |
| chargeback consumes balance | 13 | 13 | Passed |
| all locked | 13 | 13 | Passed |
SHA-256 / a642b6fd5255370485a4d92e03d8c8e43cdb174930c11d66c546cea9e616fd0d
Verification & scope
Stipulated toy auction rules, not a venue specification, financial advice, optimization claim, or live trading implementation. Nonnegative integer inputs and internally aligned list fields only. 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:46:10.999214+00:00.
Case digest / 492ef9c002b30d019640e3f7dbd46fc4bbc7ea2d2d88474979eb2f11ea6c0a3d