{"abstract":"Marginal pro-rata allocation loses residual units.","category":"Auction allocation rules","checks":7,"contract":"For positive integer requests and capacity between zero and their sum, floor proportional shares then give one remaining unit to each largest fractional remainder, breaking ties by input order. Empty requests require zero capacity.","evaluation_group":"model-3925bd0e0f8fa97e","failed_approach":"Giving all residual units to the first participant ignores fractional entitlement.","family":"z-auction_matching-pro-rata-remainder","id":"FA-12726","implementations":{"attempt":{"sha256":"511dd8731675666a8ca1e601bc4367efe1795bcfda34966d27465f04ef833763","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(requests, capacity):\n    if not requests: return []\n    result=[capacity*q//sum(requests) for q in requests]\n    result[0]+=capacity-sum(result)\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('largest remainder is not first', solve([N,3*N], 2), [1,1])\ncheck('strict larger remainder later', solve([1,2], 1), [0,1])\ncheck('multiple residual units', solve([1,1,1], 2), [1,1,0])\ncheck('zero capacity', solve([1,2], 0), [0,0])\ncheck('full capacity', solve([2,3], 5), [2,3])\ncheck('single bidder', solve([5], 3), [3])\ncheck('empty', solve([], 0), [])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"56a38a38f59928302b2304cda71dfa8fba8dd437d98bd2dbcde29be6118801a5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(requests, capacity):\n    return [capacity*q//sum(requests) for q in requests]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('largest remainder is not first', solve([N,3*N], 2), [1,1])\ncheck('strict larger remainder later', solve([1,2], 1), [0,1])\ncheck('multiple residual units', solve([1,1,1], 2), [1,1,0])\ncheck('zero capacity', solve([1,2], 0), [0,0])\ncheck('full capacity', solve([2,3], 5), [2,3])\ncheck('single bidder', solve([5], 3), [3])\ncheck('empty', solve([], 0), [])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"54f148fd1ab26666b2525e3618b8d62cf308c91b409f71d7c10fa8b69185f242","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(requests, capacity):\n    total=sum(requests)\n    if not total: return []\n    result=[capacity*q//total for q in requests]\n    order=sorted(range(len(requests)),key=lambda i:-(capacity*requests[i]%total))\n    for i in order[:capacity-sum(result)]: result[i]+=1\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('largest remainder is not first', solve([N,3*N], 2), [1,1])\ncheck('strict larger remainder later', solve([1,2], 1), [0,1])\ncheck('multiple residual units', solve([1,1,1], 2), [1,1,0])\ncheck('zero capacity', solve([1,2], 0), [0,0])\ncheck('full capacity', solve([2,3], 5), [2,3])\ncheck('single bidder', solve([5], 3), [3])\ncheck('empty', solve([], 0), [])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"z-auction_matching-pro-rata-remainder","generated_at":"2026-09-29T14:38:59.439096+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Deterministic teaching model for reviewing auction allocation software; not a representation of any venue or financial advice.","repair":"Implement the stated toy allocation contract directly: For positive integer requests and capacity between zero and their sum, floor proportional shares then give one remaining unit to each largest fractional remainder, breaking ties by input order. Empty requests require zero capacity.","root_cause":"Every fractional allocation is independently floored.","sha256":"51bb05a212a39e75506017482f6dce735383663e0343ee4c285b4f018d7d59d1","title":"Marginal pro-rata allocation loses residual units · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.015,"exit_code":1,"observations":[{"actual":[1,1],"check":"largest remainder is not first","expected":[1,1],"passed":true},{"actual":[1,0],"check":"strict larger remainder later","expected":[0,1],"passed":false},{"actual":[2,0,0],"check":"multiple residual units","expected":[1,1,0],"passed":false},{"actual":[0,0],"check":"zero capacity","expected":[0,0],"passed":true},{"actual":[2,3],"check":"full capacity","expected":[2,3],"passed":true},{"actual":[3],"check":"single bidder","expected":[3],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"largest remainder is not first\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"strict larger remainder later\", \"actual\": [1, 0], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"multiple residual units\", \"actual\": [2, 0, 0], \"expected\": [1, 1, 0], \"passed\": false}, {\"check\": \"zero capacity\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"full capacity\", \"actual\": [2, 3], \"expected\": [2, 3], \"passed\": true}, {\"check\": \"single bidder\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.508,"exit_code":1,"observations":[{"actual":[0,1],"check":"largest remainder is not first","expected":[1,1],"passed":false},{"actual":[0,0],"check":"strict larger remainder later","expected":[0,1],"passed":false},{"actual":[0,0,0],"check":"multiple residual units","expected":[1,1,0],"passed":false},{"actual":[0,0],"check":"zero capacity","expected":[0,0],"passed":true},{"actual":[2,3],"check":"full capacity","expected":[2,3],"passed":true},{"actual":[3],"check":"single bidder","expected":[3],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"largest remainder is not first\", \"actual\": [0, 1], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"strict larger remainder later\", \"actual\": [0, 0], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"multiple residual units\", \"actual\": [0, 0, 0], \"expected\": [1, 1, 0], \"passed\": false}, {\"check\": \"zero capacity\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"full capacity\", \"actual\": [2, 3], \"expected\": [2, 3], \"passed\": true}, {\"check\": \"single bidder\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.444,"exit_code":0,"observations":[{"actual":[1,1],"check":"largest remainder is not first","expected":[1,1],"passed":true},{"actual":[0,1],"check":"strict larger remainder later","expected":[0,1],"passed":true},{"actual":[1,1,0],"check":"multiple residual units","expected":[1,1,0],"passed":true},{"actual":[0,0],"check":"zero capacity","expected":[0,0],"passed":true},{"actual":[2,3],"check":"full capacity","expected":[2,3],"passed":true},{"actual":[3],"check":"single bidder","expected":[3],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"largest remainder is not first\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"strict larger remainder later\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"multiple residual units\", \"actual\": [1, 1, 0], \"expected\": [1, 1, 0], \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"full capacity\", \"actual\": [2, 3], \"expected\": [2, 3], \"passed\": true}, {\"check\": \"single bidder\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}