FA-66226 / Aviation weight and balance / Open access
Nose-load threshold taken as a fraction of main gear load · case 01
Aircraft with a nose load slightly under 5% of gross weight are reported OK.
ROOT CAUSE
The light-nose threshold is 5% of the main gear reaction instead of total weight.
VERIFIED REPAIR
Compare nose reaction with 5% of total weight.
Unsuccessful approach: Making the comparison inclusive flags aircraft exactly at 5%.
Case contract
Input {'items':[[lb,arm]],'main_arm','nose_arm'}. CG at or aft of the main gear -> ['TIP', CG r2]. Otherwise nose reaction = W*(main-CG)/(main-nose), main = W - nose; status 'LIGHT_NOSE' if nose < 5% of total weight else 'OK'. Return [status, nose r1, main r1].
Why this case matters
Ground stability depends on the split of weight between nose and main gear; a CG over or behind the mains tips the aircraft onto its tail.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
w = sum(a for a, _ in x['items'])
m = sum(a * b for a, b in x['items'])
cg = m / w
mg, ng = x['main_arm'], x['nose_arm']
if cg >= mg: return ['TIP', round(cg, 2)]
nose = w * (mg - cg) / (mg - ng)
main = w - nose
status = 'LIGHT_NOSE' if nose < 0.05 * main else 'OK'
return [status, round(nose, 1), round(main, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal ground load', {'items': [[9000.0, 250.0], [1510.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1762.2, 8747.8]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 321.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 54.3, 11445.7]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 331.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 296.5]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 119.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2160.0, 7640.0]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[8891.0, 243.3], [4548.0, 151.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 4549.9, 8889.1]], ['sampled case 2', {'items': [[836.0, 112.7], [2149.0, 136.1], [3914.0, 149.9]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 4891.9, 2007.1]], ['sampled case 3', {'items': [[2341.0, 136.2], [1333.0, 147.9], [1880.0, 155.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 3207.8, 2346.2]], ['regression: light nose threshold base', {'items': [[2902.0, 309.7], [1628.0, 157.6], [4309.0, 301.9]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 428.4, 8410.6]]], [['normal ground load', {'items': [[9000.0, 250.0], [1520.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1763.5, 8756.5]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 322.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 43.5, 11456.5]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 332.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 296.75]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 118.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2163.5, 7636.5]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[966.0, 212.0], [6090.0, 178.6], [4538.0, 174.9], [1442.0, 103.6]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 7356.6, 5679.4]], ['sampled case 2', {'items': [[4506.0, 204.0], [8513.0, 219.6]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 3947.3, 9071.7]], ['sampled case 3', {'items': [[8984.0, 243.5], [6602.0, 268.8]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 2655.8, 12930.2]], ['regression: light nose threshold base', {'items': [[4714.0, 318.6], [4913.0, 229.1], [5355.0, 287.1]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 719.6, 14262.4]]], [['normal ground load', {'items': [[9000.0, 250.0], [1530.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1764.8, 8765.2]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 323.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 32.6, 11467.4]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 333.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.0]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 117.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2167.0, 7633.0]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[8812.0, 250.9]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 1640.7, 7171.3]], ['sampled case 2', {'items': [[4325.0, 295.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 295.0]], ['sampled case 3', {'items': [[7004.0, 198.3], [410.0, 239.6], [2416.0, 150.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 4350.8, 5479.2]], ['regression: light nose threshold base', {'items': [[4305.0, 318.1], [5187.0, 245.7]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 473.1, 9018.9]]], [['normal ground load', {'items': [[9000.0, 250.0], [1540.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1766.1, 8773.9]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 324.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 21.7, 11478.3]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 334.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.25]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 116.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2170.4, 7629.6]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[1599.0, 205.2]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 645.7, 953.3]], ['sampled case 2', {'items': [[283.0, 287.5], [2116.0, 231.6], [600.0, 209.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 751.1, 2247.9]], ['sampled case 3', {'items': [[2210.0, 260.8]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 258.1, 1951.9]], ['regression: light nose threshold base', {'items': [[8251.0, 294.5], [5827.0, 252.6], [5780.0, 279.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 961.3, 18896.7]]], [['normal ground load', {'items': [[9000.0, 250.0], [1550.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1767.4, 8782.6]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 325.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 10.9, 11489.1]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 335.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.5]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 115.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2173.9, 7626.1]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[649.0, 272.6]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 49.1, 599.9]], ['sampled case 2', {'items': [[6458.0, 136.9], [8392.0, 168.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 8026.7, 6823.3]], ['sampled case 3', {'items': [[8932.0, 311.4]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['TIP', 311.4]], ['regression: light nose threshold base', {'items': [[6453.0, 278.0]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 309.7, 6143.3]]]]
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 |
|---|---|---|---|
| normal ground load | ['OK', 1762.2, 8747.8] | ['OK', 1762.2, 8747.8] | Passed |
| aft cargo light nose | ['LIGHT_NOSE', 54.3, 11445.7] | ['LIGHT_NOSE', 54.3, 11445.7] | Passed |
| CG exactly over mains | ['TIP', 290.0] | ['TIP', 290.0] | Passed |
| tail tipping | ['TIP', 296.5] | ['TIP', 296.5] | Passed |
| nose exactly five percent | ['OK', 500.0, 9500.0] | ['OK', 500.0, 9500.0] | Passed |
| forward loading | ['OK', 2160.0, 7640.0] | ['OK', 2160.0, 7640.0] | Passed |
| CG a hair forward of mains | ['LIGHT_NOSE', 0.2, 9999.8] | ['LIGHT_NOSE', 0.2, 9999.8] | Passed |
| sampled case 1 | ['OK', 4549.9, 8889.1] | ['OK', 4549.9, 8889.1] | Passed |
| sampled case 2 | ['OK', 4891.9, 2007.1] | ['OK', 4891.9, 2007.1] | Passed |
| sampled case 3 | ['OK', 3207.8, 2346.2] | ['OK', 3207.8, 2346.2] | Passed |
| regression: light nose threshold base | ['OK', 428.4, 8410.6] | ['LIGHT_NOSE', 428.4, 8410.6] | Failed |
SHA-256 / 1331f463317c87920a31946a079e70d2f861760683dc522dbea8111d7cd26c94
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
w = sum(a for a, _ in x['items'])
m = sum(a * b for a, b in x['items'])
cg = m / w
mg, ng = x['main_arm'], x['nose_arm']
if cg >= mg: return ['TIP', round(cg, 2)]
nose = w * (mg - cg) / (mg - ng)
main = w - nose
status = 'LIGHT_NOSE' if nose <= 0.05 * w else 'OK'
return [status, round(nose, 1), round(main, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal ground load', {'items': [[9000.0, 250.0], [1510.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1762.2, 8747.8]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 321.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 54.3, 11445.7]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 331.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 296.5]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 119.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2160.0, 7640.0]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[8891.0, 243.3], [4548.0, 151.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 4549.9, 8889.1]], ['sampled case 2', {'items': [[836.0, 112.7], [2149.0, 136.1], [3914.0, 149.9]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 4891.9, 2007.1]], ['sampled case 3', {'items': [[2341.0, 136.2], [1333.0, 147.9], [1880.0, 155.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 3207.8, 2346.2]], ['regression: light nose threshold base', {'items': [[2902.0, 309.7], [1628.0, 157.6], [4309.0, 301.9]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 428.4, 8410.6]]], [['normal ground load', {'items': [[9000.0, 250.0], [1520.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1763.5, 8756.5]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 322.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 43.5, 11456.5]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 332.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 296.75]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 118.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2163.5, 7636.5]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[966.0, 212.0], [6090.0, 178.6], [4538.0, 174.9], [1442.0, 103.6]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 7356.6, 5679.4]], ['sampled case 2', {'items': [[4506.0, 204.0], [8513.0, 219.6]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 3947.3, 9071.7]], ['sampled case 3', {'items': [[8984.0, 243.5], [6602.0, 268.8]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 2655.8, 12930.2]], ['regression: light nose threshold base', {'items': [[4714.0, 318.6], [4913.0, 229.1], [5355.0, 287.1]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 719.6, 14262.4]]], [['normal ground load', {'items': [[9000.0, 250.0], [1530.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1764.8, 8765.2]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 323.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 32.6, 11467.4]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 333.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.0]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 117.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2167.0, 7633.0]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[8812.0, 250.9]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 1640.7, 7171.3]], ['sampled case 2', {'items': [[4325.0, 295.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 295.0]], ['sampled case 3', {'items': [[7004.0, 198.3], [410.0, 239.6], [2416.0, 150.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 4350.8, 5479.2]], ['regression: light nose threshold base', {'items': [[4305.0, 318.1], [5187.0, 245.7]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 473.1, 9018.9]]], [['normal ground load', {'items': [[9000.0, 250.0], [1540.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1766.1, 8773.9]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 324.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 21.7, 11478.3]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 334.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.25]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 116.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2170.4, 7629.6]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[1599.0, 205.2]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 645.7, 953.3]], ['sampled case 2', {'items': [[283.0, 287.5], [2116.0, 231.6], [600.0, 209.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 751.1, 2247.9]], ['sampled case 3', {'items': [[2210.0, 260.8]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 258.1, 1951.9]], ['regression: light nose threshold base', {'items': [[8251.0, 294.5], [5827.0, 252.6], [5780.0, 279.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 961.3, 18896.7]]], [['normal ground load', {'items': [[9000.0, 250.0], [1550.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1767.4, 8782.6]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 325.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 10.9, 11489.1]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 335.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.5]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 115.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2173.9, 7626.1]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[649.0, 272.6]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 49.1, 599.9]], ['sampled case 2', {'items': [[6458.0, 136.9], [8392.0, 168.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 8026.7, 6823.3]], ['sampled case 3', {'items': [[8932.0, 311.4]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['TIP', 311.4]], ['regression: light nose threshold base', {'items': [[6453.0, 278.0]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 309.7, 6143.3]]]]
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 |
|---|---|---|---|
| normal ground load | ['OK', 1762.2, 8747.8] | ['OK', 1762.2, 8747.8] | Passed |
| aft cargo light nose | ['LIGHT_NOSE', 54.3, 11445.7] | ['LIGHT_NOSE', 54.3, 11445.7] | Passed |
| CG exactly over mains | ['TIP', 290.0] | ['TIP', 290.0] | Passed |
| tail tipping | ['TIP', 296.5] | ['TIP', 296.5] | Passed |
| nose exactly five percent | ['LIGHT_NOSE', 500.0, 9500.0] | ['OK', 500.0, 9500.0] | Failed |
| forward loading | ['OK', 2160.0, 7640.0] | ['OK', 2160.0, 7640.0] | Passed |
| CG a hair forward of mains | ['LIGHT_NOSE', 0.2, 9999.8] | ['LIGHT_NOSE', 0.2, 9999.8] | Passed |
| sampled case 1 | ['OK', 4549.9, 8889.1] | ['OK', 4549.9, 8889.1] | Passed |
| sampled case 2 | ['OK', 4891.9, 2007.1] | ['OK', 4891.9, 2007.1] | Passed |
| sampled case 3 | ['OK', 3207.8, 2346.2] | ['OK', 3207.8, 2346.2] | Passed |
| regression: light nose threshold base | ['LIGHT_NOSE', 428.4, 8410.6] | ['LIGHT_NOSE', 428.4, 8410.6] | Passed |
SHA-256 / 0526e8edc1063f062ea574db85d80a15d5daf5f4dd65d7d0fd23061dbce8f228
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
w = sum(a for a, _ in x['items'])
m = sum(a * b for a, b in x['items'])
cg = m / w
mg, ng = x['main_arm'], x['nose_arm']
if cg >= mg: return ['TIP', round(cg, 2)]
nose = w * (mg - cg) / (mg - ng)
main = w - nose
status = 'LIGHT_NOSE' if nose < 0.05 * w else 'OK'
return [status, round(nose, 1), round(main, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal ground load', {'items': [[9000.0, 250.0], [1510.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1762.2, 8747.8]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 321.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 54.3, 11445.7]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 331.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 296.5]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 119.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2160.0, 7640.0]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[8891.0, 243.3], [4548.0, 151.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 4549.9, 8889.1]], ['sampled case 2', {'items': [[836.0, 112.7], [2149.0, 136.1], [3914.0, 149.9]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 4891.9, 2007.1]], ['sampled case 3', {'items': [[2341.0, 136.2], [1333.0, 147.9], [1880.0, 155.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 3207.8, 2346.2]], ['regression: light nose threshold base', {'items': [[2902.0, 309.7], [1628.0, 157.6], [4309.0, 301.9]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 428.4, 8410.6]]], [['normal ground load', {'items': [[9000.0, 250.0], [1520.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1763.5, 8756.5]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 322.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 43.5, 11456.5]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 332.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 296.75]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 118.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2163.5, 7636.5]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[966.0, 212.0], [6090.0, 178.6], [4538.0, 174.9], [1442.0, 103.6]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 7356.6, 5679.4]], ['sampled case 2', {'items': [[4506.0, 204.0], [8513.0, 219.6]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 3947.3, 9071.7]], ['sampled case 3', {'items': [[8984.0, 243.5], [6602.0, 268.8]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 2655.8, 12930.2]], ['regression: light nose threshold base', {'items': [[4714.0, 318.6], [4913.0, 229.1], [5355.0, 287.1]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 719.6, 14262.4]]], [['normal ground load', {'items': [[9000.0, 250.0], [1530.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1764.8, 8765.2]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 323.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 32.6, 11467.4]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 333.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.0]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 117.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2167.0, 7633.0]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[8812.0, 250.9]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 1640.7, 7171.3]], ['sampled case 2', {'items': [[4325.0, 295.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 295.0]], ['sampled case 3', {'items': [[7004.0, 198.3], [410.0, 239.6], [2416.0, 150.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 4350.8, 5479.2]], ['regression: light nose threshold base', {'items': [[4305.0, 318.1], [5187.0, 245.7]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 473.1, 9018.9]]], [['normal ground load', {'items': [[9000.0, 250.0], [1540.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1766.1, 8773.9]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 324.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 21.7, 11478.3]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 334.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.25]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 116.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2170.4, 7629.6]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[1599.0, 205.2]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['OK', 645.7, 953.3]], ['sampled case 2', {'items': [[283.0, 287.5], [2116.0, 231.6], [600.0, 209.2]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 751.1, 2247.9]], ['sampled case 3', {'items': [[2210.0, 260.8]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 258.1, 1951.9]], ['regression: light nose threshold base', {'items': [[8251.0, 294.5], [5827.0, 252.6], [5780.0, 279.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 961.3, 18896.7]]], [['normal ground load', {'items': [[9000.0, 250.0], [1550.0, 260.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 1767.4, 8782.6]], ['aft cargo light nose', {'items': [[9000.0, 280.0], [2500.0, 325.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 10.9, 11489.1]], ['CG exactly over mains', {'items': [[9000.0, 290.0], [1000.0, 290.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 290.0]], ['tail tipping', {'items': [[9000.0, 285.0], [3000.0, 335.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['TIP', 297.5]], ['nose exactly five percent', {'items': [[10000.0, 278.5]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 500.0, 9500.0]], ['forward loading', {'items': [[9000.0, 250.0], [800.0, 115.0]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 2173.9, 7626.1]], ['CG a hair forward of mains', {'items': [[10000.0, 289.995]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['LIGHT_NOSE', 0.2, 9999.8]], ['sampled case 1', {'items': [[649.0, 272.6]], 'main_arm': 290.0, 'nose_arm': 60.0}, ['OK', 49.1, 599.9]], ['sampled case 2', {'items': [[6458.0, 136.9], [8392.0, 168.7]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['OK', 8026.7, 6823.3]], ['sampled case 3', {'items': [[8932.0, 311.4]], 'main_arm': 290.0, 'nose_arm': 80.0}, ['TIP', 311.4]], ['regression: light nose threshold base', {'items': [[6453.0, 278.0]], 'main_arm': 290.0, 'nose_arm': 40.0}, ['LIGHT_NOSE', 309.7, 6143.3]]]]
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 |
|---|---|---|---|
| normal ground load | ['OK', 1762.2, 8747.8] | ['OK', 1762.2, 8747.8] | Passed |
| aft cargo light nose | ['LIGHT_NOSE', 54.3, 11445.7] | ['LIGHT_NOSE', 54.3, 11445.7] | Passed |
| CG exactly over mains | ['TIP', 290.0] | ['TIP', 290.0] | Passed |
| tail tipping | ['TIP', 296.5] | ['TIP', 296.5] | Passed |
| nose exactly five percent | ['OK', 500.0, 9500.0] | ['OK', 500.0, 9500.0] | Passed |
| forward loading | ['OK', 2160.0, 7640.0] | ['OK', 2160.0, 7640.0] | Passed |
| CG a hair forward of mains | ['LIGHT_NOSE', 0.2, 9999.8] | ['LIGHT_NOSE', 0.2, 9999.8] | Passed |
| sampled case 1 | ['OK', 4549.9, 8889.1] | ['OK', 4549.9, 8889.1] | Passed |
| sampled case 2 | ['OK', 4891.9, 2007.1] | ['OK', 4891.9, 2007.1] | Passed |
| sampled case 3 | ['OK', 3207.8, 2346.2] | ['OK', 3207.8, 2346.2] | Passed |
| regression: light nose threshold base | ['LIGHT_NOSE', 428.4, 8410.6] | ['LIGHT_NOSE', 428.4, 8410.6] | Passed |
SHA-256 / d6da9120bf68b16382bb34e02aa537c770ef7f5e2c0b7bcccae131c58eb7f3f5
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.148582+00:00.
Case digest / be99eefa5bd8eb7b4baf3248ccbc0fe5f0f55099576b70624a28144fd2337935