FA-12696 / Auction allocation rules / Open access
Uniform unit pricing reads the last winner instead of the first loser · case 01
Uniform unit pricing reads the last winner instead of the first loser.
ROOT CAUSE
The supply cutoff index is shifted into accepted demand.
VERIFIED REPAIR
Implement the stated toy allocation contract directly: Each integer bid requests one unit. For positive supply, return the first excluded bid as uniform payment, or zero if demand does not exceed supply. Zero supply returns None.
Unsuccessful approach: Always taking the lowest bid ignores the actual supply cutoff.
Case contract
Each integer bid requests one unit. For positive supply, return the first excluded bid as uniform payment, or zero if demand does not exceed supply. Zero supply returns 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(bids, supply):
return None if supply==0 else (sorted(bids,reverse=True)[min(supply,len(bids))-1] if bids else 0)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior cutoff', solve([30+N,20,10,5], 2), 10)
check('one supplied', solve([9,7,2], 1), 7)
check('all served', solve([9,7], 2), 0)
check('excess supply', solve([9], 3), 0)
check('empty demand', solve([], 2), 0)
check('zero supply', solve([9], 0), None)
check('tied marginal bids', solve([8,8,8,1], 2), 8)
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 |
|---|---|---|---|
| interior cutoff | 20 | 10 | Failed |
| one supplied | 9 | 7 | Failed |
| all served | 7 | 0 | Failed |
| excess supply | 9 | 0 | Failed |
| empty demand | 0 | 0 | Passed |
| zero supply | None | None | Passed |
| tied marginal bids | 8 | 8 | Passed |
SHA-256 / c9898979a01d3906b7fca6b303bf2f9c1b477842b1e4381aaa41f2a0b7fa4c31
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(bids, supply):
return None if supply==0 else (min(bids) if len(bids)>supply else 0)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior cutoff', solve([30+N,20,10,5], 2), 10)
check('one supplied', solve([9,7,2], 1), 7)
check('all served', solve([9,7], 2), 0)
check('excess supply', solve([9], 3), 0)
check('empty demand', solve([], 2), 0)
check('zero supply', solve([9], 0), None)
check('tied marginal bids', solve([8,8,8,1], 2), 8)
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 |
|---|---|---|---|
| interior cutoff | 5 | 10 | Failed |
| one supplied | 2 | 7 | Failed |
| all served | 0 | 0 | Passed |
| excess supply | 0 | 0 | Passed |
| empty demand | 0 | 0 | Passed |
| zero supply | None | None | Passed |
| tied marginal bids | 1 | 8 | Failed |
SHA-256 / 882c41fe11a09de411b1b25a8ac677aeb81d6f839655507a6c729e715ac3fe4b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(bids, supply):
return None if supply==0 else (sorted(bids,reverse=True)[supply] if len(bids)>supply else 0)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('interior cutoff', solve([30+N,20,10,5], 2), 10)
check('one supplied', solve([9,7,2], 1), 7)
check('all served', solve([9,7], 2), 0)
check('excess supply', solve([9], 3), 0)
check('empty demand', solve([], 2), 0)
check('zero supply', solve([9], 0), None)
check('tied marginal bids', solve([8,8,8,1], 2), 8)
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 |
|---|---|---|---|
| interior cutoff | 10 | 10 | Passed |
| one supplied | 7 | 7 | Passed |
| all served | 0 | 0 | Passed |
| excess supply | 0 | 0 | Passed |
| empty demand | 0 | 0 | Passed |
| zero supply | None | None | Passed |
| tied marginal bids | 8 | 8 | Passed |
SHA-256 / 991fb39d012cc5b02a8d3fcc37c273a89afcad130ca80617ef988c5457484f49
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.345075+00:00.
Case digest / 11ba0ba4ab8cbf3b4cb33800e08a98e057bf1afd67a68ef2020e1ad9ce1fcb10