FA-57686 / Auction allocation rules / Open access
Seller supply amendment: inventory revision guard · case 01
A stale seller inventory amendment overwrites later reservations.
ROOT CAUSE
A stale seller inventory amendment overwrites later reservations.
VERIFIED REPAIR
For inventory revision guard, apply the stipulated decision x["expected"]==x["revision"].
Unsuccessful approach: The attempted repair uses True; the explicit regression cases demonstrate that this still violates the stipulated auction rule.
Case contract
An auction seller may amend offered inventory before freeze. Confirmed awards and firm reservations form a floor; rejected amendments retain the previous inventory. Per-lot changes are simultaneous and cannot use removed supply to satisfy prior awards. Named decision inventory-revision-guard: For inventory revision guard, apply the stipulated decision x["expected"]==x["revision"].
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 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
v3 = x["new"] if x["approved"] else x["old"]
v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
v9 = x["expected"]<=x["revision"]
return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('amendment approved / stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True])]
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))['inventory-revision-guard'], 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 |
|---|---|---|---|
| stale inventory revision | True | False | Failed |
| amendment approved / stale inventory revision | True | False | Failed |
| normal contract | True | True | Passed |
| amendment approved | True | True | Passed |
| supply frozen | True | True | Passed |
| below awarded supply | True | True | Passed |
| unchanged supply | True | True | Passed |
| all reserves released | True | True | Passed |
| certified increase | True | True | Passed |
| wrong actor | True | True | Passed |
| all withdrawn | True | True | Passed |
SHA-256 / 6bba45f07aa903863732674c467bd4569a7cb20df7a178477b46bf349b0ff21f
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
v3 = x["new"] if x["approved"] else x["old"]
v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
v9 = True
return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('amendment approved / stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True])]
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))['inventory-revision-guard'], 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 |
|---|---|---|---|
| stale inventory revision | True | False | Failed |
| amendment approved / stale inventory revision | True | False | Failed |
| normal contract | True | True | Passed |
| amendment approved | True | True | Passed |
| supply frozen | True | True | Passed |
| below awarded supply | True | True | Passed |
| unchanged supply | True | True | Passed |
| all reserves released | True | True | Passed |
| certified increase | True | True | Passed |
| wrong actor | True | True | Passed |
| all withdrawn | True | True | Passed |
SHA-256 / 531773279da77143c2b25b6fe65fcb0caf7bdf5acbaa7d90279718c6493dce4d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
v0 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
v3 = x["new"] if x["approved"] else x["old"]
v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
v9 = x["expected"]==x["revision"]
return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('amendment approved / stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True])]
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))['inventory-revision-guard'], 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 |
|---|---|---|---|
| stale inventory revision | False | False | Passed |
| amendment approved / stale inventory revision | False | False | Passed |
| normal contract | True | True | Passed |
| amendment approved | True | True | Passed |
| supply frozen | True | True | Passed |
| below awarded supply | True | True | Passed |
| unchanged supply | True | True | Passed |
| all reserves released | True | True | Passed |
| certified increase | True | True | Passed |
| wrong actor | True | True | Passed |
| all withdrawn | True | True | Passed |
SHA-256 / ab81c7d70a77d8220c08db7d89487d93dbde9f6b965f22c2d7236b8e4cf0b026
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:19.356307+00:00.
Case digest / c5f85b9fd9a87bd76da155268fba6865f6bc0ab56bb47c68903983e297b48969