FA-95446 / Shipping rate zone lookup / Open access
Surcharges: partial hundred not charged · case 01
Declared value of $101 to $199 above the allowance is charged for fewer hundreds than required.
ROOT CAUSE
The per-$100 unit count is floored instead of counting any part of $100.
THE FAILURE
The per-$100 unit count is floored instead of counting any part of $100.
Unsuccessful approach: Prorating by the dollar ignores the or-part-thereof rule.
Case contract
Cents. Residential 550; delivery area DAS 395 or EXT 510, plus 100 when the delivery is residential. Fuel = fuel_bp basis points of (base + residential + delivery area), rounded half up to the cent. Declared value (whole dollars): first $100 free, then 105 cents per $100 or part. Return [fuel, declared_value_fee, total].
Why this case matters
Accessorials and fuel are layered on the zone rate in a fixed order.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(base, residential, das, declared, fuel_bp):
res = 550 if residential else 0
das_fee = {'NONE': 0, 'DAS': 395, 'EXT': 510}[das]
if residential and das != 'NONE':
das_fee += 100
subject = base + res + das_fee
fuel = (subject * fuel_bp + 5000) // 10000
excess = max(0, declared - 100)
dv = excess // 100 * 105
return [fuel, dv, subject + fuel + dv]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['declared part hundred', [2000, False, 'NONE', 101, 1000], [200, 105, 2305]], ['declared 250', [2000, True, 'NONE', 250, 1000], [255, 210, 3015]], ['commercial das', [1000, False, 'DAS', 0, 1500], [209, 0, 1604]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['residential ext uplift', [1000, True, 'EXT', 0, 1000], [216, 0, 2376]], ['fuel exact half', [1012, False, 'NONE', 0, 1250], [127, 0, 1139]], ['generated mix 8', [1234, False, 'DAS', 200, 1250], [204, 105, 1938]]], [['generated mix 21', [1500, False, 'NONE', 250, 1850], [278, 210, 1988]], ['generated mix 20', [1000, True, 'DAS', 250, 1500], [307, 210, 2562]], ['fuel exact half', [1012, False, 'NONE', 0, 1250], [127, 0, 1139]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['commercial das', [1000, False, 'DAS', 0, 1500], [209, 0, 1604]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['generated mix 9', [4000, True, 'EXT', 100, 1250], [645, 0, 5805]], ['generated mix 17', [2345, False, 'DAS', 250, 1625], [445, 210, 3395]]], [['generated mix 38', [2345, False, 'DAS', 250, 1250], [343, 210, 3293]], ['generated mix 33', [2000, True, 'EXT', 101, 1850], [585, 105, 3850]], ['declared 250', [2000, True, 'NONE', 250, 1000], [255, 210, 3015]], ['residential ext uplift', [1000, True, 'EXT', 0, 1000], [216, 0, 2376]], ['fuel exact half', [1012, False, 'NONE', 0, 1250], [127, 0, 1139]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['generated mix 20', [1000, True, 'DAS', 250, 1500], [307, 210, 2562]], ['generated mix 28', [1234, False, 'EXT', 100, 1625], [283, 0, 2027]]], [['generated mix 61', [2000, False, 'DAS', 250, 1850], [443, 210, 3048]], ['generated mix 41', [1234, True, 'EXT', 101, 1850], [443, 105, 2942]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['declared part hundred', [2000, False, 'NONE', 101, 1000], [200, 105, 2305]], ['declared 250', [2000, True, 'NONE', 250, 1000], [255, 210, 3015]], ['residential ext uplift', [1000, True, 'EXT', 0, 1000], [216, 0, 2376]], ['generated mix 31', [2345, True, 'DAS', 50, 1850], [627, 0, 4017]], ['generated mix 39', [1234, False, 'DAS', 101, 1500], [244, 105, 1978]]], [['generated mix 5', [1234, False, 'DAS', 150, 1250], [204, 105, 1938]], ['generated mix 61', [2000, False, 'DAS', 250, 1850], [443, 210, 3048]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['commercial das', [1000, False, 'DAS', 0, 1500], [209, 0, 1604]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['declared part hundred', [2000, False, 'NONE', 101, 1000], [200, 105, 2305]], ['generated mix 43', [1000, True, 'EXT', 1000, 1625], [351, 945, 3456]], ['generated mix 51', [2345, False, 'NONE', 250, 1625], [381, 210, 2936]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| declared part hundred | [200, 0, 2200] | [200, 105, 2305] | Failed |
| declared 250 | [255, 105, 2910] | [255, 210, 3015] | Failed |
| commercial das | [209, 0, 1604] | [209, 0, 1604] | Passed |
| half cent up | [125, 0, 1125] | [125, 0, 1125] | Passed |
| declared exactly 100 | [200, 0, 2200] | [200, 0, 2200] | Passed |
| residential ext uplift | [216, 0, 2376] | [216, 0, 2376] | Passed |
| fuel exact half | [127, 0, 1139] | [127, 0, 1139] | Passed |
| generated mix 8 | [204, 105, 1938] | [204, 105, 1938] | Passed |
SHA-256 / 7eb15a0900a427286b58b373a022648838e082b83c7ba5e316b7ca8f75cb0aff
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(base, residential, das, declared, fuel_bp):
res = 550 if residential else 0
das_fee = {'NONE': 0, 'DAS': 395, 'EXT': 510}[das]
if residential and das != 'NONE':
das_fee += 100
subject = base + res + das_fee
fuel = (subject * fuel_bp + 5000) // 10000
excess = max(0, declared - 100)
dv = excess * 105 // 100
return [fuel, dv, subject + fuel + dv]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['declared part hundred', [2000, False, 'NONE', 101, 1000], [200, 105, 2305]], ['declared 250', [2000, True, 'NONE', 250, 1000], [255, 210, 3015]], ['commercial das', [1000, False, 'DAS', 0, 1500], [209, 0, 1604]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['residential ext uplift', [1000, True, 'EXT', 0, 1000], [216, 0, 2376]], ['fuel exact half', [1012, False, 'NONE', 0, 1250], [127, 0, 1139]], ['generated mix 8', [1234, False, 'DAS', 200, 1250], [204, 105, 1938]]], [['generated mix 21', [1500, False, 'NONE', 250, 1850], [278, 210, 1988]], ['generated mix 20', [1000, True, 'DAS', 250, 1500], [307, 210, 2562]], ['fuel exact half', [1012, False, 'NONE', 0, 1250], [127, 0, 1139]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['commercial das', [1000, False, 'DAS', 0, 1500], [209, 0, 1604]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['generated mix 9', [4000, True, 'EXT', 100, 1250], [645, 0, 5805]], ['generated mix 17', [2345, False, 'DAS', 250, 1625], [445, 210, 3395]]], [['generated mix 38', [2345, False, 'DAS', 250, 1250], [343, 210, 3293]], ['generated mix 33', [2000, True, 'EXT', 101, 1850], [585, 105, 3850]], ['declared 250', [2000, True, 'NONE', 250, 1000], [255, 210, 3015]], ['residential ext uplift', [1000, True, 'EXT', 0, 1000], [216, 0, 2376]], ['fuel exact half', [1012, False, 'NONE', 0, 1250], [127, 0, 1139]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['generated mix 20', [1000, True, 'DAS', 250, 1500], [307, 210, 2562]], ['generated mix 28', [1234, False, 'EXT', 100, 1625], [283, 0, 2027]]], [['generated mix 61', [2000, False, 'DAS', 250, 1850], [443, 210, 3048]], ['generated mix 41', [1234, True, 'EXT', 101, 1850], [443, 105, 2942]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['declared part hundred', [2000, False, 'NONE', 101, 1000], [200, 105, 2305]], ['declared 250', [2000, True, 'NONE', 250, 1000], [255, 210, 3015]], ['residential ext uplift', [1000, True, 'EXT', 0, 1000], [216, 0, 2376]], ['generated mix 31', [2345, True, 'DAS', 50, 1850], [627, 0, 4017]], ['generated mix 39', [1234, False, 'DAS', 101, 1500], [244, 105, 1978]]], [['generated mix 5', [1234, False, 'DAS', 150, 1250], [204, 105, 1938]], ['generated mix 61', [2000, False, 'DAS', 250, 1850], [443, 210, 3048]], ['declared exactly 100', [2000, False, 'NONE', 100, 1000], [200, 0, 2200]], ['commercial das', [1000, False, 'DAS', 0, 1500], [209, 0, 1604]], ['half cent up', [1000, False, 'NONE', 0, 1250], [125, 0, 1125]], ['declared part hundred', [2000, False, 'NONE', 101, 1000], [200, 105, 2305]], ['generated mix 43', [1000, True, 'EXT', 1000, 1625], [351, 945, 3456]], ['generated mix 51', [2345, False, 'NONE', 250, 1625], [381, 210, 2936]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| declared part hundred | [200, 1, 2201] | [200, 105, 2305] | Failed |
| declared 250 | [255, 157, 2962] | [255, 210, 3015] | Failed |
| commercial das | [209, 0, 1604] | [209, 0, 1604] | Passed |
| half cent up | [125, 0, 1125] | [125, 0, 1125] | Passed |
| declared exactly 100 | [200, 0, 2200] | [200, 0, 2200] | Passed |
| residential ext uplift | [216, 0, 2376] | [216, 0, 2376] | Passed |
| fuel exact half | [127, 0, 1139] | [127, 0, 1139] | Passed |
| generated mix 8 | [204, 105, 1938] | [204, 105, 1938] | Passed |
SHA-256 / a2cf9e52e56333757d40500faba547b08f206608a3d972114accbe062a068ae8
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Stipulated fee amounts and ordering. 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:52:13.727792+00:00.
Case digest / 1c735ad10a28e9f72c72c69b6fac7b2b4783247357edf3ac1d053fa0876ea5ae