FAILURE MAP
← Case archive

FA-65871 / Aviation weight and balance / Open access

Utility category inherits the normal gross weight · case 01

Utility-category flights between 2200 and 2550 lb are accepted and evaluated for CG.

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

ROOT CAUSE

The category test lumps utility together with normal, so the lower utility gross weight is never selected.

VERIFIED REPAIR

Select 2200 lb for utility and 2550 lb for normal before the overweight check.

Unsuccessful approach: Making the comparison inclusive rejects legal max-gross loads while leaving the category limit missing.

Case contract

Input [weight lb, CG in, 'normal'|'utility']. Below 1500 lb -> 'ERR_BELOW_EMPTY'. Max weight 2550 normal / 2200 utility -> 'OVERWEIGHT' first. Forward limit 35.0 in up to 1950 lb then linear to 41.0 in at 2550 lb; aft limit 47.3 normal / 40.5 utility. Limits inclusive; else 'FWD','AFT','IN'.

Why this case matters

A category-dependent CG envelope with a sloped forward boundary; limit lines are part of the approved envelope.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    w, cg, cat = x
    if w < 1500: return 'ERR_BELOW_EMPTY'
    maxw = 2550 if cat in ('normal', 'utility') else 2200
    if w > maxw: return 'OVERWEIGHT'
    if w <= 1950:
        fwd = 35.0
    else:
        fwd = 35.0 + (w - 1950) * (41.0 - 35.0) / (2550 - 1950)
    aft = 47.3 if cat == 'normal' else 40.5
    if cg < fwd - 1e-9: return 'FWD'
    if cg > aft + 1e-9: return 'AFT'
    return 'IN'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['mid-envelope normal', [2110, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2301, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.1, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.1, 'utility'], 'AFT'], ['below empty weight', [1499, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [2415, 48.96, 'normal'], 'AFT'], ['sampled case 2', [2550, 34.9, 'normal'], 'FWD'], ['sampled case 3', [1950, 42.86, 'utility'], 'AFT']], [['mid-envelope normal', [2120, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2302, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.2, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.2, 'utility'], 'AFT'], ['below empty weight', [1498, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 37.89, 'utility'], 'IN'], ['sampled case 2', [2561, 48.01, 'normal'], 'OVERWEIGHT'], ['sampled case 3', [2550, 45.7, 'normal'], 'IN']], [['mid-envelope normal', [2130, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2303, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.3, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.3, 'utility'], 'AFT'], ['below empty weight', [1497, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 34.67, 'utility'], 'FWD'], ['sampled case 2', [1500, 42.58, 'utility'], 'AFT'], ['sampled case 3', [2200, 48.0, 'utility'], 'AFT']], [['mid-envelope normal', [2140, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2304, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.4, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.4, 'utility'], 'AFT'], ['below empty weight', [1496, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [2200, 42.7, 'normal'], 'IN'], ['sampled case 2', [1969, 47.53, 'normal'], 'AFT'], ['sampled case 3', [1500, 48.2, 'normal'], 'AFT']], [['mid-envelope normal', [2150, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2305, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.5, 'normal'], 'IN'], ['aft of utility limit', [2100, 41.5, 'utility'], 'AFT'], ['below empty weight', [1495, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 45.06, 'normal'], 'IN'], ['sampled case 2', [2200, 43.63, 'utility'], 'AFT'], ['sampled case 3', [2200, 41.43, 'normal'], 'IN']]]
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
mid-envelope normalININPassed
on sloped forward lineININPassed
on aft limit utilityININPassed
utility overweight but normal legalAFTOVERWEIGHTFailed
exactly max gross normalININPassed
forward of sloped lineFWDFWDPassed
aft of utility limitAFTAFTPassed
below empty weightERR_BELOW_EMPTYERR_BELOW_EMPTYPassed
exactly empty weightININPassed
sampled case 1AFTAFTPassed
sampled case 2FWDFWDPassed
sampled case 3AFTAFTPassed

SHA-256 / 0e669f722449a588a4eff58fe07dfd1a5b925c1ccf4c80a90071e3bc46f56db7

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    w, cg, cat = x
    if w < 1500: return 'ERR_BELOW_EMPTY'
    maxw = 2550 if cat == 'normal' else 2200
    if w >= maxw: return 'OVERWEIGHT'
    if w <= 1950:
        fwd = 35.0
    else:
        fwd = 35.0 + (w - 1950) * (41.0 - 35.0) / (2550 - 1950)
    aft = 47.3 if cat == 'normal' else 40.5
    if cg < fwd - 1e-9: return 'FWD'
    if cg > aft + 1e-9: return 'AFT'
    return 'IN'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['mid-envelope normal', [2110, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2301, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.1, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.1, 'utility'], 'AFT'], ['below empty weight', [1499, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [2415, 48.96, 'normal'], 'AFT'], ['sampled case 2', [2550, 34.9, 'normal'], 'FWD'], ['sampled case 3', [1950, 42.86, 'utility'], 'AFT']], [['mid-envelope normal', [2120, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2302, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.2, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.2, 'utility'], 'AFT'], ['below empty weight', [1498, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 37.89, 'utility'], 'IN'], ['sampled case 2', [2561, 48.01, 'normal'], 'OVERWEIGHT'], ['sampled case 3', [2550, 45.7, 'normal'], 'IN']], [['mid-envelope normal', [2130, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2303, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.3, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.3, 'utility'], 'AFT'], ['below empty weight', [1497, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 34.67, 'utility'], 'FWD'], ['sampled case 2', [1500, 42.58, 'utility'], 'AFT'], ['sampled case 3', [2200, 48.0, 'utility'], 'AFT']], [['mid-envelope normal', [2140, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2304, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.4, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.4, 'utility'], 'AFT'], ['below empty weight', [1496, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [2200, 42.7, 'normal'], 'IN'], ['sampled case 2', [1969, 47.53, 'normal'], 'AFT'], ['sampled case 3', [1500, 48.2, 'normal'], 'AFT']], [['mid-envelope normal', [2150, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2305, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.5, 'normal'], 'IN'], ['aft of utility limit', [2100, 41.5, 'utility'], 'AFT'], ['below empty weight', [1495, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 45.06, 'normal'], 'IN'], ['sampled case 2', [2200, 43.63, 'utility'], 'AFT'], ['sampled case 3', [2200, 41.43, 'normal'], 'IN']]]
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
mid-envelope normalININPassed
on sloped forward lineININPassed
on aft limit utilityININPassed
utility overweight but normal legalOVERWEIGHTOVERWEIGHTPassed
exactly max gross normalOVERWEIGHTINFailed
forward of sloped lineFWDFWDPassed
aft of utility limitAFTAFTPassed
below empty weightERR_BELOW_EMPTYERR_BELOW_EMPTYPassed
exactly empty weightININPassed
sampled case 1AFTAFTPassed
sampled case 2OVERWEIGHTFWDFailed
sampled case 3AFTAFTPassed

SHA-256 / c6e99e73c5ded318d556de44d469397522114f30d18b484626121d55431d78de

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    w, cg, cat = x
    if w < 1500: return 'ERR_BELOW_EMPTY'
    maxw = 2550 if cat == 'normal' else 2200
    if w > maxw: return 'OVERWEIGHT'
    if w <= 1950:
        fwd = 35.0
    else:
        fwd = 35.0 + (w - 1950) * (41.0 - 35.0) / (2550 - 1950)
    aft = 47.3 if cat == 'normal' else 40.5
    if cg < fwd - 1e-9: return 'FWD'
    if cg > aft + 1e-9: return 'AFT'
    return 'IN'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['mid-envelope normal', [2110, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2301, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.1, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.1, 'utility'], 'AFT'], ['below empty weight', [1499, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [2415, 48.96, 'normal'], 'AFT'], ['sampled case 2', [2550, 34.9, 'normal'], 'FWD'], ['sampled case 3', [1950, 42.86, 'utility'], 'AFT']], [['mid-envelope normal', [2120, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2302, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.2, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.2, 'utility'], 'AFT'], ['below empty weight', [1498, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 37.89, 'utility'], 'IN'], ['sampled case 2', [2561, 48.01, 'normal'], 'OVERWEIGHT'], ['sampled case 3', [2550, 45.7, 'normal'], 'IN']], [['mid-envelope normal', [2130, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2303, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.3, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.3, 'utility'], 'AFT'], ['below empty weight', [1497, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 34.67, 'utility'], 'FWD'], ['sampled case 2', [1500, 42.58, 'utility'], 'AFT'], ['sampled case 3', [2200, 48.0, 'utility'], 'AFT']], [['mid-envelope normal', [2140, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2304, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.4, 'normal'], 'FWD'], ['aft of utility limit', [2100, 41.4, 'utility'], 'AFT'], ['below empty weight', [1496, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [2200, 42.7, 'normal'], 'IN'], ['sampled case 2', [1969, 47.53, 'normal'], 'AFT'], ['sampled case 3', [1500, 48.2, 'normal'], 'AFT']], [['mid-envelope normal', [2150, 42.0, 'normal'], 'IN'], ['on sloped forward line', [2250, 38.0, 'normal'], 'IN'], ['on aft limit utility', [2000, 40.5, 'utility'], 'IN'], ['utility overweight but normal legal', [2305, 42.0, 'utility'], 'OVERWEIGHT'], ['exactly max gross normal', [2550, 41.0, 'normal'], 'IN'], ['forward of sloped line', [2400, 39.5, 'normal'], 'IN'], ['aft of utility limit', [2100, 41.5, 'utility'], 'AFT'], ['below empty weight', [1495, 40.0, 'normal'], 'ERR_BELOW_EMPTY'], ['exactly empty weight', [1500, 36.0, 'utility'], 'IN'], ['sampled case 1', [1950, 45.06, 'normal'], 'IN'], ['sampled case 2', [2200, 43.63, 'utility'], 'AFT'], ['sampled case 3', [2200, 41.43, 'normal'], 'IN']]]
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
mid-envelope normalININPassed
on sloped forward lineININPassed
on aft limit utilityININPassed
utility overweight but normal legalOVERWEIGHTOVERWEIGHTPassed
exactly max gross normalININPassed
forward of sloped lineFWDFWDPassed
aft of utility limitAFTAFTPassed
below empty weightERR_BELOW_EMPTYERR_BELOW_EMPTYPassed
exactly empty weightININPassed
sampled case 1AFTAFTPassed
sampled case 2FWDFWDPassed
sampled case 3AFTAFTPassed

SHA-256 / 9df248af105dacbd8e70f90c709fe7488581c9d78c4c9e4867b1e146821ab25c

Verification & scope

A deterministic toy loading model with stipulated constants; it is not an approved aircraft flight manual procedure and makes no claim of regulatory conformance. 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:47:37.903487+00:00.

Case digest / 0a348d70159d370723f330cb7bf84fc64acb315ffb3bcbf9fd145e74ef76add8