{"abstract":"After moving the computed weight the CG still falls a fraction short of the target.","category":"Aviation weight and balance","checks":10,"contract":"Input [total lb, current CG, target CG, from-station arm, to-station arm]. Weight to move = W*dCG/dArm, rounded UP to a whole pound after clearing float noise at 6 decimals. Same station -> 'ERR_SAME_STATION'; zero dCG -> 0; a move that shifts CG the wrong way -> 'ERR_DIRECTION'.","contract_signature":"x","evaluation_group":"w2-aviation-weight-balance-weight-shift","failed_approach":"Adding one to the truncated value overshoots by a pound whenever the requirement is already a whole number.","family":"w2-aviation-weight-balance-weight-shift-shift-rounding-direction","id":"FA-65961","implementations":{"attempt":{"sha256":"b88d74f331899118fba74a94b75b7751b93a2267e261e185a005543ea14dccaa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    W, cg0, cg1, a_from, a_to = x\n    if a_from == a_to: return 'ERR_SAME_STATION'\n    dcg = cg1 - cg0\n    darm = a_to - a_from\n    if dcg == 0: return 0\n    if (dcg > 0) != (darm > 0): return 'ERR_DIRECTION'\n    moved = W * dcg / darm\n    return int(moved) + 1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['baggage moved aft', [2400, 40.0, 41.1, 70.0, 120.0], 53], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2610, 46.5, 45.0, 140.0, 60.0], 49], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 69.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [3980, 45.3, 44.23, 41.8, 92.7], 'ERR_DIRECTION'], ['sampled case 2', [2707, 38.32, 40.1, 125.8, 85.0], 'ERR_DIRECTION'], ['sampled case 3', [3239, 40.39, 40.5, 103.2, 113.0], 37], ['regression: shift quantity rounding mode', [2550, 42.3, 43.9, 94.3, 94.6], 13600]], [['baggage moved aft', [2400, 40.0, 41.2, 70.0, 120.0], 58], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2620, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 68.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [2415, 40.34, 38.4, 91.5, 122.3], 'ERR_DIRECTION'], ['sampled case 2', [3730, 42.18, 40.8, 132.4, 79.3], 97], ['sampled case 3', [2931, 40.9, 40.9, 127.0, 108.6], 0], ['regression: shift quantity rounding mode', [1800, 39.8, 38.3, 97.3, 95.3], 1350]], [['baggage moved aft', [2400, 40.0, 41.3, 70.0, 120.0], 63], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2630, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 67.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [3390, 43.8, 43.8, 81.2, 142.7], 0], ['sampled case 2', [2280, 42.43, 43.6, 91.3, 32.9], 'ERR_DIRECTION'], ['sampled case 3', [3550, 38.5, 38.5, 60.9, 57.1], 0], ['regression: shift quantity rounding mode', [3330, 41.7, 43.2, 88.2, 103.2], 333]], [['baggage moved aft', [2400, 40.0, 41.4, 70.0, 120.0], 68], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2640, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 66.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [2103, 45.94, 44.79, 82.0, 59.6], 108], ['sampled case 2', [1930, 43.1, 41.2, 104.4, 84.0], 180], ['sampled case 3', [2160, 40.97, 40.7, 113.1, 93.1], 30], ['regression: shift quantity rounding mode', [2860, 40.8, 41.4, 138.1, 138.7], 2860]], [['baggage moved aft', [2400, 40.0, 41.5, 70.0, 120.0], 72], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2650, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 65.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [2243, 42.7, 42.6, 141.2, 133.0], 28], ['sampled case 2', [3954, 45.3, 43.62, 97.4, 126.8], 'ERR_DIRECTION'], ['sampled case 3', [3960, 41.6, 42.67, 35.8, 103.5], 63]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"70a7032202646177e74aeefb5753e5b5aaecea54adf907971ed240ca485cd7be","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    W, cg0, cg1, a_from, a_to = x\n    if a_from == a_to: return 'ERR_SAME_STATION'\n    dcg = cg1 - cg0\n    darm = a_to - a_from\n    if dcg == 0: return 0\n    if (dcg > 0) != (darm > 0): return 'ERR_DIRECTION'\n    moved = W * dcg / darm\n    return round(moved)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['baggage moved aft', [2400, 40.0, 41.1, 70.0, 120.0], 53], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2610, 46.5, 45.0, 140.0, 60.0], 49], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 69.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [3980, 45.3, 44.23, 41.8, 92.7], 'ERR_DIRECTION'], ['sampled case 2', [2707, 38.32, 40.1, 125.8, 85.0], 'ERR_DIRECTION'], ['sampled case 3', [3239, 40.39, 40.5, 103.2, 113.0], 37], ['regression: shift quantity rounding mode', [2550, 42.3, 43.9, 94.3, 94.6], 13600]], [['baggage moved aft', [2400, 40.0, 41.2, 70.0, 120.0], 58], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2620, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 68.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [2415, 40.34, 38.4, 91.5, 122.3], 'ERR_DIRECTION'], ['sampled case 2', [3730, 42.18, 40.8, 132.4, 79.3], 97], ['sampled case 3', [2931, 40.9, 40.9, 127.0, 108.6], 0], ['regression: shift quantity rounding mode', [1800, 39.8, 38.3, 97.3, 95.3], 1350]], [['baggage moved aft', [2400, 40.0, 41.3, 70.0, 120.0], 63], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2630, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 67.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [3390, 43.8, 43.8, 81.2, 142.7], 0], ['sampled case 2', [2280, 42.43, 43.6, 91.3, 32.9], 'ERR_DIRECTION'], ['sampled case 3', [3550, 38.5, 38.5, 60.9, 57.1], 0], ['regression: shift quantity rounding mode', [3330, 41.7, 43.2, 88.2, 103.2], 333]], [['baggage moved aft', [2400, 40.0, 41.4, 70.0, 120.0], 68], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2640, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 66.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [2103, 45.94, 44.79, 82.0, 59.6], 108], ['sampled case 2', [1930, 43.1, 41.2, 104.4, 84.0], 180], ['sampled case 3', [2160, 40.97, 40.7, 113.1, 93.1], 30], ['regression: shift quantity rounding mode', [2860, 40.8, 41.4, 138.1, 138.7], 2860]], [['baggage moved aft', [2400, 40.0, 41.5, 70.0, 120.0], 72], ['exact whole-pound shift', [3000, 42.0, 42.3, 50.0, 140.0], 10], ['shift forward', [2650, 46.5, 45.0, 140.0, 60.0], 50], ['wrong direction request', [2500, 40.0, 41.0, 120.0, 65.0], 'ERR_DIRECTION'], ['already at target', [2300, 43.2, 43.2, 70.0, 120.0], 0], ['same station', [2300, 43.2, 44.0, 95.0, 95.0], 'ERR_SAME_STATION'], ['sampled case 1', [2243, 42.7, 42.6, 141.2, 133.0], 28], ['sampled case 2', [3954, 45.3, 43.62, 97.4, 126.8], 'ERR_DIRECTION'], ['sampled case 3', [3960, 41.6, 42.67, 35.8, 103.5], 63]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-aviation-weight-balance-weight-shift-shift-rounding-direction","generated_at":"2026-09-29T14:47:38.653264+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"The weight-shift formula moves existing load between stations without changing total weight; the answer must be conservative (rounded up).","root_cause":"The result uses nearest rounding, so fractional requirements below one half are rounded down and the target CG is not reached.","sha256":"23721b9b684f560345ddae5aa47fb76df96f9abd33c915225bacf4649f246033","title":"Weight to shift rounded to nearest pound · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.026,"exit_code":1,"observations":[{"actual":53,"check":"baggage moved aft","expected":53,"passed":true},{"actual":10,"check":"exact whole-pound shift","expected":10,"passed":true},{"actual":49,"check":"shift forward","expected":49,"passed":true},{"actual":"ERR_DIRECTION","check":"wrong direction request","expected":"ERR_DIRECTION","passed":true},{"actual":0,"check":"already at target","expected":0,"passed":true},{"actual":"ERR_SAME_STATION","check":"same station","expected":"ERR_SAME_STATION","passed":true},{"actual":"ERR_DIRECTION","check":"sampled case 1","expected":"ERR_DIRECTION","passed":true},{"actual":"ERR_DIRECTION","check":"sampled case 2","expected":"ERR_DIRECTION","passed":true},{"actual":37,"check":"sampled case 3","expected":37,"passed":true},{"actual":13601,"check":"regression: shift quantity rounding mode","expected":13600,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baggage moved aft\", \"actual\": 53, \"expected\": 53, \"passed\": true}, {\"check\": \"exact whole-pound shift\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"shift forward\", \"actual\": 49, \"expected\": 49, \"passed\": true}, {\"check\": \"wrong direction request\", \"actual\": \"ERR_DIRECTION\", \"expected\": \"ERR_DIRECTION\", \"passed\": true}, {\"check\": \"already at target\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"same station\", \"actual\": \"ERR_SAME_STATION\", \"expected\": \"ERR_SAME_STATION\", \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": \"ERR_DIRECTION\", \"expected\": \"ERR_DIRECTION\", \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": \"ERR_DIRECTION\", \"expected\": \"ERR_DIRECTION\", \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": 37, \"expected\": 37, \"passed\": true}, {\"check\": \"regression: shift quantity rounding mode\", \"actual\": 13601, \"expected\": 13600, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.134,"exit_code":1,"observations":[{"actual":53,"check":"baggage moved aft","expected":53,"passed":true},{"actual":10,"check":"exact whole-pound shift","expected":10,"passed":true},{"actual":49,"check":"shift forward","expected":49,"passed":true},{"actual":"ERR_DIRECTION","check":"wrong direction request","expected":"ERR_DIRECTION","passed":true},{"actual":0,"check":"already at target","expected":0,"passed":true},{"actual":"ERR_SAME_STATION","check":"same station","expected":"ERR_SAME_STATION","passed":true},{"actual":"ERR_DIRECTION","check":"sampled case 1","expected":"ERR_DIRECTION","passed":true},{"actual":"ERR_DIRECTION","check":"sampled case 2","expected":"ERR_DIRECTION","passed":true},{"actual":36,"check":"sampled case 3","expected":37,"passed":false},{"actual":13600,"check":"regression: shift quantity rounding mode","expected":13600,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baggage moved aft\", \"actual\": 53, \"expected\": 53, \"passed\": true}, {\"check\": \"exact whole-pound shift\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"shift forward\", \"actual\": 49, \"expected\": 49, \"passed\": true}, {\"check\": \"wrong direction request\", \"actual\": \"ERR_DIRECTION\", \"expected\": \"ERR_DIRECTION\", \"passed\": true}, {\"check\": \"already at target\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"same station\", \"actual\": \"ERR_SAME_STATION\", \"expected\": \"ERR_SAME_STATION\", \"passed\": true}, {\"check\": \"sampled case 1\", \"actual\": \"ERR_DIRECTION\", \"expected\": \"ERR_DIRECTION\", \"passed\": true}, {\"check\": \"sampled case 2\", \"actual\": \"ERR_DIRECTION\", \"expected\": \"ERR_DIRECTION\", \"passed\": true}, {\"check\": \"sampled case 3\", \"actual\": 36, \"expected\": 37, \"passed\": false}, {\"check\": \"regression: shift quantity rounding mode\", \"actual\": 13600, \"expected\": 13600, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}