FA-56626 / Auction allocation rules / Open access
Clock demand: round clearing quiescence · case 01
Surplus on one lot hides unmet demand on another at clock close.
ROOT CAUSE
Surplus on one lot hides unmet demand on another at clock close.
VERIFIED REPAIR
Require every lot to be non-overdemanded before closing the round.
Unsuccessful approach: The attempted repair uses all(q<s for q,s in zip(x["old"],x["supply"])); the explicit regression cases demonstrate that this still violates the stipulated auction rule.
Case contract
One bounded clock-auction round maintains per-lot demand at posted prices. Demand reductions become binding only at accepted clock prices; exits cannot be undone; deferred reductions are reconsidered against the new price. Arrays are aligned by lot and values are nonnegative integers. Named decision round-clearing-quiescence: Require every lot to be non-overdemanded before closing the round.
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 = [min(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
v7 = sum(x["old"])<=sum(x["supply"])
v8 = [a and p!=o for a,p,o in zip(x["accepted"],x["prices"],x["previous_prices"])]
v9 = x["old"] if x["round"]<=x["last_round"] else x["requested"]
return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('unequal demand caps / cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [True, True, True, True, True]), ('unequal demand caps / balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [True, True, True, True, True]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [False, False, False, False, False])]
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))['round-clearing-quiescence'], 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 |
|---|---|---|---|
| cross lot surplus | True | False | Failed |
| unequal demand caps / cross lot surplus | True | False | Failed |
| balanced lots | True | True | Passed |
| unequal demand caps / balanced lots | True | True | Passed |
| normal contract | False | False | Passed |
| unequal demand caps | False | False | Passed |
| exit at trigger | False | False | Passed |
| all accepted | False | False | Passed |
| none accepted | False | False | Passed |
| no exited lots | False | False | Passed |
| auction reopened | False | False | Passed |
SHA-256 / 2234feaafe8af416f9ff5213dd2e8a0ad4c94c711d9a936bad3a3bb530f465e7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = [min(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
v7 = all(q<s for q,s in zip(x["old"],x["supply"]))
v8 = [a and p!=o for a,p,o in zip(x["accepted"],x["prices"],x["previous_prices"])]
v9 = x["old"] if x["round"]<=x["last_round"] else x["requested"]
return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('unequal demand caps / cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [True, True, True, True, True]), ('unequal demand caps / balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [True, True, True, True, True]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [False, False, False, False, False])]
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))['round-clearing-quiescence'], 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 |
|---|---|---|---|
| cross lot surplus | False | False | Passed |
| unequal demand caps / cross lot surplus | False | False | Passed |
| balanced lots | False | True | Failed |
| unequal demand caps / balanced lots | False | True | Failed |
| normal contract | False | False | Passed |
| unequal demand caps | False | False | Passed |
| exit at trigger | False | False | Passed |
| all accepted | False | False | Passed |
| none accepted | False | False | Passed |
| no exited lots | False | False | Passed |
| auction reopened | False | False | Passed |
SHA-256 / 6bf7c4ebcdc533bac2b20ade77b13434a6b8c61435891d972fb509f8426e0db5
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = [min(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
v7 = all(q<=s for q,s in zip(x["old"],x["supply"]))
v8 = [a and p!=o for a,p,o in zip(x["accepted"],x["prices"],x["previous_prices"])]
v9 = x["old"] if x["round"]<=x["last_round"] else x["requested"]
return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('unequal demand caps / cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [True, True, True, True, True]), ('unequal demand caps / balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [True, True, True, True, True]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [False, False, False, False, False]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [False, False, False, False, False])]
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))['round-clearing-quiescence'], 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 |
|---|---|---|---|
| cross lot surplus | False | False | Passed |
| unequal demand caps / cross lot surplus | False | False | Passed |
| balanced lots | True | True | Passed |
| unequal demand caps / balanced lots | True | True | Passed |
| normal contract | False | False | Passed |
| unequal demand caps | False | False | Passed |
| exit at trigger | False | False | Passed |
| all accepted | False | False | Passed |
| none accepted | False | False | Passed |
| no exited lots | False | False | Passed |
| auction reopened | False | False | Passed |
SHA-256 / 01c7ce62b7c06a646810b63b8d0f2295d0030568a55ff93afc1aba1cc77c8ba4
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:08.927589+00:00.
Case digest / ca9e0bc02d3f051377d09801e9de3f347a57563959c345bea5e5aff6fcdecdbe