FAILURE MAP
← Case archive

FA-56451 / Auction allocation rules / Open access

Escrow reservation: capture release · case 01

Captured fills remain reserved or are released using historical captures.

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

ROOT CAUSE

Captured fills remain reserved or are released using historical captures.

VERIFIED REPAIR

Release the current fill amount from the current hold.

Unsuccessful approach: The attempted repair uses max(0,x["old_hold"]-x["captured"]); 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 capture-release: Release the current fill amount from the current 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 = x["old_hold"]
    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 = [('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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]), ('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}, [18, 36, 54, 72, 90])]
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))['capture-release'], 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 fixtureActualExpectedOutcome
normal contract3018Failed
reuse existing collateral3018Failed
other auction limits credit3018Failed
insufficient replacement3018Failed
old hold larger3018Failed
confirmed release3018Failed
fully captured300Failed
zero reservation00Passed
closed auction3018Failed

SHA-256 / aba40825a0d221caa51aed2f60136640250038e49bfac86271325596bb47c5c2

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["captured"])
    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 = [('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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]), ('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}, [18, 36, 54, 72, 90])]
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))['capture-release'], 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 fixtureActualExpectedOutcome
normal contract2018Failed
reuse existing collateral2018Failed
other auction limits credit2018Failed
insufficient replacement2018Failed
old hold larger2018Failed
confirmed release2018Failed
fully captured200Failed
zero reservation00Passed
closed auction2018Failed

SHA-256 / 426990cb797d258c48b30c6a41550c0280b228ba5e7e3195571634ccdaf31550

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 = [('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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}, [18, 36, 54, 72, 90]), ('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]), ('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}, [18, 36, 54, 72, 90])]
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))['capture-release'], 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 fixtureActualExpectedOutcome
normal contract1818Passed
reuse existing collateral1818Passed
other auction limits credit1818Passed
insufficient replacement1818Passed
old hold larger1818Passed
confirmed release1818Passed
fully captured00Passed
zero reservation00Passed
closed auction1818Passed

SHA-256 / a7f5f0f6a3908e6407a14ae39dcb65cabb1cbe18859af33156eb02a4b3a5d95c

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

Case digest / 7d1d7dad85550b1e7512406a65e2d206f4ad33ffe3c8ace496b50eb415d8d685