FA-56401 / Auction allocation rules / Open access
Amendment priority: filled floor · case 01
An amendment retroactively deletes executed units.
ROOT CAUSE
An amendment retroactively deletes executed units.
VERIFIED REPAIR
Clamp accepted total to filled quantity, not the old requested total.
Unsuccessful approach: The attempted repair uses x["total"] if x["new_total"]<x["filled"] else x["new_total"]; the explicit regression cases demonstrate that this still violates the stipulated auction rule.
Case contract
A single auction order amendment tracks filled units, original queue stamp and an incoming replacement. Price change or size increase loses queue priority; reducing total size cannot erase existing fills. A cancel acknowledgment terminates remaining quantity. Integer stamps and quantities are nonnegative. Named decision filled-floor: Clamp accepted total to filled quantity, not the old requested total.
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["now"] if x["new_total"]>x["total"] else x["stamp"]
v1 = x["now"] if x["new_price"]!=x["old_price"] else x["stamp"]
v2 = x["new_total"]
v3 = max(0,x["new_total"]-x["filled"])
v4 = 0 if x["cancel"] and x["ack"] else max(0,x["total"]-x["filled"])
v5 = x["expected"]==x["revision"]
v6 = x["old_lot"]==x["new_lot"]
v7 = x["old_owner"]==x["new_owner"]
v8 = not x["frozen"] or (x["new_price"]==x["old_price"] and x["new_total"]<=x["total"])
v9 = x["revision"] if x["request_id"]==x["last_id"] else x["revision"]+1
return {'increase-priority':v0,'price-priority':v1,'filled-floor':v2,'remaining-recalculation':v3,'cancel-ack-gate':v4,'revision-compare':v5,'lot-immutability':v6,'owner-immutability':v7,'freeze-restriction':v8,'request-replay':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('below executed size', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 2, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [3, 6, 9, 12, 15]), ('lower price / below executed size', {'old_price': 10, 'new_price': 8, 'total': 8, 'new_total': 2, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [3, 6, 9, 12, 15]), ('normal contract', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('lower price', {'old_price': 10, 'new_price': 8, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('unrelated acknowledgment', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': True, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('future revision', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 3, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('no collateral held', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 0, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('price replacement', {'old_price': 10, 'new_price': 12, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('size increase', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 12, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [12, 24, 36, 48, 60]), ('acknowledged cancel', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': True, 'ack': True, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30])]
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))['filled-floor'], 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 |
|---|---|---|---|
| below executed size | 2 | 3 | Failed |
| lower price / below executed size | 2 | 3 | Failed |
| normal contract | 6 | 6 | Passed |
| lower price | 6 | 6 | Passed |
| unrelated acknowledgment | 6 | 6 | Passed |
| future revision | 6 | 6 | Passed |
| no collateral held | 6 | 6 | Passed |
| price replacement | 6 | 6 | Passed |
| size increase | 12 | 12 | Passed |
| acknowledged cancel | 6 | 6 | Passed |
SHA-256 / 1f620f4e79ad4da1f810aa11a6ecc23328a8ff16195e4d83511d377815e76663
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["now"] if x["new_total"]>x["total"] else x["stamp"]
v1 = x["now"] if x["new_price"]!=x["old_price"] else x["stamp"]
v2 = x["total"] if x["new_total"]<x["filled"] else x["new_total"]
v3 = max(0,x["new_total"]-x["filled"])
v4 = 0 if x["cancel"] and x["ack"] else max(0,x["total"]-x["filled"])
v5 = x["expected"]==x["revision"]
v6 = x["old_lot"]==x["new_lot"]
v7 = x["old_owner"]==x["new_owner"]
v8 = not x["frozen"] or (x["new_price"]==x["old_price"] and x["new_total"]<=x["total"])
v9 = x["revision"] if x["request_id"]==x["last_id"] else x["revision"]+1
return {'increase-priority':v0,'price-priority':v1,'filled-floor':v2,'remaining-recalculation':v3,'cancel-ack-gate':v4,'revision-compare':v5,'lot-immutability':v6,'owner-immutability':v7,'freeze-restriction':v8,'request-replay':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('below executed size', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 2, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [3, 6, 9, 12, 15]), ('lower price / below executed size', {'old_price': 10, 'new_price': 8, 'total': 8, 'new_total': 2, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [3, 6, 9, 12, 15]), ('normal contract', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('lower price', {'old_price': 10, 'new_price': 8, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('unrelated acknowledgment', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': True, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('future revision', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 3, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('no collateral held', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 0, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('price replacement', {'old_price': 10, 'new_price': 12, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('size increase', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 12, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [12, 24, 36, 48, 60]), ('acknowledged cancel', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': True, 'ack': True, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30])]
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))['filled-floor'], 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 |
|---|---|---|---|
| below executed size | 8 | 3 | Failed |
| lower price / below executed size | 8 | 3 | Failed |
| normal contract | 6 | 6 | Passed |
| lower price | 6 | 6 | Passed |
| unrelated acknowledgment | 6 | 6 | Passed |
| future revision | 6 | 6 | Passed |
| no collateral held | 6 | 6 | Passed |
| price replacement | 6 | 6 | Passed |
| size increase | 12 | 12 | Passed |
| acknowledged cancel | 6 | 6 | Passed |
SHA-256 / 54b61fa08f9b46a8f31f7ff89c86e8f1ad9cfc1487dce4f7f9db4ccfbe61452e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = x["now"] if x["new_total"]>x["total"] else x["stamp"]
v1 = x["now"] if x["new_price"]!=x["old_price"] else x["stamp"]
v2 = max(x["filled"],x["new_total"])
v3 = max(0,x["new_total"]-x["filled"])
v4 = 0 if x["cancel"] and x["ack"] else max(0,x["total"]-x["filled"])
v5 = x["expected"]==x["revision"]
v6 = x["old_lot"]==x["new_lot"]
v7 = x["old_owner"]==x["new_owner"]
v8 = not x["frozen"] or (x["new_price"]==x["old_price"] and x["new_total"]<=x["total"])
v9 = x["revision"] if x["request_id"]==x["last_id"] else x["revision"]+1
return {'increase-priority':v0,'price-priority':v1,'filled-floor':v2,'remaining-recalculation':v3,'cancel-ack-gate':v4,'revision-compare':v5,'lot-immutability':v6,'owner-immutability':v7,'freeze-restriction':v8,'request-replay':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('below executed size', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 2, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [3, 6, 9, 12, 15]), ('lower price / below executed size', {'old_price': 10, 'new_price': 8, 'total': 8, 'new_total': 2, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [3, 6, 9, 12, 15]), ('normal contract', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('lower price', {'old_price': 10, 'new_price': 8, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('unrelated acknowledgment', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': True, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('future revision', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 3, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('no collateral held', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 0, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('price replacement', {'old_price': 10, 'new_price': 12, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30]), ('size increase', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 12, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': False, 'ack': False, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [12, 24, 36, 48, 60]), ('acknowledged cancel', {'old_price': 10, 'new_price': 10, 'total': 8, 'new_total': 6, 'filled': 3, 'stamp': 1, 'now': 8, 'cancel': True, 'ack': True, 'revision': 2, 'expected': 2, 'old_lot': 'A', 'new_lot': 'A', 'old_owner': 'a', 'new_owner': 'a', 'frozen': False, 'held': 8, 'request_id': 'r2', 'last_id': 'r1'}, [6, 12, 18, 24, 30])]
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))['filled-floor'], 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 |
|---|---|---|---|
| below executed size | 3 | 3 | Passed |
| lower price / below executed size | 3 | 3 | Passed |
| normal contract | 6 | 6 | Passed |
| lower price | 6 | 6 | Passed |
| unrelated acknowledgment | 6 | 6 | Passed |
| future revision | 6 | 6 | Passed |
| no collateral held | 6 | 6 | Passed |
| price replacement | 6 | 6 | Passed |
| size increase | 12 | 12 | Passed |
| acknowledged cancel | 6 | 6 | Passed |
SHA-256 / 37a11f623003c18fb92d17399a384acf83df28ba2dfd541408e529e63df722c1
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:06.829878+00:00.
Case digest / 5174d2febba0e2f9b2a2c2d652c771571ac4d3efbcf81a6092df9abd5e92109d