FAILURE MAP
← Case archive

FA-57786 / Auction allocation rules / Open access

Award installments: excess installment credit · case 01

Overpayment disposition ignores waived award tranches or refunds credits still needed for future installments.

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

ROOT CAUSE

Overpayment disposition ignores waived award tranches or refunds credits still needed for future installments.

VERIFIED REPAIR

For excess installment credit, apply the stipulated decision max(0,x["paid"]-sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"])).

Unsuccessful approach: The attempted repair uses max(0,x["paid"]-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 excess-installment-credit: For excess installment credit, apply the stipulated decision max(0,x["paid"]-sum(a for i,a in enumerate(x["amounts"]) if i not in x["waived"])).

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(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(x["amounts"]))
    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 = [('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}, [5, 10, 15, 20, 25]), ('excess after waiver', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 18, '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}, [3, 6, 9, 12, 15]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0])]
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))['excess-installment-credit'], 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
fully paid05Failed
excess after waiver03Failed
first due00Passed
normal contract00Passed
independent equal receipts00Passed
nothing paid00Passed
before any due00Passed
after all due00Passed
no disputes00Passed
no waived tranches00Passed

SHA-256 / ede1ffa1db1e208c67a438a9ee52ab7b23dadd9963e32d4b1f831165aeed8710

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 a,d in zip(x["amounts"],x["due"]) if d<=x["now"]))
    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 = [('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}, [5, 10, 15, 20, 25]), ('excess after waiver', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 18, '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}, [3, 6, 9, 12, 15]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0])]
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))['excess-installment-credit'], 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
fully paid85Failed
excess after waiver63Failed
first due40Failed
normal contract00Passed
independent equal receipts00Passed
nothing paid00Passed
before any due90Failed
after all due00Passed
no disputes00Passed
no waived tranches00Passed

SHA-256 / 86436beb46535a5e8ac493d676c70158963c5c16b9b250dc32715f881bc11eaa

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 = [('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}, [5, 10, 15, 20, 25]), ('excess after waiver', {'amounts': [5, 7, 8], 'due': [2, 4, 6], 'now': 4, 'paid': 18, '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}, [3, 6, 9, 12, 15]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0]), ('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}, [0, 0, 0, 0, 0])]
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))['excess-installment-credit'], 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
fully paid55Passed
excess after waiver33Passed
first due00Passed
normal contract00Passed
independent equal receipts00Passed
nothing paid00Passed
before any due00Passed
after all due00Passed
no disputes00Passed
no waived tranches00Passed

SHA-256 / 74503c58e2da6a11425490c66fe364886df0df3384e8e799e392ede61fcd215c

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

Case digest / 7ef20d9b453963912b673b48e575a0f4cfa26b6350c443a12b396114776abffe