{"abstract":"The clock treats spare supply as negative excess or reverses shortage.","category":"Auction allocation rules","checks":10,"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 excess-demand: Report only unmet demand on each lot.","contract_signature":"x","evaluation_group":"s3-auction-clock-demand","failed_approach":"The attempted repair uses [max(0,s-q) for q,s in zip(x[\"old\"],x[\"supply\"])]; the explicit regression cases demonstrate that this still violates the stipulated auction rule.","family":"s3-auction-allocation-rules-clock-demand-excess-demand","id":"FA-56611","implementations":{"attempt":{"sha256":"1f75a96f9f20fdc423e7f8b7818c5ac6e9e4b8d3217488757daa3f7bc428c8b8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    v0 = [min(o,r) if a else o for o,r,a in zip(x[\"old\"],x[\"requested\"],x[\"accepted\"])]\n    v1 = [0 if e else q for e,q in zip(x[\"exited\"],x[\"requested\"])]\n    v2 = [p if a else old for p,old,a in zip(x[\"prices\"],x[\"previous_prices\"],x[\"accepted\"])]\n    v3 = [min(q,c) for q,c in zip(x[\"requested\"],x[\"caps\"])]\n    v4 = [max(0,s-q) for q,s in zip(x[\"old\"],x[\"supply\"])]\n    v5 = [i for i,(q,s) in enumerate(zip(x[\"old\"],x[\"supply\"])) if q>s]\n    v6 = [d if p>=w else o for d,p,w,o in zip(x[\"deferred\"],x[\"prices\"],x[\"withdrawal_prices\"],x[\"old\"])]\n    v7 = all(q<=s for q,s in zip(x[\"old\"],x[\"supply\"]))\n    v8 = [a and p!=o for a,p,o in zip(x[\"accepted\"],x[\"prices\"],x[\"previous_prices\"])]\n    v9 = x[\"old\"] if x[\"round\"]<=x[\"last_round\"] else x[\"requested\"]\n    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}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [('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}, [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]), ('shortage disappears', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [9, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]])]\ndef vary(value):\n if type(value) is int: return value*N\n if isinstance(value,list): return [vary(v) for v in value]\n 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()}\n return value\nfor label, request, expected in fixtures:\n check(label, solve(vary(request))['excess-demand'], expected[N-1])\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":"c831aa1a96fb8cda1379e3a268388cf01d5adf1c3d6e8e07161d51bf17242f73","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    v0 = [min(o,r) if a else o for o,r,a in zip(x[\"old\"],x[\"requested\"],x[\"accepted\"])]\n    v1 = [0 if e else q for e,q in zip(x[\"exited\"],x[\"requested\"])]\n    v2 = [p if a else old for p,old,a in zip(x[\"prices\"],x[\"previous_prices\"],x[\"accepted\"])]\n    v3 = [min(q,c) for q,c in zip(x[\"requested\"],x[\"caps\"])]\n    v4 = [q-s for q,s in zip(x[\"old\"],x[\"supply\"])]\n    v5 = [i for i,(q,s) in enumerate(zip(x[\"old\"],x[\"supply\"])) if q>s]\n    v6 = [d if p>=w else o for d,p,w,o in zip(x[\"deferred\"],x[\"prices\"],x[\"withdrawal_prices\"],x[\"old\"])]\n    v7 = all(q<=s for q,s in zip(x[\"old\"],x[\"supply\"]))\n    v8 = [a and p!=o for a,p,o in zip(x[\"accepted\"],x[\"prices\"],x[\"previous_prices\"])]\n    v9 = x[\"old\"] if x[\"round\"]<=x[\"last_round\"] else x[\"requested\"]\n    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}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [('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}, [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]), ('shortage disappears', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [9, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), ('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}, [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]])]\ndef vary(value):\n if type(value) is int: return value*N\n if isinstance(value,list): return [vary(v) for v in value]\n 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()}\n return value\nfor label, request, expected in fixtures:\n check(label, solve(vary(request))['excess-demand'], expected[N-1])\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":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-auction-allocation-rules-clock-demand-excess-demand","generated_at":"2026-09-29T14:46:08.819295+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline administrative auction model for software failure analysis.","root_cause":"The clock treats spare supply as negative excess or reverses shortage.","sha256":"c4511550315f92abf1f72b9c1b7a174f7543571660d6a79a3e2a506d686e1c38","title":"Clock demand: excess demand · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":44.663,"exit_code":1,"observations":[{"actual":[0,6],"check":"cross lot surplus","expected":[1,0],"passed":false},{"actual":[4,6],"check":"shortage disappears","expected":[0,0],"passed":false},{"actual":[0,0],"check":"normal contract","expected":[1,1],"passed":false},{"actual":[0,0],"check":"unequal demand caps","expected":[1,1],"passed":false},{"actual":[0,0],"check":"balanced lots","expected":[0,0],"passed":true},{"actual":[0,0],"check":"exit at trigger","expected":[1,1],"passed":false},{"actual":[0,0],"check":"all accepted","expected":[1,1],"passed":false},{"actual":[0,0],"check":"none accepted","expected":[1,1],"passed":false},{"actual":[0,0],"check":"no exited lots","expected":[1,1],"passed":false},{"actual":[0,0],"check":"auction reopened","expected":[1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cross lot surplus\", \"actual\": [0, 6], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"shortage disappears\", \"actual\": [4, 6], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"normal contract\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"unequal demand caps\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"balanced lots\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"exit at trigger\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"all accepted\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"none accepted\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"no exited lots\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"auction reopened\", \"actual\": [0, 0], \"expected\": [1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.427,"exit_code":1,"observations":[{"actual":[1,-6],"check":"cross lot surplus","expected":[1,0],"passed":false},{"actual":[-4,-6],"check":"shortage disappears","expected":[0,0],"passed":false},{"actual":[1,1],"check":"normal contract","expected":[1,1],"passed":true},{"actual":[1,1],"check":"unequal demand caps","expected":[1,1],"passed":true},{"actual":[0,0],"check":"balanced lots","expected":[0,0],"passed":true},{"actual":[1,1],"check":"exit at trigger","expected":[1,1],"passed":true},{"actual":[1,1],"check":"all accepted","expected":[1,1],"passed":true},{"actual":[1,1],"check":"none accepted","expected":[1,1],"passed":true},{"actual":[1,1],"check":"no exited lots","expected":[1,1],"passed":true},{"actual":[1,1],"check":"auction reopened","expected":[1,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cross lot surplus\", \"actual\": [1, -6], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"shortage disappears\", \"actual\": [-4, -6], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"normal contract\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"unequal demand caps\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"balanced lots\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"exit at trigger\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"all accepted\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"none accepted\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"no exited lots\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"auction reopened\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}