FA-65886 / Aviation weight and balance / Open access
CG verdict reported before the overweight condition · case 01
An overweight aircraft with a forward or aft CG is reported as a CG problem instead of OVERWEIGHT.
ROOT CAUSE
The overweight check was moved to the end, so envelope checks run first on an out-of-limits weight.
VERIFIED REPAIR
Check maximum weight immediately after the empty-weight guard.
Unsuccessful approach: Placing the weight check between the forward and aft checks still reports FWD for overweight forward loads.
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 == 'normal' else 2200
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 'OVERWEIGHT' if w > maxw else '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'], ['regression: overweight check ordering', [2609, 33.3, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2455, 38.7, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2261, 34.31, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2550, 33.05, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2550, 35.9, 'utility'], 'OVERWEIGHT']]]
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 |
|---|---|---|---|
| mid-envelope normal | IN | IN | Passed |
| on sloped forward line | IN | IN | Passed |
| on aft limit utility | IN | IN | Passed |
| utility overweight but normal legal | AFT | OVERWEIGHT | Failed |
| exactly max gross normal | IN | IN | Passed |
| forward of sloped line | FWD | FWD | Passed |
| aft of utility limit | AFT | AFT | Passed |
| below empty weight | ERR_BELOW_EMPTY | ERR_BELOW_EMPTY | Passed |
| exactly empty weight | IN | IN | Passed |
| sampled case 1 | AFT | AFT | Passed |
| sampled case 2 | FWD | FWD | Passed |
| sampled case 3 | AFT | AFT | Passed |
| regression: overweight check ordering | FWD | OVERWEIGHT | Failed |
SHA-256 / 9131f6508328e107b3352d8ca641d35eaee92d9b4f17633649ba3fb279f304a3
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 <= 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 w > maxw: return 'OVERWEIGHT'
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'], ['regression: overweight check ordering', [2609, 33.3, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2455, 38.7, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2261, 34.31, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2550, 33.05, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2550, 35.9, 'utility'], 'OVERWEIGHT']]]
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 |
|---|---|---|---|
| mid-envelope normal | IN | IN | Passed |
| on sloped forward line | IN | IN | Passed |
| on aft limit utility | IN | IN | Passed |
| utility overweight but normal legal | OVERWEIGHT | OVERWEIGHT | Passed |
| exactly max gross normal | IN | IN | Passed |
| forward of sloped line | FWD | FWD | Passed |
| aft of utility limit | AFT | AFT | Passed |
| below empty weight | ERR_BELOW_EMPTY | ERR_BELOW_EMPTY | Passed |
| exactly empty weight | IN | IN | Passed |
| sampled case 1 | AFT | AFT | Passed |
| sampled case 2 | FWD | FWD | Passed |
| sampled case 3 | AFT | AFT | Passed |
| regression: overweight check ordering | FWD | OVERWEIGHT | Failed |
SHA-256 / 25100d4b1f861d30b0ac3588f3b0154c34f18012a86672f906bbc34d69da5f1b
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'], ['regression: overweight check ordering', [2609, 33.3, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2455, 38.7, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2261, 34.31, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2550, 33.05, 'utility'], 'OVERWEIGHT']], [['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'], ['regression: overweight check ordering', [2550, 35.9, 'utility'], 'OVERWEIGHT']]]
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 |
|---|---|---|---|
| mid-envelope normal | IN | IN | Passed |
| on sloped forward line | IN | IN | Passed |
| on aft limit utility | IN | IN | Passed |
| utility overweight but normal legal | OVERWEIGHT | OVERWEIGHT | Passed |
| exactly max gross normal | IN | IN | Passed |
| forward of sloped line | FWD | FWD | Passed |
| aft of utility limit | AFT | AFT | Passed |
| below empty weight | ERR_BELOW_EMPTY | ERR_BELOW_EMPTY | Passed |
| exactly empty weight | IN | IN | Passed |
| sampled case 1 | AFT | AFT | Passed |
| sampled case 2 | FWD | FWD | Passed |
| sampled case 3 | AFT | AFT | Passed |
| regression: overweight check ordering | OVERWEIGHT | OVERWEIGHT | Passed |
SHA-256 / 5b15bb1c8899c9fae1dac28a258baf5f8db8cc5a0fabc33f14884a5178bbe10b
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:38.030959+00:00.
Case digest / a7b0e2bc69b858bddd7bc0c2aa50f27eee65bc3f3c675fd083898e3344379890