FAILURE MAP
← Case archive

FA-57741 / Auction allocation rules / Open access

Award installments: due installments · case 01

Future installments are due immediately or the current due tick is skipped.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Future installments are due immediately or the current due tick is skipped.

VERIFIED REPAIR

For due installments, apply the stipulated decision sum(a for a,d in zip(x["amounts"],x["due"]) if d<=x["now"]).

Unsuccessful approach: The attempted repair uses sum(a for a,d in zip(x["amounts"],x["due"]) if d<x["now"]); the explicit regression cases demonstrate that this still violates the stipulated auction rule.

Case contract

A toy award permits staged integer-credit installments. Due amounts are a schedule; paid credits are allocated to earlier due installments first. Delivery release depends on the contractual delivery tranche and disputed tranches remain held. No interest or real payment processing is modeled. Named decision due-installments: For due installments, apply the stipulated decision sum(a for a,d in zip(x["amounts"],x["due"]) if d<=x["now"]).

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 = sum(x["amounts"])
    v1 = [min(a,max(0,x["paid"]-sum(x["amounts"][:i]))) for i,a in enumerate(x["amounts"])]
    v2 = x["paid"]>=sum(x["amounts"][:x["delivery_index"]+1])
    v3 = sum(a for i,a in enumerate(x["amounts"]) if i in x["disputed"])
    v4 = sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"])
    v5 = min(x["refund"],max(0,x["paid"]-x["already_refunded"]))
    v6 = [] if x["cancelled"] else [d for d in x["due"] if d>x["now"]]
    v7 = [x["now"] if x["accelerated"] and d>x["now"] else d for d in x["due"]]
    v8 = x["paid"]+(0 if x["deposit_applied"] else x["deposit"])
    v9 = max(0,x["paid"]-sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"]))
    return {'due-installments':v0,'oldest-tranche-credit':v1,'delivery-tranche-threshold':v2,'disputed-tranche-hold':v3,'waived-tranche-obligation':v4,'refundable-paid-installments':v5,'cancel-future-collection':v6,'accelerated-maturity':v7,'deposit-credit-once':v8,'excess-installment-credit':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('independent equal receipts', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r1', 'r2', 'r1'], 'receipt_amounts': [3, 3, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('nothing paid', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 0, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('fully paid', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 20, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('first due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 2, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [5, 10, 15, 20, 25]), ('before any due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 1, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [0, 0, 0, 0, 0]), ('after all due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 8, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [20, 40, 60, 80, 100]), ('no disputes', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('no waived tranches', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60])]
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))['due-installments'], 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 fixtureActualExpectedOutcome
normal contract2012Failed
independent equal receipts2012Failed
nothing paid2012Failed
fully paid2012Failed
first due205Failed
before any due200Failed
after all due2020Passed
no disputes2012Failed
no waived tranches2012Failed

SHA-256 / a649844e80ed941aca00740a5f75a1344c33c6f2c5bbcc8dbbd96fbf0cf10ee2

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = sum(a for a,d in zip(x["amounts"],x["due"]) if d<x["now"])
    v1 = [min(a,max(0,x["paid"]-sum(x["amounts"][:i]))) for i,a in enumerate(x["amounts"])]
    v2 = x["paid"]>=sum(x["amounts"][:x["delivery_index"]+1])
    v3 = sum(a for i,a in enumerate(x["amounts"]) if i in x["disputed"])
    v4 = sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"])
    v5 = min(x["refund"],max(0,x["paid"]-x["already_refunded"]))
    v6 = [] if x["cancelled"] else [d for d in x["due"] if d>x["now"]]
    v7 = [x["now"] if x["accelerated"] and d>x["now"] else d for d in x["due"]]
    v8 = x["paid"]+(0 if x["deposit_applied"] else x["deposit"])
    v9 = max(0,x["paid"]-sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"]))
    return {'due-installments':v0,'oldest-tranche-credit':v1,'delivery-tranche-threshold':v2,'disputed-tranche-hold':v3,'waived-tranche-obligation':v4,'refundable-paid-installments':v5,'cancel-future-collection':v6,'accelerated-maturity':v7,'deposit-credit-once':v8,'excess-installment-credit':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('independent equal receipts', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r1', 'r2', 'r1'], 'receipt_amounts': [3, 3, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('nothing paid', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 0, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('fully paid', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 20, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('first due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 2, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [5, 10, 15, 20, 25]), ('before any due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 1, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [0, 0, 0, 0, 0]), ('after all due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 8, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [20, 40, 60, 80, 100]), ('no disputes', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('no waived tranches', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60])]
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))['due-installments'], 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 fixtureActualExpectedOutcome
normal contract512Failed
independent equal receipts512Failed
nothing paid512Failed
fully paid512Failed
first due05Failed
before any due00Passed
after all due2020Passed
no disputes512Failed
no waived tranches512Failed

SHA-256 / bbb556bf1392ed6f24a9b0791287db25f69d111e22730a637ec7e68a44d100b6

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = sum(a for a,d in zip(x["amounts"],x["due"]) if d<=x["now"])
    v1 = [min(a,max(0,x["paid"]-sum(x["amounts"][:i]))) for i,a in enumerate(x["amounts"])]
    v2 = x["paid"]>=sum(x["amounts"][:x["delivery_index"]+1])
    v3 = sum(a for i,a in enumerate(x["amounts"]) if i in x["disputed"])
    v4 = sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"])
    v5 = min(x["refund"],max(0,x["paid"]-x["already_refunded"]))
    v6 = [] if x["cancelled"] else [d for d in x["due"] if d>x["now"]]
    v7 = [x["now"] if x["accelerated"] and d>x["now"] else d for d in x["due"]]
    v8 = x["paid"]+(0 if x["deposit_applied"] else x["deposit"])
    v9 = max(0,x["paid"]-sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"]))
    return {'due-installments':v0,'oldest-tranche-credit':v1,'delivery-tranche-threshold':v2,'disputed-tranche-hold':v3,'waived-tranche-obligation':v4,'refundable-paid-installments':v5,'cancel-future-collection':v6,'accelerated-maturity':v7,'deposit-credit-once':v8,'excess-installment-credit':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('independent equal receipts', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r1', 'r2', 'r1'], 'receipt_amounts': [3, 3, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('nothing paid', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 0, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('fully paid', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 20, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('first due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 2, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [5, 10, 15, 20, 25]), ('before any due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 1, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [0, 0, 0, 0, 0]), ('after all due', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 8, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [20, 40, 60, 80, 100]), ('no disputes', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [], 'waived': [0], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60]), ('no waived tranches', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 9, 'delivery_index': 1, 'disputed': [1], 'waived': [], 'refund': 3, 'already_refunded': 1, 'cancelled': False, 'accelerated': False, 'deposit': 4, 'deposit_applied': False, 'receipt_ids': ['r2', 'r1', 'r2'], 'receipt_amounts': [3, 2, 3], 'award_total': 20}, [12, 24, 36, 48, 60])]
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))['due-installments'], 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 fixtureActualExpectedOutcome
normal contract1212Passed
independent equal receipts1212Passed
nothing paid1212Passed
fully paid1212Passed
first due55Passed
before any due00Passed
after all due2020Passed
no disputes1212Passed
no waived tranches1212Passed

SHA-256 / 31de55e084b6716e7930fd5fe5c1861d8f132f2dbe7b6589ff4c6101f43c31e9

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.938193+00:00.

Case digest / ddf6f7b425fa01bdfd4ac260b08cf9db57411ce2db2b5e381962f13a4079a707