FAILURE MAP
← Case archive

FA-66326 / Aviation weight and balance / Open access

Tank capacity compared with the fuel weight target · case 01

Ordinary fuel orders are rejected because pounds exceed the gallon capacity number.

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

ROOT CAUSE

The capacity check compares a weight in pounds with a volume in gallons.

VERIFIED REPAIR

Compare onboard plus uplift gallons with tank capacity.

Unsuccessful approach: Checking only the uplift ignores fuel already in the tanks.

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'] / dens - x['onboard_gal']
    if need <= 0: return [dens, 0]
    up = math.ceil(round(need, 6))
    if x['target_lb'] > 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 upliftERR_CAPACITY[6.64, 1423]Failed
cold day upliftERR_CAPACITY[6.84, 1065]Failed
already enough fuel[6.7, 0][6.7, 0]Passed
exact whole gallonsERR_CAPACITY[6.7, 800]Failed
exceeds capacityERR_CAPACITYERR_CAPACITYPassed
fills to exactly capacityERR_CAPACITY[6.7, 2300]Failed
sampled case 1ERR_CAPACITY[6.604, 658]Failed
sampled case 2[6.588, 0][6.588, 0]Passed
sampled case 3ERR_CAPACITY[6.632, 626]Failed

SHA-256 / 17ed7d632470cf5321510ac34b54791db7eab27e399c95ca1ab8491627be8ce1

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'] / dens - x['onboard_gal']
    if need <= 0: return [dens, 0]
    up = math.ceil(round(need, 6))
    if 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 capacity[6.74, 2521]ERR_CAPACITYFailed
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 / 7872337c9a7f446a58a79bb3a85ac93e36f09a0cb9641b7d84d213e92cbb5fac

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

Case digest / d5b5962d30bfe7287c27075e14b456c4d4df9f938a073d1b93cc052964c94af3