FA-12731 / Auction allocation rules / Open access
Call clearing chooses peak demand instead of executable volume · case 01
Call clearing chooses peak demand instead of executable volume.
ROOT CAUSE
Price selection maximizes demand rather than matched volume.
VERIFIED REPAIR
Implement the stated toy allocation contract directly: Given candidate rows [price,demand,supply], choose maximum min(demand,supply), then minimum abs(demand-supply), then lowest price. Empty rows return None.
Unsuccessful approach: Maximizing volume without the specified imbalance tie-break selects a less balanced price.
Case contract
Given candidate rows [price,demand,supply], choose maximum min(demand,supply), then minimum abs(demand-supply), then lowest price. Empty rows return None.
Why this case matters
Deterministic teaching model for reviewing auction allocation software; not a representation of any venue or financial advice.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return max(rows,key=lambda r:r[1])[0] if rows else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('balance tie breaker', solve([[N,10,4],[N+1,4,4]]), N+1)
check('volume before balance', solve([[1,2,2],[2,9,5]]), 2)
check('lowest final tie', solve([[5,4,4],[3,4,4]]), 3)
check('empty', solve([]), None)
check('single', solve([[7,0,0]]), 7)
check('supply shortage', solve([[1,20,1],[2,4,3]]), 2)
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 |
|---|---|---|---|
| balance tie breaker | 1 | 2 | Failed |
| volume before balance | 2 | 2 | Passed |
| lowest final tie | 5 | 3 | Failed |
| empty | None | None | Passed |
| single | 7 | 7 | Passed |
| supply shortage | 1 | 2 | Failed |
SHA-256 / 2f364189eb6a60bed400d2d3da78011838d931604432bfe71c0612be0f53d32d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return min(rows,key=lambda r:(-min(r[1],r[2]),r[0]))[0] if rows else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('balance tie breaker', solve([[N,10,4],[N+1,4,4]]), N+1)
check('volume before balance', solve([[1,2,2],[2,9,5]]), 2)
check('lowest final tie', solve([[5,4,4],[3,4,4]]), 3)
check('empty', solve([]), None)
check('single', solve([[7,0,0]]), 7)
check('supply shortage', solve([[1,20,1],[2,4,3]]), 2)
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 |
|---|---|---|---|
| balance tie breaker | 1 | 2 | Failed |
| volume before balance | 2 | 2 | Passed |
| lowest final tie | 3 | 3 | Passed |
| empty | None | None | Passed |
| single | 7 | 7 | Passed |
| supply shortage | 2 | 2 | Passed |
SHA-256 / a76ea0ee69fbfb9447257da6d2d078a1fa0662a77af2e736da9f287ae3bc0242
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return min(rows,key=lambda r:(-min(r[1],r[2]),abs(r[1]-r[2]),r[0]))[0] if rows else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('balance tie breaker', solve([[N,10,4],[N+1,4,4]]), N+1)
check('volume before balance', solve([[1,2,2],[2,9,5]]), 2)
check('lowest final tie', solve([[5,4,4],[3,4,4]]), 3)
check('empty', solve([]), None)
check('single', solve([[7,0,0]]), 7)
check('supply shortage', solve([[1,20,1],[2,4,3]]), 2)
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 |
|---|---|---|---|
| balance tie breaker | 2 | 2 | Passed |
| volume before balance | 2 | 2 | Passed |
| lowest final tie | 3 | 3 | Passed |
| empty | None | None | Passed |
| single | 7 | 7 | Passed |
| supply shortage | 2 | 2 | Passed |
SHA-256 / c384965e516a93058751825b0053c29d53c9c9c67abea604d78c7a8ab9f2bb59
Verification & scope
Offline toy model with explicit integer inputs; no strategic behavior or real market execution. 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:38:59.474970+00:00.
Case digest / 5e1c8a5238ff7151b703f4eaa039774d28e6a711a94cd0748b47846b20090190