FAILURE MAP
← Case archive

FA-59116 / Payroll withholding rules / Open access

Group-term life imputed income: coverage exclusion · case 01

Employees with modest coverage have imputed income on the first 50,000 of coverage.

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

ROOT CAUSE

The 50,000 exclusion is not subtracted from coverage.

VERIFIED REPAIR

Restore the contract rule at the coverage exclusion step: use `x['coverage'] - 5000000`.

Unsuccessful approach: The attempt subtracts 50,000 cents instead of 50,000 dollars.

Case contract

Input {coverage cents, age, months, employee_paid}. Monthly cost per 1,000.00 of coverage by age band (<25:5, <30:6, <35:8, <40:9, <45:10, <50:15, <55:23, <60:43, <65:66, <70:127, else 206 cents). Excess = max(0, coverage - 50,000.00). Imputed = max(0, excess/100000*rate*months - employee_paid), half-up. Return imputed cents.

Why this case matters

Imputed income for employer-paid life insurance depends on age bands, the 50,000 exclusion and after-tax employee payments.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(x):
    bands = [(25, 5), (30, 6), (35, 8), (40, 9), (45, 10), (50, 15), (55, 23), (60, 43), (65, 66), (70, 127)]
    rate = 206
    for upper, r in bands:
        if x['age'] < upper:
            rate = r
            break
    excess = max(0, x['coverage'])
    cost = Fraction(excess * rate * x['months'], 100000)
    imputed = max(0, cost - x['employee_paid'])
    return math.floor(imputed + Fraction(1, 2))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'coverage': 31951582, 'age': 24, 'months': 2, 'employee_paid': 0}, 2695), ('regression', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('normal control', {'coverage': 7307633, 'age': 24, 'months': 3, 'employee_paid': 19462}, 0), ('normal control', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('normal control', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0)], [('regression', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('regression', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('partial-repair probe', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('normal control', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('normal control', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('normal control', {'coverage': 635952, 'age': 25, 'months': 4, 'employee_paid': 16597}, 0), ('normal control', {'coverage': 5000000, 'age': 29, 'months': 2, 'employee_paid': 22644}, 0)], [('regression', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('regression', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('partial-repair probe', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('normal control', {'coverage': 15550480, 'age': 24, 'months': 6, 'employee_paid': 26462}, 0), ('normal control', {'coverage': 10839712, 'age': 47, 'months': 6, 'employee_paid': 13304}, 0), ('normal control', {'coverage': 5000000, 'age': 25, 'months': 6, 'employee_paid': 12164}, 0), ('normal control', {'coverage': 25580732, 'age': 25, 'months': 5, 'employee_paid': 10831}, 0)], [('regression', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('regression', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 16856564, 'age': 70, 'months': 8, 'employee_paid': 0}, 195396), ('partial-repair probe', {'coverage': 9181727, 'age': 25, 'months': 6, 'employee_paid': 0}, 1505), ('normal control', {'coverage': 37417908, 'age': 30, 'months': 2, 'employee_paid': 18235}, 0), ('normal control', {'coverage': 23651725, 'age': 29, 'months': 9, 'employee_paid': 22226}, 0), ('normal control', {'coverage': 5000000, 'age': 29, 'months': 9, 'employee_paid': 46974}, 0), ('normal control', {'coverage': 5000000, 'age': 30, 'months': 4, 'employee_paid': 34676}, 0)], [('regression', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('regression', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('partial-repair probe', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('partial-repair probe', {'coverage': 15762067, 'age': 70, 'months': 10, 'employee_paid': 0}, 221699), ('normal control', {'coverage': 20510722, 'age': 24, 'months': 2, 'employee_paid': 48846}, 0), ('normal control', {'coverage': 24414800, 'age': 24, 'months': 4, 'employee_paid': 35815}, 0), ('normal control', {'coverage': 9498973, 'age': 24, 'months': 7, 'employee_paid': 18100}, 0), ('normal control', {'coverage': 22999814, 'age': 29, 'months': 10, 'employee_paid': 30014}, 0)]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (label, i), 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 031952695Failed
regression 124000Failed
partial-repair probe 299000Failed
partial-repair probe 3190568149368Failed
normal control 400Passed
normal control 500Passed
normal control 600Passed
normal control 700Passed

SHA-256 / aff58dab86f31b05ae283ecece7deab0350a3e06b9d815008ba0c47212f51ee6

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(x):
    bands = [(25, 5), (30, 6), (35, 8), (40, 9), (45, 10), (50, 15), (55, 23), (60, 43), (65, 66), (70, 127)]
    rate = 206
    for upper, r in bands:
        if x['age'] < upper:
            rate = r
            break
    excess = max(0, x['coverage'] - 50000)
    cost = Fraction(excess * rate * x['months'], 100000)
    imputed = max(0, cost - x['employee_paid'])
    return math.floor(imputed + Fraction(1, 2))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'coverage': 31951582, 'age': 24, 'months': 2, 'employee_paid': 0}, 2695), ('regression', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('normal control', {'coverage': 7307633, 'age': 24, 'months': 3, 'employee_paid': 19462}, 0), ('normal control', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('normal control', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0)], [('regression', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('regression', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('partial-repair probe', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('normal control', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('normal control', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('normal control', {'coverage': 635952, 'age': 25, 'months': 4, 'employee_paid': 16597}, 0), ('normal control', {'coverage': 5000000, 'age': 29, 'months': 2, 'employee_paid': 22644}, 0)], [('regression', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('regression', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('partial-repair probe', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('normal control', {'coverage': 15550480, 'age': 24, 'months': 6, 'employee_paid': 26462}, 0), ('normal control', {'coverage': 10839712, 'age': 47, 'months': 6, 'employee_paid': 13304}, 0), ('normal control', {'coverage': 5000000, 'age': 25, 'months': 6, 'employee_paid': 12164}, 0), ('normal control', {'coverage': 25580732, 'age': 25, 'months': 5, 'employee_paid': 10831}, 0)], [('regression', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('regression', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 16856564, 'age': 70, 'months': 8, 'employee_paid': 0}, 195396), ('partial-repair probe', {'coverage': 9181727, 'age': 25, 'months': 6, 'employee_paid': 0}, 1505), ('normal control', {'coverage': 37417908, 'age': 30, 'months': 2, 'employee_paid': 18235}, 0), ('normal control', {'coverage': 23651725, 'age': 29, 'months': 9, 'employee_paid': 22226}, 0), ('normal control', {'coverage': 5000000, 'age': 29, 'months': 9, 'employee_paid': 46974}, 0), ('normal control', {'coverage': 5000000, 'age': 30, 'months': 4, 'employee_paid': 34676}, 0)], [('regression', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('regression', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('partial-repair probe', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('partial-repair probe', {'coverage': 15762067, 'age': 70, 'months': 10, 'employee_paid': 0}, 221699), ('normal control', {'coverage': 20510722, 'age': 24, 'months': 2, 'employee_paid': 48846}, 0), ('normal control', {'coverage': 24414800, 'age': 24, 'months': 4, 'employee_paid': 35815}, 0), ('normal control', {'coverage': 9498973, 'age': 24, 'months': 7, 'employee_paid': 18100}, 0), ('normal control', {'coverage': 22999814, 'age': 29, 'months': 10, 'employee_paid': 30014}, 0)]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (label, i), 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 031902695Failed
regression 123760Failed
partial-repair probe 298010Failed
partial-repair probe 3190156149368Failed
normal control 400Passed
normal control 500Passed
normal control 600Passed
normal control 700Passed

SHA-256 / 64261d2f809a1037b370d2402e7fe44f295db6d5f4d69632628b1b7ae1d222a2

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(x):
    bands = [(25, 5), (30, 6), (35, 8), (40, 9), (45, 10), (50, 15), (55, 23), (60, 43), (65, 66), (70, 127)]
    rate = 206
    for upper, r in bands:
        if x['age'] < upper:
            rate = r
            break
    excess = max(0, x['coverage'] - 5000000)
    cost = Fraction(excess * rate * x['months'], 100000)
    imputed = max(0, cost - x['employee_paid'])
    return math.floor(imputed + Fraction(1, 2))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'coverage': 31951582, 'age': 24, 'months': 2, 'employee_paid': 0}, 2695), ('regression', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('normal control', {'coverage': 7307633, 'age': 24, 'months': 3, 'employee_paid': 19462}, 0), ('normal control', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('normal control', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0)], [('regression', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('regression', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('partial-repair probe', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('normal control', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('normal control', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('normal control', {'coverage': 635952, 'age': 25, 'months': 4, 'employee_paid': 16597}, 0), ('normal control', {'coverage': 5000000, 'age': 29, 'months': 2, 'employee_paid': 22644}, 0)], [('regression', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('regression', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('partial-repair probe', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('normal control', {'coverage': 15550480, 'age': 24, 'months': 6, 'employee_paid': 26462}, 0), ('normal control', {'coverage': 10839712, 'age': 47, 'months': 6, 'employee_paid': 13304}, 0), ('normal control', {'coverage': 5000000, 'age': 25, 'months': 6, 'employee_paid': 12164}, 0), ('normal control', {'coverage': 25580732, 'age': 25, 'months': 5, 'employee_paid': 10831}, 0)], [('regression', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368), ('regression', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('partial-repair probe', {'coverage': 16856564, 'age': 70, 'months': 8, 'employee_paid': 0}, 195396), ('partial-repair probe', {'coverage': 9181727, 'age': 25, 'months': 6, 'employee_paid': 0}, 1505), ('normal control', {'coverage': 37417908, 'age': 30, 'months': 2, 'employee_paid': 18235}, 0), ('normal control', {'coverage': 23651725, 'age': 29, 'months': 9, 'employee_paid': 22226}, 0), ('normal control', {'coverage': 5000000, 'age': 29, 'months': 9, 'employee_paid': 46974}, 0), ('normal control', {'coverage': 5000000, 'age': 30, 'months': 4, 'employee_paid': 34676}, 0)], [('regression', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('regression', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('partial-repair probe', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('partial-repair probe', {'coverage': 15762067, 'age': 70, 'months': 10, 'employee_paid': 0}, 221699), ('normal control', {'coverage': 20510722, 'age': 24, 'months': 2, 'employee_paid': 48846}, 0), ('normal control', {'coverage': 24414800, 'age': 24, 'months': 4, 'employee_paid': 35815}, 0), ('normal control', {'coverage': 9498973, 'age': 24, 'months': 7, 'employee_paid': 18100}, 0), ('normal control', {'coverage': 22999814, 'age': 29, 'months': 10, 'employee_paid': 30014}, 0)]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (label, i), 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 026952695Passed
regression 100Passed
partial-repair probe 200Passed
partial-repair probe 3149368149368Passed
normal control 400Passed
normal control 500Passed
normal control 600Passed
normal control 700Passed

SHA-256 / 7be1eb860d2b0a3fd46e745d3b6960a2401bfed481ebecfce7582763dfee7cbb

Verification & scope

A deterministic teaching model of a stipulated payroll rule with toy thresholds and rates. It makes no claim of conformance to any tax authority, statute or jurisdiction and is not payroll software. 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:33.142400+00:00.

Case digest / 8f0cefce9219a9349ae995aa12dbe4c3167d131cf36e60a9fcea56388731f395