FAILURE MAP
← Case archive

FA-61791 / Options payoff and settlement / Open access

Exercise notice acceptance cutoff: hours and minutes are compared separately · case 01

A 16:45 notice is late against a 17:30 cutoff.

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

ROOT CAUSE

The time test compares hour and minute fields independently.

VERIFIED REPAIR

Compare minutes since midnight.

Unsuccessful approach: A strict comparison of minutes-of-day rejects notices exactly at the cutoff.

Case contract

Inputs expiry date, submission [y,m,d,hh,mm], cutoff [hh,mm], extension minutes and member flag. Notices after the expiry date are "expired"; notices on earlier dates are "accepted"; on the expiry date a notice is accepted if its minute of day <= cutoff (+extension for members), else "late".

Why this case matters

Option expiry, exercise and settlement engines move cash and shares; a wrong branch misstates obligations.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(expiry, submit, cutoff, extension, member):
    e = datetime.date(*expiry)
    y, m, d, hh, mm = submit
    sd = datetime.date(y, m, d)
    if sd > e:
        return 'expired'
    if sd < e:
        return 'accepted'
    limit = cutoff[0] * 60 + cutoff[1] + (extension if member else 0)
    return 'accepted' if hh <= limit // 60 and mm <= limit % 60 else 'late'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression cutoff comparison 1', [[2027, 10, 31], [2027, 10, 31, 15, 59], [16, 0], 0, True], 'accepted'], ['regression cutoff comparison 2', [[2030, 2, 28], [2030, 2, 28, 17, 30], [17, 30], 90, True], 'accepted'], ['partial repair probe 1', [[2020, 3, 1], [2020, 3, 1, 17, 0], [17, 0], 0, False], 'accepted'], ['partial repair probe 2', [[2024, 10, 7], [2024, 10, 7, 16, 0], [16, 0], 0, False], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2029, 6, 27], [2029, 6, 25, 18, 0], [17, 0], 0, True], 'accepted'], ['normal control 2', [[2027, 1, 3], [2027, 1, 1, 19, 30], [17, 30], 30, True], 'accepted'], ['normal control 3', [[2029, 10, 8], [2029, 10, 3, 15, 59], [16, 0], 30, True], 'accepted']], [['regression cutoff comparison 1', [[2022, 10, 14], [2022, 10, 14, 16, 59], [17, 0], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2025, 5, 8], [2025, 5, 8, 15, 59], [16, 0], 30, False], 'accepted'], ['partial repair probe 1', [[2029, 3, 8], [2029, 3, 8, 17, 30], [17, 0], 30, True], 'accepted'], ['partial repair probe 2', [[2030, 4, 30], [2030, 4, 30, 18, 0], [17, 30], 30, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2022, 12, 21], [2022, 12, 22, 17, 1], [17, 0], 0, True], 'expired'], ['normal control 2', [[2021, 5, 30], [2021, 5, 29, 19, 0], [17, 30], 0, False], 'accepted'], ['normal control 3', [[2021, 11, 29], [2021, 11, 28, 18, 0], [17, 30], 90, False], 'accepted']], [['regression cutoff comparison 1', [[2030, 1, 24], [2030, 1, 24, 14, 30], [16, 0], 30, False], 'accepted'], ['regression cutoff comparison 2', [[2026, 12, 21], [2026, 12, 21, 16, 29], [17, 0], 0, True], 'accepted'], ['partial repair probe 1', [[2028, 4, 25], [2028, 4, 25, 17, 0], [17, 0], 90, False], 'accepted'], ['partial repair probe 2', [[2023, 7, 4], [2023, 7, 4, 16, 0], [16, 0], 0, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2020, 2, 28], [2020, 2, 28, 18, 0], [16, 0], 30, False], 'late'], ['normal control 2', [[2020, 5, 1], [2020, 4, 30, 7, 30], [17, 30], 30, True], 'accepted'], ['normal control 3', [[2025, 4, 1], [2025, 3, 30, 17, 29], [17, 30], 30, True], 'accepted']], [['regression cutoff comparison 1', [[2027, 6, 30], [2027, 6, 30, 15, 30], [17, 0], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2027, 2, 14], [2027, 2, 14, 18, 30], [17, 30], 90, True], 'accepted'], ['partial repair probe 1', [[2030, 11, 18], [2030, 11, 18, 17, 0], [17, 0], 0, True], 'accepted'], ['partial repair probe 2', [[2030, 3, 30], [2030, 3, 30, 17, 0], [17, 0], 0, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2026, 5, 10], [2026, 5, 8, 16, 1], [16, 0], 90, False], 'accepted'], ['normal control 2', [[2024, 3, 7], [2024, 3, 6, 17, 29], [17, 30], 0, True], 'accepted'], ['normal control 3', [[2028, 9, 30], [2028, 9, 30, 16, 1], [16, 0], 0, True], 'late']], [['regression cutoff comparison 1', [[2026, 3, 1], [2026, 3, 1, 16, 59], [17, 30], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2020, 12, 30], [2020, 12, 30, 15, 29], [16, 0], 0, False], 'accepted'], ['partial repair probe 1', [[2026, 12, 18], [2026, 12, 18, 17, 30], [17, 30], 0, False], 'accepted'], ['partial repair probe 2', [[2022, 10, 16], [2022, 10, 16, 16, 0], [16, 0], 90, False], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2026, 9, 30], [2026, 9, 30, 16, 30], [16, 0], 90, False], 'late'], ['normal control 2', [[2027, 6, 25], [2027, 6, 20, 19, 0], [17, 30], 0, False], 'accepted'], ['normal control 3', [[2022, 1, 28], [2022, 1, 27, 6, 0], [16, 0], 30, False], 'accepted']]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
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
regression cutoff comparison 1lateacceptedFailed
regression cutoff comparison 2lateacceptedFailed
partial repair probe 1acceptedacceptedPassed
partial repair probe 2acceptedacceptedPassed
boundary control 1acceptedacceptedPassed
normal control 1acceptedacceptedPassed
normal control 2acceptedacceptedPassed
normal control 3acceptedacceptedPassed

SHA-256 / 2c9d20f09854eb23ae6aea3c0d0369290c85ea1c7bee92b521173b12acb35ac4

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(expiry, submit, cutoff, extension, member):
    e = datetime.date(*expiry)
    y, m, d, hh, mm = submit
    sd = datetime.date(y, m, d)
    if sd > e:
        return 'expired'
    if sd < e:
        return 'accepted'
    limit = cutoff[0] * 60 + cutoff[1] + (extension if member else 0)
    return 'accepted' if hh * 60 + mm < limit else 'late'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression cutoff comparison 1', [[2027, 10, 31], [2027, 10, 31, 15, 59], [16, 0], 0, True], 'accepted'], ['regression cutoff comparison 2', [[2030, 2, 28], [2030, 2, 28, 17, 30], [17, 30], 90, True], 'accepted'], ['partial repair probe 1', [[2020, 3, 1], [2020, 3, 1, 17, 0], [17, 0], 0, False], 'accepted'], ['partial repair probe 2', [[2024, 10, 7], [2024, 10, 7, 16, 0], [16, 0], 0, False], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2029, 6, 27], [2029, 6, 25, 18, 0], [17, 0], 0, True], 'accepted'], ['normal control 2', [[2027, 1, 3], [2027, 1, 1, 19, 30], [17, 30], 30, True], 'accepted'], ['normal control 3', [[2029, 10, 8], [2029, 10, 3, 15, 59], [16, 0], 30, True], 'accepted']], [['regression cutoff comparison 1', [[2022, 10, 14], [2022, 10, 14, 16, 59], [17, 0], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2025, 5, 8], [2025, 5, 8, 15, 59], [16, 0], 30, False], 'accepted'], ['partial repair probe 1', [[2029, 3, 8], [2029, 3, 8, 17, 30], [17, 0], 30, True], 'accepted'], ['partial repair probe 2', [[2030, 4, 30], [2030, 4, 30, 18, 0], [17, 30], 30, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2022, 12, 21], [2022, 12, 22, 17, 1], [17, 0], 0, True], 'expired'], ['normal control 2', [[2021, 5, 30], [2021, 5, 29, 19, 0], [17, 30], 0, False], 'accepted'], ['normal control 3', [[2021, 11, 29], [2021, 11, 28, 18, 0], [17, 30], 90, False], 'accepted']], [['regression cutoff comparison 1', [[2030, 1, 24], [2030, 1, 24, 14, 30], [16, 0], 30, False], 'accepted'], ['regression cutoff comparison 2', [[2026, 12, 21], [2026, 12, 21, 16, 29], [17, 0], 0, True], 'accepted'], ['partial repair probe 1', [[2028, 4, 25], [2028, 4, 25, 17, 0], [17, 0], 90, False], 'accepted'], ['partial repair probe 2', [[2023, 7, 4], [2023, 7, 4, 16, 0], [16, 0], 0, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2020, 2, 28], [2020, 2, 28, 18, 0], [16, 0], 30, False], 'late'], ['normal control 2', [[2020, 5, 1], [2020, 4, 30, 7, 30], [17, 30], 30, True], 'accepted'], ['normal control 3', [[2025, 4, 1], [2025, 3, 30, 17, 29], [17, 30], 30, True], 'accepted']], [['regression cutoff comparison 1', [[2027, 6, 30], [2027, 6, 30, 15, 30], [17, 0], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2027, 2, 14], [2027, 2, 14, 18, 30], [17, 30], 90, True], 'accepted'], ['partial repair probe 1', [[2030, 11, 18], [2030, 11, 18, 17, 0], [17, 0], 0, True], 'accepted'], ['partial repair probe 2', [[2030, 3, 30], [2030, 3, 30, 17, 0], [17, 0], 0, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2026, 5, 10], [2026, 5, 8, 16, 1], [16, 0], 90, False], 'accepted'], ['normal control 2', [[2024, 3, 7], [2024, 3, 6, 17, 29], [17, 30], 0, True], 'accepted'], ['normal control 3', [[2028, 9, 30], [2028, 9, 30, 16, 1], [16, 0], 0, True], 'late']], [['regression cutoff comparison 1', [[2026, 3, 1], [2026, 3, 1, 16, 59], [17, 30], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2020, 12, 30], [2020, 12, 30, 15, 29], [16, 0], 0, False], 'accepted'], ['partial repair probe 1', [[2026, 12, 18], [2026, 12, 18, 17, 30], [17, 30], 0, False], 'accepted'], ['partial repair probe 2', [[2022, 10, 16], [2022, 10, 16, 16, 0], [16, 0], 90, False], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2026, 9, 30], [2026, 9, 30, 16, 30], [16, 0], 90, False], 'late'], ['normal control 2', [[2027, 6, 25], [2027, 6, 20, 19, 0], [17, 30], 0, False], 'accepted'], ['normal control 3', [[2022, 1, 28], [2022, 1, 27, 6, 0], [16, 0], 30, False], 'accepted']]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
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
regression cutoff comparison 1acceptedacceptedPassed
regression cutoff comparison 2acceptedacceptedPassed
partial repair probe 1lateacceptedFailed
partial repair probe 2lateacceptedFailed
boundary control 1acceptedacceptedPassed
normal control 1acceptedacceptedPassed
normal control 2acceptedacceptedPassed
normal control 3acceptedacceptedPassed

SHA-256 / 3feb7ff9348fa939d59c6402101299c636467f54aa005e1beaad25a8dca2e9e2

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(expiry, submit, cutoff, extension, member):
    e = datetime.date(*expiry)
    y, m, d, hh, mm = submit
    sd = datetime.date(y, m, d)
    if sd > e:
        return 'expired'
    if sd < e:
        return 'accepted'
    limit = cutoff[0] * 60 + cutoff[1] + (extension if member else 0)
    return 'accepted' if hh * 60 + mm <= limit else 'late'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression cutoff comparison 1', [[2027, 10, 31], [2027, 10, 31, 15, 59], [16, 0], 0, True], 'accepted'], ['regression cutoff comparison 2', [[2030, 2, 28], [2030, 2, 28, 17, 30], [17, 30], 90, True], 'accepted'], ['partial repair probe 1', [[2020, 3, 1], [2020, 3, 1, 17, 0], [17, 0], 0, False], 'accepted'], ['partial repair probe 2', [[2024, 10, 7], [2024, 10, 7, 16, 0], [16, 0], 0, False], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2029, 6, 27], [2029, 6, 25, 18, 0], [17, 0], 0, True], 'accepted'], ['normal control 2', [[2027, 1, 3], [2027, 1, 1, 19, 30], [17, 30], 30, True], 'accepted'], ['normal control 3', [[2029, 10, 8], [2029, 10, 3, 15, 59], [16, 0], 30, True], 'accepted']], [['regression cutoff comparison 1', [[2022, 10, 14], [2022, 10, 14, 16, 59], [17, 0], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2025, 5, 8], [2025, 5, 8, 15, 59], [16, 0], 30, False], 'accepted'], ['partial repair probe 1', [[2029, 3, 8], [2029, 3, 8, 17, 30], [17, 0], 30, True], 'accepted'], ['partial repair probe 2', [[2030, 4, 30], [2030, 4, 30, 18, 0], [17, 30], 30, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2022, 12, 21], [2022, 12, 22, 17, 1], [17, 0], 0, True], 'expired'], ['normal control 2', [[2021, 5, 30], [2021, 5, 29, 19, 0], [17, 30], 0, False], 'accepted'], ['normal control 3', [[2021, 11, 29], [2021, 11, 28, 18, 0], [17, 30], 90, False], 'accepted']], [['regression cutoff comparison 1', [[2030, 1, 24], [2030, 1, 24, 14, 30], [16, 0], 30, False], 'accepted'], ['regression cutoff comparison 2', [[2026, 12, 21], [2026, 12, 21, 16, 29], [17, 0], 0, True], 'accepted'], ['partial repair probe 1', [[2028, 4, 25], [2028, 4, 25, 17, 0], [17, 0], 90, False], 'accepted'], ['partial repair probe 2', [[2023, 7, 4], [2023, 7, 4, 16, 0], [16, 0], 0, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2020, 2, 28], [2020, 2, 28, 18, 0], [16, 0], 30, False], 'late'], ['normal control 2', [[2020, 5, 1], [2020, 4, 30, 7, 30], [17, 30], 30, True], 'accepted'], ['normal control 3', [[2025, 4, 1], [2025, 3, 30, 17, 29], [17, 30], 30, True], 'accepted']], [['regression cutoff comparison 1', [[2027, 6, 30], [2027, 6, 30, 15, 30], [17, 0], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2027, 2, 14], [2027, 2, 14, 18, 30], [17, 30], 90, True], 'accepted'], ['partial repair probe 1', [[2030, 11, 18], [2030, 11, 18, 17, 0], [17, 0], 0, True], 'accepted'], ['partial repair probe 2', [[2030, 3, 30], [2030, 3, 30, 17, 0], [17, 0], 0, True], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2026, 5, 10], [2026, 5, 8, 16, 1], [16, 0], 90, False], 'accepted'], ['normal control 2', [[2024, 3, 7], [2024, 3, 6, 17, 29], [17, 30], 0, True], 'accepted'], ['normal control 3', [[2028, 9, 30], [2028, 9, 30, 16, 1], [16, 0], 0, True], 'late']], [['regression cutoff comparison 1', [[2026, 3, 1], [2026, 3, 1, 16, 59], [17, 30], 90, False], 'accepted'], ['regression cutoff comparison 2', [[2020, 12, 30], [2020, 12, 30, 15, 29], [16, 0], 0, False], 'accepted'], ['partial repair probe 1', [[2026, 12, 18], [2026, 12, 18, 17, 30], [17, 30], 0, False], 'accepted'], ['partial repair probe 2', [[2022, 10, 16], [2022, 10, 16, 16, 0], [16, 0], 90, False], 'accepted'], ['boundary control 1', [[2024, 6, 21], [2024, 6, 20, 23, 0], [17, 30], 0, False], 'accepted'], ['normal control 1', [[2026, 9, 30], [2026, 9, 30, 16, 30], [16, 0], 90, False], 'late'], ['normal control 2', [[2027, 6, 25], [2027, 6, 20, 19, 0], [17, 30], 0, False], 'accepted'], ['normal control 3', [[2022, 1, 28], [2022, 1, 27, 6, 0], [16, 0], 30, False], 'accepted']]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
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
regression cutoff comparison 1acceptedacceptedPassed
regression cutoff comparison 2acceptedacceptedPassed
partial repair probe 1acceptedacceptedPassed
partial repair probe 2acceptedacceptedPassed
boundary control 1acceptedacceptedPassed
normal control 1acceptedacceptedPassed
normal control 2acceptedacceptedPassed
normal control 3acceptedacceptedPassed

SHA-256 / f55b5ab9afd58a2b43abf20daf038413dafcb7016c63c4d535a417e7b28bcdcf

Verification & scope

A deterministic toy contract stated explicitly in the contract field; no claim of conformance to any exchange or clearing rulebook. 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:58.573540+00:00.

Case digest / 2b0879e6fca3d818cd9ebe3062d21254b29c2a3a176f4879a9884142a7687421