FAILURE MAP
← Case archive

FA-66321 / Aviation weight and balance / Open access

Onboard gallons subtracted from a pound target · case 01

Uplift orders are far too large when fuel is already on board.

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

ROOT CAUSE

The onboard quantity in gallons is subtracted from the target in pounds before conversion.

VERIFIED REPAIR

Convert the target to gallons and then subtract the onboard gallons.

Unsuccessful approach: Using the 15 C density ignores the temperature correction.

Case contract

Input {'temp_c','target_lb','onboard_gal','capacity_gal'}. Jet fuel density = 6.7 - 0.004*(T-15) lb/gal rounded to 3 decimals. Uplift gallons = target/density - onboard, rounded UP to whole gallons (after clearing noise); none needed -> [density, 0]; onboard+uplift above capacity -> 'ERR_CAPACITY'.

Why this case matters

Fuel is ordered in volume but planned in weight; the conversion depends on temperature-corrected density and must not short-fuel the aircraft.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    dens = round(6.7 - 0.004 * (x['temp_c'] - 15), 3)
    need = (x['target_lb'] - x['onboard_gal']) / dens
    if need <= 0: return [dens, 0]
    up = math.ceil(round(need, 6))
    if x['onboard_gal'] + up > x['capacity_gal']: return 'ERR_CAPACITY'
    return [dens, up]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['warm day uplift', {'temp_c': 30, 'target_lb': 12100.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1423]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 251.0, 'capacity_gal': 2800.0}, [6.84, 1065]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 501.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19010.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 39, 'target_lb': 11250.0, 'onboard_gal': 1045.9, 'capacity_gal': 3000.0}, [6.604, 658]], ['sampled case 2', {'temp_c': 43, 'target_lb': 7430.0, 'onboard_gal': 1471.0, 'capacity_gal': 1500.0}, [6.588, 0]], ['sampled case 3', {'temp_c': 32, 'target_lb': 13530.0, 'onboard_gal': 1415.1, 'capacity_gal': 3000.0}, [6.632, 626]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12200.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1438]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 252.0, 'capacity_gal': 2800.0}, [6.84, 1064]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 502.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19020.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': -6, 'target_lb': 17110.0, 'onboard_gal': 738.4, 'capacity_gal': 3000.0}, [6.784, 1784]], ['sampled case 2', {'temp_c': -18, 'target_lb': 12230.0, 'onboard_gal': 914.0, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 3', {'temp_c': -10, 'target_lb': 4890.0, 'onboard_gal': 1152.8, 'capacity_gal': 2800.0}, [6.8, 0]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12300.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1453]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 253.0, 'capacity_gal': 2800.0}, [6.84, 1063]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 503.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19030.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 35, 'target_lb': 9630.0, 'onboard_gal': 1062.7, 'capacity_gal': 3000.0}, [6.62, 392]], ['sampled case 2', {'temp_c': -7, 'target_lb': 18780.0, 'onboard_gal': 704.7, 'capacity_gal': 3000.0}, [6.788, 2062]], ['sampled case 3', {'temp_c': -5, 'target_lb': 6020.0, 'onboard_gal': 776.7, 'capacity_gal': 1500.0}, [6.78, 112]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12400.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1468]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 254.0, 'capacity_gal': 2800.0}, [6.84, 1062]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 504.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19040.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 0, 'target_lb': 12260.0, 'onboard_gal': 149.5, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 2', {'temp_c': -16, 'target_lb': 6400.0, 'onboard_gal': 1488.9, 'capacity_gal': 2800.0}, [6.824, 0]], ['sampled case 3', {'temp_c': 7, 'target_lb': 11810.0, 'onboard_gal': 133.9, 'capacity_gal': 2800.0}, [6.732, 1621]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12500.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1483]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 255.0, 'capacity_gal': 2800.0}, [6.84, 1061]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 505.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19050.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 41, 'target_lb': 11350.0, 'onboard_gal': 968.5, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 2', {'temp_c': 22, 'target_lb': 16520.0, 'onboard_gal': 628.8, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 3', {'temp_c': -22, 'target_lb': 8500.0, 'onboard_gal': 1100.2, 'capacity_gal': 1500.0}, [6.848, 142]]]]
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
warm day uplift[6.64, 1763][6.64, 1423]Failed
cold day uplift[6.84, 1280][6.84, 1065]Failed
already enough fuel[6.7, 373][6.7, 0]Failed
exact whole gallons[6.7, 971][6.7, 800]Failed
exceeds capacityERR_CAPACITYERR_CAPACITYPassed
fills to exactly capacityERR_CAPACITY[6.7, 2300]Failed
sampled case 1[6.604, 1546][6.604, 658]Failed
sampled case 2ERR_CAPACITY[6.588, 0]Failed
sampled case 3ERR_CAPACITY[6.632, 626]Failed

SHA-256 / 0ff6304803aabe9772d9ba4921a485966b81888e7d5c1a813207cfcfb1fcac77

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    dens = round(6.7 - 0.004 * (x['temp_c'] - 15), 3)
    need = x['target_lb'] / 6.7 - x['onboard_gal']
    if need <= 0: return [dens, 0]
    up = math.ceil(round(need, 6))
    if x['onboard_gal'] + up > x['capacity_gal']: return 'ERR_CAPACITY'
    return [dens, up]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['warm day uplift', {'temp_c': 30, 'target_lb': 12100.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1423]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 251.0, 'capacity_gal': 2800.0}, [6.84, 1065]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 501.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19010.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 39, 'target_lb': 11250.0, 'onboard_gal': 1045.9, 'capacity_gal': 3000.0}, [6.604, 658]], ['sampled case 2', {'temp_c': 43, 'target_lb': 7430.0, 'onboard_gal': 1471.0, 'capacity_gal': 1500.0}, [6.588, 0]], ['sampled case 3', {'temp_c': 32, 'target_lb': 13530.0, 'onboard_gal': 1415.1, 'capacity_gal': 3000.0}, [6.632, 626]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12200.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1438]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 252.0, 'capacity_gal': 2800.0}, [6.84, 1064]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 502.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19020.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': -6, 'target_lb': 17110.0, 'onboard_gal': 738.4, 'capacity_gal': 3000.0}, [6.784, 1784]], ['sampled case 2', {'temp_c': -18, 'target_lb': 12230.0, 'onboard_gal': 914.0, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 3', {'temp_c': -10, 'target_lb': 4890.0, 'onboard_gal': 1152.8, 'capacity_gal': 2800.0}, [6.8, 0]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12300.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1453]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 253.0, 'capacity_gal': 2800.0}, [6.84, 1063]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 503.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19030.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 35, 'target_lb': 9630.0, 'onboard_gal': 1062.7, 'capacity_gal': 3000.0}, [6.62, 392]], ['sampled case 2', {'temp_c': -7, 'target_lb': 18780.0, 'onboard_gal': 704.7, 'capacity_gal': 3000.0}, [6.788, 2062]], ['sampled case 3', {'temp_c': -5, 'target_lb': 6020.0, 'onboard_gal': 776.7, 'capacity_gal': 1500.0}, [6.78, 112]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12400.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1468]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 254.0, 'capacity_gal': 2800.0}, [6.84, 1062]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 504.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19040.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 0, 'target_lb': 12260.0, 'onboard_gal': 149.5, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 2', {'temp_c': -16, 'target_lb': 6400.0, 'onboard_gal': 1488.9, 'capacity_gal': 2800.0}, [6.824, 0]], ['sampled case 3', {'temp_c': 7, 'target_lb': 11810.0, 'onboard_gal': 133.9, 'capacity_gal': 2800.0}, [6.732, 1621]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12500.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1483]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 255.0, 'capacity_gal': 2800.0}, [6.84, 1061]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 505.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19050.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 41, 'target_lb': 11350.0, 'onboard_gal': 968.5, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 2', {'temp_c': 22, 'target_lb': 16520.0, 'onboard_gal': 628.8, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 3', {'temp_c': -22, 'target_lb': 8500.0, 'onboard_gal': 1100.2, 'capacity_gal': 1500.0}, [6.848, 142]]]]
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
warm day uplift[6.64, 1406][6.64, 1423]Failed
cold day uplift[6.84, 1093][6.84, 1065]Failed
already enough fuel[6.7, 0][6.7, 0]Passed
exact whole gallons[6.7, 800][6.7, 800]Passed
exceeds capacityERR_CAPACITYERR_CAPACITYPassed
fills to exactly capacity[6.7, 2300][6.7, 2300]Passed
sampled case 1[6.604, 634][6.604, 658]Failed
sampled case 2[6.588, 0][6.588, 0]Passed
sampled case 3[6.632, 605][6.632, 626]Failed

SHA-256 / e07d187f79600fe66862c1e0f09ae5b5080fab202f6a7155ee68c454cae94579

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    dens = round(6.7 - 0.004 * (x['temp_c'] - 15), 3)
    need = x['target_lb'] / dens - x['onboard_gal']
    if need <= 0: return [dens, 0]
    up = math.ceil(round(need, 6))
    if x['onboard_gal'] + up > x['capacity_gal']: return 'ERR_CAPACITY'
    return [dens, up]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['warm day uplift', {'temp_c': 30, 'target_lb': 12100.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1423]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 251.0, 'capacity_gal': 2800.0}, [6.84, 1065]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 501.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19010.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 39, 'target_lb': 11250.0, 'onboard_gal': 1045.9, 'capacity_gal': 3000.0}, [6.604, 658]], ['sampled case 2', {'temp_c': 43, 'target_lb': 7430.0, 'onboard_gal': 1471.0, 'capacity_gal': 1500.0}, [6.588, 0]], ['sampled case 3', {'temp_c': 32, 'target_lb': 13530.0, 'onboard_gal': 1415.1, 'capacity_gal': 3000.0}, [6.632, 626]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12200.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1438]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 252.0, 'capacity_gal': 2800.0}, [6.84, 1064]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 502.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19020.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': -6, 'target_lb': 17110.0, 'onboard_gal': 738.4, 'capacity_gal': 3000.0}, [6.784, 1784]], ['sampled case 2', {'temp_c': -18, 'target_lb': 12230.0, 'onboard_gal': 914.0, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 3', {'temp_c': -10, 'target_lb': 4890.0, 'onboard_gal': 1152.8, 'capacity_gal': 2800.0}, [6.8, 0]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12300.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1453]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 253.0, 'capacity_gal': 2800.0}, [6.84, 1063]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 503.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19030.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 35, 'target_lb': 9630.0, 'onboard_gal': 1062.7, 'capacity_gal': 3000.0}, [6.62, 392]], ['sampled case 2', {'temp_c': -7, 'target_lb': 18780.0, 'onboard_gal': 704.7, 'capacity_gal': 3000.0}, [6.788, 2062]], ['sampled case 3', {'temp_c': -5, 'target_lb': 6020.0, 'onboard_gal': 776.7, 'capacity_gal': 1500.0}, [6.78, 112]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12400.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1468]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 254.0, 'capacity_gal': 2800.0}, [6.84, 1062]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 504.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19040.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 0, 'target_lb': 12260.0, 'onboard_gal': 149.5, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 2', {'temp_c': -16, 'target_lb': 6400.0, 'onboard_gal': 1488.9, 'capacity_gal': 2800.0}, [6.824, 0]], ['sampled case 3', {'temp_c': 7, 'target_lb': 11810.0, 'onboard_gal': 133.9, 'capacity_gal': 2800.0}, [6.732, 1621]]], [['warm day uplift', {'temp_c': 30, 'target_lb': 12500.0, 'onboard_gal': 400.0, 'capacity_gal': 2800.0}, [6.64, 1483]], ['cold day uplift', {'temp_c': -20, 'target_lb': 9000.0, 'onboard_gal': 255.0, 'capacity_gal': 2800.0}, [6.84, 1061]], ['already enough fuel', {'temp_c': 15, 'target_lb': 3000.0, 'onboard_gal': 505.0, 'capacity_gal': 2800.0}, [6.7, 0]], ['exact whole gallons', {'temp_c': 15, 'target_lb': 6700.0, 'onboard_gal': 200.0, 'capacity_gal': 2800.0}, [6.7, 800]], ['exceeds capacity', {'temp_c': 5, 'target_lb': 19050.0, 'onboard_gal': 300.0, 'capacity_gal': 2800.0}, 'ERR_CAPACITY'], ['fills to exactly capacity', {'temp_c': 15, 'target_lb': 18760.0, 'onboard_gal': 500.0, 'capacity_gal': 2800.0}, [6.7, 2300]], ['sampled case 1', {'temp_c': 41, 'target_lb': 11350.0, 'onboard_gal': 968.5, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 2', {'temp_c': 22, 'target_lb': 16520.0, 'onboard_gal': 628.8, 'capacity_gal': 1500.0}, 'ERR_CAPACITY'], ['sampled case 3', {'temp_c': -22, 'target_lb': 8500.0, 'onboard_gal': 1100.2, 'capacity_gal': 1500.0}, [6.848, 142]]]]
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
warm day uplift[6.64, 1423][6.64, 1423]Passed
cold day uplift[6.84, 1065][6.84, 1065]Passed
already enough fuel[6.7, 0][6.7, 0]Passed
exact whole gallons[6.7, 800][6.7, 800]Passed
exceeds capacityERR_CAPACITYERR_CAPACITYPassed
fills to exactly capacity[6.7, 2300][6.7, 2300]Passed
sampled case 1[6.604, 658][6.604, 658]Passed
sampled case 2[6.588, 0][6.588, 0]Passed
sampled case 3[6.632, 626][6.632, 626]Passed

SHA-256 / 7ebbb613bbfba75efe208a24df92d68d0a134943e2c27c126e1d4e13691009f5

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

Case digest / 33684a370b8c0364718cc2b182c80bd8cd5d8fd4bf9e0eb535776adfa89ef3a7