{"abstract":"Driven oscillators lag the drive phase and resonance peaks shift.","category":"Physics integrator stability","checks":8,"contract":"solve(x0, v0, k, c, F, wf, dt, steps): unit mass x''=-k*x-c*v+F*cos(wf*t) with wf in rad/s, t starting at 0, integrated with classical RK4. Return [x, v, t] rounded to 6.","contract_signature":"x0, v0, k, c, F, wf, dt, steps","evaluation_group":"w2-physics_integrator_stability-forced-oscillator-rk4","failed_approach":"Using t+dt for stage two samples the end of the interval.","family":"w2-physics_integrator_stability-forced-oscillator-rk4-second-stage-time","id":"FA-87001","implementations":{"attempt":{"sha256":"974bc519a09bb51e99d39ec4637865ebb34d4692f5b30ffc36928e6d380a9e20","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x0, v0, k, c, F, wf, dt, steps):\n    def f(t, x, v):\n        return v, -k * x - c * v + F * math.cos(wf * t)\n    t = 0.0\n    x, v = x0, v0\n    for _ in range(steps):\n        k1x, k1v = f(t, x, v)\n        k2x, k2v = f(t + dt, x + dt / 2 * k1x, v + dt / 2 * k1v)\n        k3x, k3v = f(t + dt / 2, x + dt / 2 * k2x, v + dt / 2 * k2v)\n        k4x, k4v = f(t + dt, x + dt * k3x, v + dt * k3v)\n        x = x + dt / 6 * (k1x + 2 * k2x + 2 * k3x + k4x)\n        v = v + dt / 6 * (k1v + 2 * k2v + 2 * k3v + k4v)\n        t = t + dt\n    return [round(x, 6), round(v, 6), round(t, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[-0.109, -0.682, 16.643, 0.151, 1.208, 3.199, 0.05, 3], [-0.171504, -0.13078, 0.15]], [[-0.61, 0.229, 19.238, 1.044, 0.247, 2.469, 0.2, 5], [0.139704, -1.592733, 1.0]], [[0.554, 0.274, 1.952, 1.469, 0.422, 2.192, 0.05, 5], [0.591752, 0.03687, 0.25]], [[0.282, 0.543, 8.523, 0.076, 0.449, 0.819, 0.05, 3], [0.33886, 0.203549, 0.15]], [[0.477, 0.804, 9.463, 0.795, 0.343, 4.866, 0.2, 1], [0.539279, -0.178827, 0.2]], [[-0.227, 0.276, 16.723, 1.386, 1.542, 0.923, 0.05, 4], [-0.091739, 0.96699, 0.2]], [[0.594, 0.724, 5.574, 1.414, 0.54, 2.544, 0.2, 5], [0.050911, -1.000788, 1.0]], [[0.689, 0.052, 16.201, 1.057, 1.522, 3.299, 0.1, 4], [0.142181, -2.089598, 0.4]]], [[[-0.015, -0.728, 3.619, 0.305, 1.759, 0.971, 0.05, 5], [-0.129743, -0.181737, 0.25]], [[0.202, -0.76, 9.287, 0.346, 0.41, 1.102, 0.1, 8], [-0.203071, 0.226236, 0.8]], [[-0.383, 0.162, 14.847, 0.091, 1.671, 1.112, 0.1, 3], [-0.052582, 1.777728, 0.3]], [[-0.254, 0.589, 19.18, 1.426, 1.766, 0.574, 0.2, 2], [0.188947, 1.001027, 0.4]], [[0.35, 0.024, 2.459, 0.489, 1.678, 3.184, 0.2, 2], [0.401172, 0.137673, 0.4]], [[-0.926, 0.952, 5.429, 0.55, 1.365, 4.948, 0.2, 1], [-0.633361, 1.884933, 0.2]], [[-0.492, -0.144, 14.57, 1.424, 1.521, 1.605, 0.05, 3], [-0.421761, 1.012157, 0.15]], [[-0.032, 0.808, 18.227, 0.749, 0.437, 3.703, 0.1, 1], [0.04836, 0.775101, 0.1]]], [[[0.389, 0.616, 7.403, 1.127, 1.629, 2.121, 0.2, 1], [0.470821, 0.193297, 0.2]], [[0.041, 0.318, 13.053, 1.284, 1.13, 3.854, 0.1, 10], [-0.108393, -0.480589, 1.0]], [[0.156, -0.808, 12.089, 0.635, 0.926, 3.013, 0.05, 7], [-0.092465, -0.474045, 0.35]], [[-0.571, 0.019, 10.668, 1.333, 0.813, 4.88, 0.1, 10], [0.238859, -0.217571, 1.0]], [[0.14, -0.995, 4.311, 1.362, 1.859, 1.467, 0.1, 1], [0.053608, -0.732895, 0.1]], [[0.97, 0.167, 11.672, 1.058, 1.37, 3.646, 0.05, 1], [0.965896, -0.326628, 0.05]], [[-0.187, -0.668, 4.72, 0.983, 1.179, 4.274, 0.1, 9], [-0.169823, 0.117475, 0.9]], [[-0.394, 0.849, 18.783, 1.27, 1.837, 1.788, 0.1, 10], [0.047492, -1.406422, 1.0]]], [[[-0.078, 0.138, 15.586, 0.722, 1.531, 2.959, 0.2, 11], [0.289495, 0.434261, 2.2]], [[-0.484, -0.908, 18.372, 0.481, 1.964, 2.315, 0.2, 2], [-0.051507, 2.343495, 0.4]], [[-0.155, 0.536, 12.075, 0.427, 1.31, 1.501, 0.05, 5], [0.046382, 0.960851, 0.25]], [[-0.198, -0.028, 4.048, 0.079, 1.642, 1.588, 0.2, 8], [0.361524, -1.100738, 1.6]], [[-0.772, 0.752, 2.823, 0.497, 1.621, 2.92, 0.1, 6], [0.065151, 1.550767, 0.6]], [[0.978, -0.619, 6.532, 0.841, 1.56, 4.863, 0.1, 5], [0.259021, -2.015912, 0.5]], [[-0.384, 0.592, 12.646, 0.775, 0.505, 4.99, 0.1, 4], [0.075224, 1.216664, 0.4]], [[0.222, 0.427, 18.578, 0.025, 1.284, 1.076, 0.05, 10], [0.064518, -0.805375, 0.5]]], [[[0.96, 0.368, 6.136, 0.868, 0.713, 4.277, 0.1, 13], [-0.632372, -0.226167, 1.3]], [[-0.527, 0.382, 9.694, 0.75, 1.418, 3.954, 0.05, 3], [-0.405723, 1.184269, 0.15]], [[0.855, -0.044, 17.022, 0.515, 0.279, 4.577, 0.05, 7], [0.150264, -3.175431, 0.35]], [[0.48, 0.991, 13.504, 0.938, 1.754, 1.99, 0.2, 8], [-0.112907, 0.598276, 1.6]], [[-0.477, 0.275, 5.669, 0.697, 1.555, 1.138, 0.1, 5], [0.032203, 1.424819, 0.5]], [[0.613, 0.575, 19.459, 1.488, 0.738, 4.191, 0.1, 1], [0.612276, -0.562497, 0.1]], [[-0.789, -0.272, 3.161, 0.072, 0.574, 2.141, 0.2, 5], [0.127601, 1.403065, 1.0]], [[-0.341, 0.921, 14.484, 0.78, 0.993, 4.954, 0.1, 11], [-0.092121, -0.961694, 1.1]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, 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":"648a3a03faecbae89cb118e82d4ef17e93210e487a477a778c7226d89f6264c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x0, v0, k, c, F, wf, dt, steps):\n    def f(t, x, v):\n        return v, -k * x - c * v + F * math.cos(wf * t)\n    t = 0.0\n    x, v = x0, v0\n    for _ in range(steps):\n        k1x, k1v = f(t, x, v)\n        k2x, k2v = f(t, x + dt / 2 * k1x, v + dt / 2 * k1v)\n        k3x, k3v = f(t + dt / 2, x + dt / 2 * k2x, v + dt / 2 * k2v)\n        k4x, k4v = f(t + dt, x + dt * k3x, v + dt * k3v)\n        x = x + dt / 6 * (k1x + 2 * k2x + 2 * k3x + k4x)\n        v = v + dt / 6 * (k1v + 2 * k2v + 2 * k3v + k4v)\n        t = t + dt\n    return [round(x, 6), round(v, 6), round(t, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[-0.109, -0.682, 16.643, 0.151, 1.208, 3.199, 0.05, 3], [-0.171504, -0.13078, 0.15]], [[-0.61, 0.229, 19.238, 1.044, 0.247, 2.469, 0.2, 5], [0.139704, -1.592733, 1.0]], [[0.554, 0.274, 1.952, 1.469, 0.422, 2.192, 0.05, 5], [0.591752, 0.03687, 0.25]], [[0.282, 0.543, 8.523, 0.076, 0.449, 0.819, 0.05, 3], [0.33886, 0.203549, 0.15]], [[0.477, 0.804, 9.463, 0.795, 0.343, 4.866, 0.2, 1], [0.539279, -0.178827, 0.2]], [[-0.227, 0.276, 16.723, 1.386, 1.542, 0.923, 0.05, 4], [-0.091739, 0.96699, 0.2]], [[0.594, 0.724, 5.574, 1.414, 0.54, 2.544, 0.2, 5], [0.050911, -1.000788, 1.0]], [[0.689, 0.052, 16.201, 1.057, 1.522, 3.299, 0.1, 4], [0.142181, -2.089598, 0.4]]], [[[-0.015, -0.728, 3.619, 0.305, 1.759, 0.971, 0.05, 5], [-0.129743, -0.181737, 0.25]], [[0.202, -0.76, 9.287, 0.346, 0.41, 1.102, 0.1, 8], [-0.203071, 0.226236, 0.8]], [[-0.383, 0.162, 14.847, 0.091, 1.671, 1.112, 0.1, 3], [-0.052582, 1.777728, 0.3]], [[-0.254, 0.589, 19.18, 1.426, 1.766, 0.574, 0.2, 2], [0.188947, 1.001027, 0.4]], [[0.35, 0.024, 2.459, 0.489, 1.678, 3.184, 0.2, 2], [0.401172, 0.137673, 0.4]], [[-0.926, 0.952, 5.429, 0.55, 1.365, 4.948, 0.2, 1], [-0.633361, 1.884933, 0.2]], [[-0.492, -0.144, 14.57, 1.424, 1.521, 1.605, 0.05, 3], [-0.421761, 1.012157, 0.15]], [[-0.032, 0.808, 18.227, 0.749, 0.437, 3.703, 0.1, 1], [0.04836, 0.775101, 0.1]]], [[[0.389, 0.616, 7.403, 1.127, 1.629, 2.121, 0.2, 1], [0.470821, 0.193297, 0.2]], [[0.041, 0.318, 13.053, 1.284, 1.13, 3.854, 0.1, 10], [-0.108393, -0.480589, 1.0]], [[0.156, -0.808, 12.089, 0.635, 0.926, 3.013, 0.05, 7], [-0.092465, -0.474045, 0.35]], [[-0.571, 0.019, 10.668, 1.333, 0.813, 4.88, 0.1, 10], [0.238859, -0.217571, 1.0]], [[0.14, -0.995, 4.311, 1.362, 1.859, 1.467, 0.1, 1], [0.053608, -0.732895, 0.1]], [[0.97, 0.167, 11.672, 1.058, 1.37, 3.646, 0.05, 1], [0.965896, -0.326628, 0.05]], [[-0.187, -0.668, 4.72, 0.983, 1.179, 4.274, 0.1, 9], [-0.169823, 0.117475, 0.9]], [[-0.394, 0.849, 18.783, 1.27, 1.837, 1.788, 0.1, 10], [0.047492, -1.406422, 1.0]]], [[[-0.078, 0.138, 15.586, 0.722, 1.531, 2.959, 0.2, 11], [0.289495, 0.434261, 2.2]], [[-0.484, -0.908, 18.372, 0.481, 1.964, 2.315, 0.2, 2], [-0.051507, 2.343495, 0.4]], [[-0.155, 0.536, 12.075, 0.427, 1.31, 1.501, 0.05, 5], [0.046382, 0.960851, 0.25]], [[-0.198, -0.028, 4.048, 0.079, 1.642, 1.588, 0.2, 8], [0.361524, -1.100738, 1.6]], [[-0.772, 0.752, 2.823, 0.497, 1.621, 2.92, 0.1, 6], [0.065151, 1.550767, 0.6]], [[0.978, -0.619, 6.532, 0.841, 1.56, 4.863, 0.1, 5], [0.259021, -2.015912, 0.5]], [[-0.384, 0.592, 12.646, 0.775, 0.505, 4.99, 0.1, 4], [0.075224, 1.216664, 0.4]], [[0.222, 0.427, 18.578, 0.025, 1.284, 1.076, 0.05, 10], [0.064518, -0.805375, 0.5]]], [[[0.96, 0.368, 6.136, 0.868, 0.713, 4.277, 0.1, 13], [-0.632372, -0.226167, 1.3]], [[-0.527, 0.382, 9.694, 0.75, 1.418, 3.954, 0.05, 3], [-0.405723, 1.184269, 0.15]], [[0.855, -0.044, 17.022, 0.515, 0.279, 4.577, 0.05, 7], [0.150264, -3.175431, 0.35]], [[0.48, 0.991, 13.504, 0.938, 1.754, 1.99, 0.2, 8], [-0.112907, 0.598276, 1.6]], [[-0.477, 0.275, 5.669, 0.697, 1.555, 1.138, 0.1, 5], [0.032203, 1.424819, 0.5]], [[0.613, 0.575, 19.459, 1.488, 0.738, 4.191, 0.1, 1], [0.612276, -0.562497, 0.1]], [[-0.789, -0.272, 3.161, 0.072, 0.574, 2.141, 0.2, 5], [0.127601, 1.403065, 1.0]], [[-0.341, 0.921, 14.484, 0.78, 0.993, 4.954, 0.1, 11], [-0.092121, -0.961694, 1.1]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, 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 bounded teaching model with stipulated toy conventions and rounded float output; not a production physics engine or a proof of numerical stability. 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-physics_integrator_stability-forced-oscillator-rk4-second-stage-time","generated_at":"2026-09-29T14:50:54.708765+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Game and robotics physics loops depend on integrator update order, step control and stabilization terms; a wrong decision point turns a stable simulation into drifting or exploding motion.","root_cause":"Stage two evaluates f at t instead of t+dt/2.","sha256":"9d736106f706d3325fc9c45db9f346fb099e0ae7915f5a89f9bb79f64029668e","title":"RK4 second stage samples the forcing at the start of the step · 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.817,"exit_code":1,"observations":[{"actual":[-0.171576,-0.132036,0.15],"check":"case 0","expected":[-0.171504,-0.13078,0.15],"passed":false},{"actual":[0.138371,-1.590801,1.0],"check":"case 1","expected":[0.139704,-1.592733,1.0],"passed":false},{"actual":[0.591707,0.036378,0.25],"check":"case 2","expected":[0.591752,0.03687,0.25],"passed":false},{"actual":[0.338858,0.203517,0.15],"check":"case 3","expected":[0.33886,0.203549,0.15],"passed":false},{"actual":[0.538603,-0.184941,0.2],"check":"case 4","expected":[0.539279,-0.178827,0.2],"passed":false},{"actual":[-0.091755,0.966782,0.2],"check":"case 5","expected":[-0.091739,0.96699,0.2],"passed":false},{"actual":[0.04352,-1.008191,1.0],"check":"case 6","expected":[0.050911,-1.000788,1.0],"passed":false},{"actual":[0.139731,-2.103016,0.4],"check":"case 7","expected":[0.142181,-2.089598,0.4],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [-0.171576, -0.132036, 0.15], \"expected\": [-0.171504, -0.13078, 0.15], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [0.138371, -1.590801, 1.0], \"expected\": [0.139704, -1.592733, 1.0], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [0.591707, 0.036378, 0.25], \"expected\": [0.591752, 0.03687, 0.25], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [0.338858, 0.203517, 0.15], \"expected\": [0.33886, 0.203549, 0.15], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [0.538603, -0.184941, 0.2], \"expected\": [0.539279, -0.178827, 0.2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [-0.091755, 0.966782, 0.2], \"expected\": [-0.091739, 0.96699, 0.2], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [0.04352, -1.008191, 1.0], \"expected\": [0.050911, -1.000788, 1.0], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [0.139731, -2.103016, 0.4], \"expected\": [0.142181, -2.089598, 0.4], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.796,"exit_code":1,"observations":[{"actual":[-0.171458,-0.129866,0.15],"check":"case 0","expected":[-0.171504,-0.13078,0.15],"passed":false},{"actual":[0.141157,-1.593265,1.0],"check":"case 1","expected":[0.139704,-1.592733,1.0],"passed":false},{"actual":[0.591786,0.03728,0.25],"check":"case 2","expected":[0.591752,0.03687,0.25],"passed":false},{"actual":[0.338861,0.203572,0.15],"check":"case 3","expected":[0.33886,0.203549,0.15],"passed":false},{"actual":[0.539523,-0.176619,0.2],"check":"case 4","expected":[0.539279,-0.178827,0.2],"passed":false},{"actual":[-0.091728,0.967156,0.2],"check":"case 5","expected":[-0.091739,0.96699,0.2],"passed":false},{"actual":[0.05745,-0.990845,1.0],"check":"case 6","expected":[0.050911,-1.000788,1.0],"passed":false},{"actual":[0.143993,-2.077818,0.4],"check":"case 7","expected":[0.142181,-2.089598,0.4],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [-0.171458, -0.129866, 0.15], \"expected\": [-0.171504, -0.13078, 0.15], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [0.141157, -1.593265, 1.0], \"expected\": [0.139704, -1.592733, 1.0], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [0.591786, 0.03728, 0.25], \"expected\": [0.591752, 0.03687, 0.25], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [0.338861, 0.203572, 0.15], \"expected\": [0.33886, 0.203549, 0.15], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [0.539523, -0.176619, 0.2], \"expected\": [0.539279, -0.178827, 0.2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [-0.091728, 0.967156, 0.2], \"expected\": [-0.091739, 0.96699, 0.2], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [0.05745, -0.990845, 1.0], \"expected\": [0.050911, -1.000788, 1.0], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [0.143993, -2.077818, 0.4], \"expected\": [0.142181, -2.089598, 0.4], \"passed\": false}], \"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."}}