FA-56476 / Auction allocation rules / Open access
Escrow reservation: release clamp · case 01
A release command exceeds the reservation left after capture.
ROOT CAUSE
A release command exceeds the reservation left after capture.
VERIFIED REPAIR
Clamp release to the residual uncaptured hold.
Unsuccessful approach: The attempted repair uses min(x["release"],x["old_hold"]); the explicit regression cases demonstrate that this still violates the stipulated auction rule.
Case contract
A toy per-auction escrow account distinguishes available funds, reserved collateral, captured fill payments and pending releases. Reservation replaces an old hold atomically; a failed replacement retains the old hold. Separate auction holds must remain unavailable. Named decision release-clamp: Clamp release to the residual uncaptured hold.
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["balance"]-x["other_hold"] >= x["new_hold"]
v1 = x["new_hold"] if x["replace_ok"] else x["old_hold"]
v2 = max(0,x["old_hold"]-x["fill_cost"])
v3 = x["balance"]-x["old_hold"]-x["other_hold"]+(x["pending"] if x["confirmed"] else 0)
v4 = min(x["refund"],x["captured"])
v5 = x["old_hold"]+x["bond"]
v6 = max(0,x["old_hold"]-x["fill_cost"]) if x["closed"] else 0
v7 = x["release"]
v8 = max(0,x["fill_cost"]-x["fee"])
v9 = x["balance"]-x["other_hold"]-x["new_hold"] >= x["fee"]
return {'replace-credit':v0,'atomic-replacement':v1,'capture-release':v2,'pending-release-availability':v3,'refund-ceiling':v4,'bond-separation':v5,'close-release':v6,'release-clamp':v7,'seller-net-remittance':v8,'unreserved-fee-check':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('fully captured', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 30, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [0, 0, 0, 0, 0]), ('zero reservation', {'balance': 100, 'old_hold': 0, 'new_hold': 0, 'other_hold': 0, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [0, 0, 0, 0, 0]), ('release above residual', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 40, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [18, 36, 54, 72, 90]), ('normal contract', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('reuse existing collateral', {'balance': 100, 'old_hold': 30, 'new_hold': 70, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('other auction limits credit', {'balance': 100, 'old_hold': 30, 'new_hold': 90, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('insufficient replacement', {'balance': 100, 'old_hold': 30, 'new_hold': 200, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': False, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('old hold larger', {'balance': 100, 'old_hold': 30, 'new_hold': 15, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('confirmed release', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': True, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('closed auction', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': True}, [5, 10, 15, 20, 25])]
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))['release-clamp'], 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 |
|---|---|---|---|
| fully captured | 5 | 0 | Failed |
| zero reservation | 5 | 0 | Failed |
| release above residual | 40 | 18 | Failed |
| normal contract | 5 | 5 | Passed |
| reuse existing collateral | 5 | 5 | Passed |
| other auction limits credit | 5 | 5 | Passed |
| insufficient replacement | 5 | 5 | Passed |
| old hold larger | 5 | 5 | Passed |
| confirmed release | 5 | 5 | Passed |
| closed auction | 5 | 5 | Passed |
SHA-256 / 35c52b2e68651cc31c1bdf1a26c88f1b7082f64f13fcb3edfad7287065acfdff
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["balance"]-x["other_hold"] >= x["new_hold"]
v1 = x["new_hold"] if x["replace_ok"] else x["old_hold"]
v2 = max(0,x["old_hold"]-x["fill_cost"])
v3 = x["balance"]-x["old_hold"]-x["other_hold"]+(x["pending"] if x["confirmed"] else 0)
v4 = min(x["refund"],x["captured"])
v5 = x["old_hold"]+x["bond"]
v6 = max(0,x["old_hold"]-x["fill_cost"]) if x["closed"] else 0
v7 = min(x["release"],x["old_hold"])
v8 = max(0,x["fill_cost"]-x["fee"])
v9 = x["balance"]-x["other_hold"]-x["new_hold"] >= x["fee"]
return {'replace-credit':v0,'atomic-replacement':v1,'capture-release':v2,'pending-release-availability':v3,'refund-ceiling':v4,'bond-separation':v5,'close-release':v6,'release-clamp':v7,'seller-net-remittance':v8,'unreserved-fee-check':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('fully captured', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 30, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [0, 0, 0, 0, 0]), ('zero reservation', {'balance': 100, 'old_hold': 0, 'new_hold': 0, 'other_hold': 0, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [0, 0, 0, 0, 0]), ('release above residual', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 40, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [18, 36, 54, 72, 90]), ('normal contract', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('reuse existing collateral', {'balance': 100, 'old_hold': 30, 'new_hold': 70, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('other auction limits credit', {'balance': 100, 'old_hold': 30, 'new_hold': 90, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('insufficient replacement', {'balance': 100, 'old_hold': 30, 'new_hold': 200, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': False, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('old hold larger', {'balance': 100, 'old_hold': 30, 'new_hold': 15, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('confirmed release', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': True, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('closed auction', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': True}, [5, 10, 15, 20, 25])]
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))['release-clamp'], 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 |
|---|---|---|---|
| fully captured | 5 | 0 | Failed |
| zero reservation | 0 | 0 | Passed |
| release above residual | 30 | 18 | Failed |
| normal contract | 5 | 5 | Passed |
| reuse existing collateral | 5 | 5 | Passed |
| other auction limits credit | 5 | 5 | Passed |
| insufficient replacement | 5 | 5 | Passed |
| old hold larger | 5 | 5 | Passed |
| confirmed release | 5 | 5 | Passed |
| closed auction | 5 | 5 | Passed |
SHA-256 / 1b0dbc6c117f27a564f5d56fc093416f9f46cb9d9e9fdf24ec473a5338aa1fec
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["balance"]-x["other_hold"] >= x["new_hold"]
v1 = x["new_hold"] if x["replace_ok"] else x["old_hold"]
v2 = max(0,x["old_hold"]-x["fill_cost"])
v3 = x["balance"]-x["old_hold"]-x["other_hold"]+(x["pending"] if x["confirmed"] else 0)
v4 = min(x["refund"],x["captured"])
v5 = x["old_hold"]+x["bond"]
v6 = max(0,x["old_hold"]-x["fill_cost"]) if x["closed"] else 0
v7 = min(x["release"],max(0,x["old_hold"]-x["fill_cost"]))
v8 = max(0,x["fill_cost"]-x["fee"])
v9 = x["balance"]-x["other_hold"]-x["new_hold"] >= x["fee"]
return {'replace-credit':v0,'atomic-replacement':v1,'capture-release':v2,'pending-release-availability':v3,'refund-ceiling':v4,'bond-separation':v5,'close-release':v6,'release-clamp':v7,'seller-net-remittance':v8,'unreserved-fee-check':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('fully captured', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 30, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [0, 0, 0, 0, 0]), ('zero reservation', {'balance': 100, 'old_hold': 0, 'new_hold': 0, 'other_hold': 0, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [0, 0, 0, 0, 0]), ('release above residual', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 40, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [18, 36, 54, 72, 90]), ('normal contract', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('reuse existing collateral', {'balance': 100, 'old_hold': 30, 'new_hold': 70, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('other auction limits credit', {'balance': 100, 'old_hold': 30, 'new_hold': 90, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('insufficient replacement', {'balance': 100, 'old_hold': 30, 'new_hold': 200, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': False, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('old hold larger', {'balance': 100, 'old_hold': 30, 'new_hold': 15, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('confirmed release', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': True, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [5, 10, 15, 20, 25]), ('closed auction', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': True}, [5, 10, 15, 20, 25])]
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))['release-clamp'], 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 |
|---|---|---|---|
| fully captured | 0 | 0 | Passed |
| zero reservation | 0 | 0 | Passed |
| release above residual | 18 | 18 | Passed |
| normal contract | 5 | 5 | Passed |
| reuse existing collateral | 5 | 5 | Passed |
| other auction limits credit | 5 | 5 | Passed |
| insufficient replacement | 5 | 5 | Passed |
| old hold larger | 5 | 5 | Passed |
| confirmed release | 5 | 5 | Passed |
| closed auction | 5 | 5 | Passed |
SHA-256 / 0d895f8d215b631dc7f27a99e22fb44f8d6505875187b786643b0bbf91af7e0e
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:07.537085+00:00.
Case digest / 4bcd4071e4678c6f2dfcd9862abd8179e4cf90ae02611da0b0ea005324dda4f9