FA-95801 / Shipping rate zone lookup / Open access
Ounce tiers: pounds truncated · case 01
A 17 oz parcel is priced as one pound.
ROOT CAUSE
Pounds are floor-divided from ounces.
THE FAILURE
Pounds are floor-divided from ounces.
Unsuccessful approach: Rounding to nearest still prices 17 oz as one pound.
Case contract
Parcels under 16 oz are priced in ounce tiers: ounces rounded up to a whole ounce, tier = ceil(oz/4) capped at 4. 16 oz and above price by pounds = ceil(ounces/16). Zones 1 and 2 share price group 1; zone z >= 3 is group z-1. Return [kind, n, group].
Why this case matters
Lightweight services price by ounce tier before switching to pounds.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ounces, zone):
group = 1 if zone <= 2 else zone - 1
if ounces < 16:
oz = math.ceil(ounces)
return ['OZ', min(4, -(-oz // 4)), group]
return ['LB', int(ounces // 16), group]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['just over a pound', [17, 8], ['LB', 2, 7]], ['generated mix 2', [40, 8], ['LB', 3, 7]], ['small', [3.2, 2], ['OZ', 1, 1]], ['almost a pound', [15.5, 1], ['OZ', 4, 1]], ['two pounds', [32, 9], ['LB', 2, 8]], ['rounded to 13', [12.4, 4], ['OZ', 4, 3]], ['tier two', [4.2, 5], ['OZ', 2, 4]], ['generated mix 7', [33, 2], ['LB', 3, 1]]], [['generated mix 23', [40, 1], ['LB', 3, 1]], ['generated mix 15', [40, 3], ['LB', 3, 2]], ['one pound', [16, 3], ['LB', 1, 2]], ['two pounds', [32, 9], ['LB', 2, 8]], ['rounded to 13', [12.4, 4], ['OZ', 4, 3]], ['tier two', [4.2, 5], ['OZ', 2, 4]], ['generated mix 8', [12.4, 5], ['OZ', 4, 4]], ['generated mix 17', [4.6, 6], ['OZ', 2, 5]]], [['generated mix 51', [24, 6], ['LB', 2, 5]], ['generated mix 46', [40, 8], ['LB', 3, 7]], ['tier edge', [8, 2], ['OZ', 2, 1]], ['small', [3.2, 2], ['OZ', 1, 1]], ['almost a pound', [15.5, 1], ['OZ', 4, 1]], ['just over a pound', [17, 8], ['LB', 2, 7]], ['generated mix 19', [8, 8], ['OZ', 2, 7]], ['generated mix 27', [4.6, 6], ['OZ', 2, 5]]], [['generated mix 69', [24, 5], ['LB', 2, 4]], ['generated mix 62', [40, 4], ['LB', 3, 3]], ['tier two', [4.2, 5], ['OZ', 2, 4]], ['one pound', [16, 3], ['LB', 1, 2]], ['two pounds', [32, 9], ['LB', 2, 8]], ['rounded to 13', [12.4, 4], ['OZ', 4, 3]], ['generated mix 30', [4.6, 7], ['OZ', 2, 6]], ['generated mix 38', [33, 8], ['LB', 3, 7]]], [['generated mix 4', [16.2, 9], ['LB', 2, 8]], ['generated mix 2', [40, 8], ['LB', 3, 7]], ['just over a pound', [17, 8], ['LB', 2, 7]], ['tier edge', [8, 2], ['OZ', 2, 1]], ['small', [3.2, 2], ['OZ', 1, 1]], ['almost a pound', [15.5, 1], ['OZ', 4, 1]], ['generated mix 43', [12.4, 9], ['OZ', 4, 8]], ['generated mix 51', [24, 6], ['LB', 2, 5]]]]
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 |
|---|---|---|---|
| just over a pound | ['LB', 1, 7] | ['LB', 2, 7] | Failed |
| generated mix 2 | ['LB', 2, 7] | ['LB', 3, 7] | Failed |
| small | ['OZ', 1, 1] | ['OZ', 1, 1] | Passed |
| almost a pound | ['OZ', 4, 1] | ['OZ', 4, 1] | Passed |
| two pounds | ['LB', 2, 8] | ['LB', 2, 8] | Passed |
| rounded to 13 | ['OZ', 4, 3] | ['OZ', 4, 3] | Passed |
| tier two | ['OZ', 2, 4] | ['OZ', 2, 4] | Passed |
| generated mix 7 | ['LB', 2, 1] | ['LB', 3, 1] | Failed |
SHA-256 / 98e59994046ff9e7399fbcb05cb00b79763288ac4ed6e495f5d48873925745c2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ounces, zone):
group = 1 if zone <= 2 else zone - 1
if ounces < 16:
oz = math.ceil(ounces)
return ['OZ', min(4, -(-oz // 4)), group]
return ['LB', round(ounces / 16), group]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['just over a pound', [17, 8], ['LB', 2, 7]], ['generated mix 2', [40, 8], ['LB', 3, 7]], ['small', [3.2, 2], ['OZ', 1, 1]], ['almost a pound', [15.5, 1], ['OZ', 4, 1]], ['two pounds', [32, 9], ['LB', 2, 8]], ['rounded to 13', [12.4, 4], ['OZ', 4, 3]], ['tier two', [4.2, 5], ['OZ', 2, 4]], ['generated mix 7', [33, 2], ['LB', 3, 1]]], [['generated mix 23', [40, 1], ['LB', 3, 1]], ['generated mix 15', [40, 3], ['LB', 3, 2]], ['one pound', [16, 3], ['LB', 1, 2]], ['two pounds', [32, 9], ['LB', 2, 8]], ['rounded to 13', [12.4, 4], ['OZ', 4, 3]], ['tier two', [4.2, 5], ['OZ', 2, 4]], ['generated mix 8', [12.4, 5], ['OZ', 4, 4]], ['generated mix 17', [4.6, 6], ['OZ', 2, 5]]], [['generated mix 51', [24, 6], ['LB', 2, 5]], ['generated mix 46', [40, 8], ['LB', 3, 7]], ['tier edge', [8, 2], ['OZ', 2, 1]], ['small', [3.2, 2], ['OZ', 1, 1]], ['almost a pound', [15.5, 1], ['OZ', 4, 1]], ['just over a pound', [17, 8], ['LB', 2, 7]], ['generated mix 19', [8, 8], ['OZ', 2, 7]], ['generated mix 27', [4.6, 6], ['OZ', 2, 5]]], [['generated mix 69', [24, 5], ['LB', 2, 4]], ['generated mix 62', [40, 4], ['LB', 3, 3]], ['tier two', [4.2, 5], ['OZ', 2, 4]], ['one pound', [16, 3], ['LB', 1, 2]], ['two pounds', [32, 9], ['LB', 2, 8]], ['rounded to 13', [12.4, 4], ['OZ', 4, 3]], ['generated mix 30', [4.6, 7], ['OZ', 2, 6]], ['generated mix 38', [33, 8], ['LB', 3, 7]]], [['generated mix 4', [16.2, 9], ['LB', 2, 8]], ['generated mix 2', [40, 8], ['LB', 3, 7]], ['just over a pound', [17, 8], ['LB', 2, 7]], ['tier edge', [8, 2], ['OZ', 2, 1]], ['small', [3.2, 2], ['OZ', 1, 1]], ['almost a pound', [15.5, 1], ['OZ', 4, 1]], ['generated mix 43', [12.4, 9], ['OZ', 4, 8]], ['generated mix 51', [24, 6], ['LB', 2, 5]]]]
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 |
|---|---|---|---|
| just over a pound | ['LB', 1, 7] | ['LB', 2, 7] | Failed |
| generated mix 2 | ['LB', 2, 7] | ['LB', 3, 7] | Failed |
| small | ['OZ', 1, 1] | ['OZ', 1, 1] | Passed |
| almost a pound | ['OZ', 4, 1] | ['OZ', 4, 1] | Passed |
| two pounds | ['LB', 2, 8] | ['LB', 2, 8] | Passed |
| rounded to 13 | ['OZ', 4, 3] | ['OZ', 4, 3] | Passed |
| tier two | ['OZ', 2, 4] | ['OZ', 2, 4] | Passed |
| generated mix 7 | ['LB', 2, 1] | ['LB', 3, 1] | Failed |
SHA-256 / 6aacc374ed947ace89d020323cf93bbde2e881209044a2ec4f468233a235a7da
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 tier sizes and zone groups. 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:16.941387+00:00.
Case digest / d82d54f2cafffaa27c0861da131e96e41c45d6790fdc068d86e3dfb5e3d0b80b