FA-66311 / Aviation weight and balance / Open access
Warm fuel treated as denser · case 01
Hot days produce short-fuelled aircraft because too few gallons are ordered.
ROOT CAUSE
The temperature correction increases density as temperature rises.
VERIFIED REPAIR
Density falls by 0.004 lb/gal per degree above 15 C.
Unsuccessful approach: Referencing the correction to 0 C instead of 15 C biases every density low.
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['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| warm day uplift | [6.76, 1390] | [6.64, 1423] | Failed |
| cold day uplift | [6.56, 1121] | [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 capacity | ERR_CAPACITY | ERR_CAPACITY | Passed |
| fills to exactly capacity | [6.7, 2300] | [6.7, 2300] | Passed |
| sampled case 1 | [6.796, 610] | [6.604, 658] | Failed |
| sampled case 2 | [6.812, 0] | [6.588, 0] | Failed |
| sampled case 3 | [6.768, 585] | [6.632, 626] | Failed |
SHA-256 / f31d1782098465e1974d9e8516576f8f3c0b0cf5aad04ea4525f0dd2af9e37dc
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'], 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| warm day uplift | [6.58, 1439] | [6.64, 1423] | Failed |
| cold day uplift | [6.78, 1077] | [6.84, 1065] | Failed |
| already enough fuel | [6.64, 0] | [6.7, 0] | Failed |
| exact whole gallons | [6.64, 810] | [6.7, 800] | Failed |
| exceeds capacity | ERR_CAPACITY | ERR_CAPACITY | Passed |
| fills to exactly capacity | ERR_CAPACITY | [6.7, 2300] | Failed |
| sampled case 1 | [6.544, 674] | [6.604, 658] | Failed |
| sampled case 2 | [6.528, 0] | [6.588, 0] | Failed |
| sampled case 3 | [6.572, 644] | [6.632, 626] | Failed |
SHA-256 / af169d54ad18cc9edc359f0cbd9aaadc7298ebbbce011e14398485da0ce499a8
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 | ERR_CAPACITY | ERR_CAPACITY | Passed |
| 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:41.992025+00:00.
Case digest / da7bed2f375d1cfdd3bbb281b07db31c915822680ea6820786ed9c63095efd38