FAILURE MAP
← Case archive

FA-59121 / Payroll withholding rules / Open access

Group-term life imputed income: employee payment offset · case 01

Employees paying part of the premium after tax still see the full imputed cost.

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

ROOT CAUSE

After-tax employee payments are not subtracted from the imputed cost.

VERIFIED REPAIR

Restore the contract rule at the employee payment offset step: use `imputed = max(0, cost - x['employee_paid'])`.

Unsuccessful approach: The attempt subtracts payments after the floor, producing negative imputed income.

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'] - 5000000)
    cost = Fraction(excess * rate * x['months'], 100000)
    imputed = cost
    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': 7307633, 'age': 24, 'months': 3, 'employee_paid': 19462}, 0), ('regression', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('partial-repair probe', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('partial-repair probe', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 31951582, 'age': 24, 'months': 2, 'employee_paid': 0}, 2695), ('normal control', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('normal control', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('normal control', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368)], [('regression', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('regression', {'coverage': 45748038, 'age': 25, 'months': 3, 'employee_paid': 2480}, 4855), ('partial-repair probe', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('partial-repair probe', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('normal control', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('normal control', {'coverage': 16856564, 'age': 70, 'months': 8, 'employee_paid': 0}, 195396), ('normal control', {'coverage': 9181727, 'age': 25, 'months': 6, 'employee_paid': 0}, 1505)], [('regression', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('regression', {'coverage': 45748038, 'age': 25, 'months': 3, 'employee_paid': 2480}, 4855), ('partial-repair probe', {'coverage': 5000000, 'age': 65, 'months': 8, 'employee_paid': 12759}, 0), ('partial-repair probe', {'coverage': 5000000, 'age': 61, 'months': 12, 'employee_paid': 2761}, 0), ('normal control', {'coverage': 15762067, 'age': 70, 'months': 10, 'employee_paid': 0}, 221699), ('normal control', {'coverage': 5000000, 'age': 25, 'months': 6, 'employee_paid': 0}, 0), ('normal control', {'coverage': 46403884, 'age': 30, 'months': 4, 'employee_paid': 0}, 13249), ('normal control', {'coverage': 5153794, 'age': 25, 'months': 6, 'employee_paid': 0}, 55)], [('regression', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0), ('regression', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('partial-repair probe', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('partial-repair probe', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('normal control', {'coverage': 44993212, 'age': 70, 'months': 2, 'employee_paid': 0}, 164772), ('normal control', {'coverage': 20847001, 'age': 64, 'months': 8, 'employee_paid': 0}, 83672), ('normal control', {'coverage': 15471033, 'age': 66, 'months': 5, 'employee_paid': 0}, 66491), ('normal control', {'coverage': 5000000, 'age': 50, 'months': 9, 'employee_paid': 0}, 0)], [('regression', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('regression', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0), ('partial-repair probe', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('partial-repair probe', {'coverage': 635952, 'age': 25, 'months': 4, 'employee_paid': 16597}, 0), ('normal control', {'coverage': 17670130, 'age': 50, 'months': 11, 'employee_paid': 0}, 32055), ('normal control', {'coverage': 40943559, 'age': 30, 'months': 6, 'employee_paid': 0}, 17253), ('normal control', {'coverage': 5000000, 'age': 64, 'months': 12, 'employee_paid': 0}, 0), ('normal control', {'coverage': 5000000, 'age': 27, 'months': 10, 'employee_paid': 0}, 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 03460Failed
regression 137640Failed
partial-repair probe 200Passed
partial-repair probe 360480Failed
normal control 426952695Passed
normal control 500Passed
normal control 600Passed
normal control 7149368149368Passed

SHA-256 / 9f2888aca3c1358eac59135b270215f243ef6c9b21b2369a382439ffd0e0e108

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'] - 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': 7307633, 'age': 24, 'months': 3, 'employee_paid': 19462}, 0), ('regression', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('partial-repair probe', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('partial-repair probe', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 31951582, 'age': 24, 'months': 2, 'employee_paid': 0}, 2695), ('normal control', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('normal control', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('normal control', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368)], [('regression', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('regression', {'coverage': 45748038, 'age': 25, 'months': 3, 'employee_paid': 2480}, 4855), ('partial-repair probe', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('partial-repair probe', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('normal control', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('normal control', {'coverage': 16856564, 'age': 70, 'months': 8, 'employee_paid': 0}, 195396), ('normal control', {'coverage': 9181727, 'age': 25, 'months': 6, 'employee_paid': 0}, 1505)], [('regression', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('regression', {'coverage': 45748038, 'age': 25, 'months': 3, 'employee_paid': 2480}, 4855), ('partial-repair probe', {'coverage': 5000000, 'age': 65, 'months': 8, 'employee_paid': 12759}, 0), ('partial-repair probe', {'coverage': 5000000, 'age': 61, 'months': 12, 'employee_paid': 2761}, 0), ('normal control', {'coverage': 15762067, 'age': 70, 'months': 10, 'employee_paid': 0}, 221699), ('normal control', {'coverage': 5000000, 'age': 25, 'months': 6, 'employee_paid': 0}, 0), ('normal control', {'coverage': 46403884, 'age': 30, 'months': 4, 'employee_paid': 0}, 13249), ('normal control', {'coverage': 5153794, 'age': 25, 'months': 6, 'employee_paid': 0}, 55)], [('regression', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0), ('regression', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('partial-repair probe', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('partial-repair probe', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('normal control', {'coverage': 44993212, 'age': 70, 'months': 2, 'employee_paid': 0}, 164772), ('normal control', {'coverage': 20847001, 'age': 64, 'months': 8, 'employee_paid': 0}, 83672), ('normal control', {'coverage': 15471033, 'age': 66, 'months': 5, 'employee_paid': 0}, 66491), ('normal control', {'coverage': 5000000, 'age': 50, 'months': 9, 'employee_paid': 0}, 0)], [('regression', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('regression', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0), ('partial-repair probe', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('partial-repair probe', {'coverage': 635952, 'age': 25, 'months': 4, 'employee_paid': 16597}, 0), ('normal control', {'coverage': 17670130, 'age': 50, 'months': 11, 'employee_paid': 0}, 32055), ('normal control', {'coverage': 40943559, 'age': 30, 'months': 6, 'employee_paid': 0}, 17253), ('normal control', {'coverage': 5000000, 'age': 64, 'months': 12, 'employee_paid': 0}, 0), ('normal control', {'coverage': 5000000, 'age': 27, 'months': 10, 'employee_paid': 0}, 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 0-191160Failed
regression 1-11170Failed
partial-repair probe 2-370400Failed
partial-repair probe 3-307410Failed
normal control 426952695Passed
normal control 500Passed
normal control 600Passed
normal control 7149368149368Passed

SHA-256 / ef78e0f016094f69d3278b58e55a4164b6656296c5461978783396e8a424773f

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': 7307633, 'age': 24, 'months': 3, 'employee_paid': 19462}, 0), ('regression', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('partial-repair probe', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('partial-repair probe', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 31951582, 'age': 24, 'months': 2, 'employee_paid': 0}, 2695), ('normal control', {'coverage': 5000000, 'age': 30, 'months': 6, 'employee_paid': 0}, 0), ('normal control', {'coverage': 5000000, 'age': 64, 'months': 3, 'employee_paid': 0}, 0), ('normal control', {'coverage': 23127161, 'age': 70, 'months': 4, 'employee_paid': 0}, 149368)], [('regression', {'coverage': 20685038, 'age': 29, 'months': 4, 'employee_paid': 4881}, 0), ('regression', {'coverage': 45748038, 'age': 25, 'months': 3, 'employee_paid': 2480}, 4855), ('partial-repair probe', {'coverage': 4843457, 'age': 30, 'months': 9, 'employee_paid': 37040}, 0), ('partial-repair probe', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('normal control', {'coverage': 5000000, 'age': 24, 'months': 10, 'employee_paid': 0}, 0), ('normal control', {'coverage': 26680167, 'age': 24, 'months': 8, 'employee_paid': 0}, 8672), ('normal control', {'coverage': 16856564, 'age': 70, 'months': 8, 'employee_paid': 0}, 195396), ('normal control', {'coverage': 9181727, 'age': 25, 'months': 6, 'employee_paid': 0}, 1505)], [('regression', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('regression', {'coverage': 45748038, 'age': 25, 'months': 3, 'employee_paid': 2480}, 4855), ('partial-repair probe', {'coverage': 5000000, 'age': 65, 'months': 8, 'employee_paid': 12759}, 0), ('partial-repair probe', {'coverage': 5000000, 'age': 61, 'months': 12, 'employee_paid': 2761}, 0), ('normal control', {'coverage': 15762067, 'age': 70, 'months': 10, 'employee_paid': 0}, 221699), ('normal control', {'coverage': 5000000, 'age': 25, 'months': 6, 'employee_paid': 0}, 0), ('normal control', {'coverage': 46403884, 'age': 30, 'months': 4, 'employee_paid': 0}, 13249), ('normal control', {'coverage': 5153794, 'age': 25, 'months': 6, 'employee_paid': 0}, 55)], [('regression', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0), ('regression', {'coverage': 19400395, 'age': 25, 'months': 7, 'employee_paid': 36789}, 0), ('partial-repair probe', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('partial-repair probe', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('normal control', {'coverage': 44993212, 'age': 70, 'months': 2, 'employee_paid': 0}, 164772), ('normal control', {'coverage': 20847001, 'age': 64, 'months': 8, 'employee_paid': 0}, 83672), ('normal control', {'coverage': 15471033, 'age': 66, 'months': 5, 'employee_paid': 0}, 66491), ('normal control', {'coverage': 5000000, 'age': 50, 'months': 9, 'employee_paid': 0}, 0)], [('regression', {'coverage': 9261111, 'age': 29, 'months': 1, 'employee_paid': 24425}, 0), ('regression', {'coverage': 22529249, 'age': 29, 'months': 1, 'employee_paid': 38785}, 0), ('partial-repair probe', {'coverage': 20304981, 'age': 29, 'months': 10, 'employee_paid': 12373}, 0), ('partial-repair probe', {'coverage': 635952, 'age': 25, 'months': 4, 'employee_paid': 16597}, 0), ('normal control', {'coverage': 17670130, 'age': 50, 'months': 11, 'employee_paid': 0}, 32055), ('normal control', {'coverage': 40943559, 'age': 30, 'months': 6, 'employee_paid': 0}, 17253), ('normal control', {'coverage': 5000000, 'age': 64, 'months': 12, 'employee_paid': 0}, 0), ('normal control', {'coverage': 5000000, 'age': 27, 'months': 10, 'employee_paid': 0}, 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 000Passed
regression 100Passed
partial-repair probe 200Passed
partial-repair probe 300Passed
normal control 426952695Passed
normal control 500Passed
normal control 600Passed
normal control 7149368149368Passed

SHA-256 / 7c0f06d30892b4fa3dc196f37004286812e69519078e0ad787a0f16ff0dd33e4

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

Case digest / fe8ba393efc0ae9bcb77367d54e5b4836585d557db9a17df9412d0f5330151f0