{"abstract":"Resetting optimizer state leaves stale moments.","category":"Optimizer update state","checks":6,"contract":"Given [p,m,v,g,reset], reset moments to zero when requested, then apply one SGD-momentum step with mu=.5 and lr=1; return [p_next,m_next,v].","contract_signature":"p, m, v, g, reset","evaluation_group":"optimizer-toy-state-reset-boundary","failed_approach":"Clearing only the first moment leaves variance history from the previous phase.","family":"w3-optimizer-update-state-state-reset-boundary","id":"FA-99036","implementations":{"attempt":{"sha256":"611815eafb300d56a210384cfcaee31d55d840093c8bf7f9e1c4c03db4eb2308","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(p, m, v, g, reset):\n    base=0 if reset else m; nm=0.5*base+g\n    return [p-nm,nm,v]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reset clears both',solve(10,8,12,2,True),[8,2,0])\ncheck('ordinary carry',solve(10,8,12,2,False),[4,6,12])\ncheck('reset negative gradient',solve(3,4,9,-2,True),[5,-2,0])\ncheck('reset zero gradient',solve(5,7,6,0,True),[5,0,0])\ncheck('ordinary zero gradient',solve(5,4,6,0,False),[3,2,6])\ncheck('reset singleton',solve(N,1,2,1,True),[N-1,1,0])\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":"3fe9441857c5efde6a76a8f08c4578630b3375d3c9955684bb93178748d38c70","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(p, m, v, g, reset):\n    nm=0.5*m+g\n    return [p-nm,nm,v]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reset clears both',solve(10,8,12,2,True),[8,2,0])\ncheck('ordinary carry',solve(10,8,12,2,False),[4,6,12])\ncheck('reset negative gradient',solve(3,4,9,-2,True),[5,-2,0])\ncheck('reset zero gradient',solve(5,7,6,0,True),[5,0,0])\ncheck('ordinary zero gradient',solve(5,4,6,0,False),[3,2,6])\ncheck('reset singleton',solve(N,1,2,1,True),[N-1,1,0])\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":"These are deterministic scalar or short-vector toy contracts, not claims about production optimizer APIs or training quality. 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":"w3-optimizer-update-state-state-reset-boundary","generated_at":"2026-09-30T16:48:19.455634+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Optimizer implementations must associate each parameter with its own mathematically specified update state.","root_cause":"A new training phase reuses prior momentum after an explicit reset.","sha256":"421d339072ce80f6c9dbf27f9145a02269a8449041c6c47be59abd6497b030b0","title":"Resetting optimizer state leaves stale moments · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":29.254,"exit_code":1,"observations":[{"actual":[8.0,2.0,12],"check":"reset clears both","expected":[8,2,0],"passed":false},{"actual":[4.0,6.0,12],"check":"ordinary carry","expected":[4,6,12],"passed":true},{"actual":[5.0,-2.0,9],"check":"reset negative gradient","expected":[5,-2,0],"passed":false},{"actual":[5.0,0.0,6],"check":"reset zero gradient","expected":[5,0,0],"passed":false},{"actual":[3.0,2.0,6],"check":"ordinary zero gradient","expected":[3,2,6],"passed":true},{"actual":[0.0,1.0,2],"check":"reset singleton","expected":[0,1,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reset clears both\", \"actual\": [8.0, 2.0, 12], \"expected\": [8, 2, 0], \"passed\": false}, {\"check\": \"ordinary carry\", \"actual\": [4.0, 6.0, 12], \"expected\": [4, 6, 12], \"passed\": true}, {\"check\": \"reset negative gradient\", \"actual\": [5.0, -2.0, 9], \"expected\": [5, -2, 0], \"passed\": false}, {\"check\": \"reset zero gradient\", \"actual\": [5.0, 0.0, 6], \"expected\": [5, 0, 0], \"passed\": false}, {\"check\": \"ordinary zero gradient\", \"actual\": [3.0, 2.0, 6], \"expected\": [3, 2, 6], \"passed\": true}, {\"check\": \"reset singleton\", \"actual\": [0.0, 1.0, 2], \"expected\": [0, 1, 0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":25.912,"exit_code":1,"observations":[{"actual":[4.0,6.0,12],"check":"reset clears both","expected":[8,2,0],"passed":false},{"actual":[4.0,6.0,12],"check":"ordinary carry","expected":[4,6,12],"passed":true},{"actual":[3.0,0.0,9],"check":"reset negative gradient","expected":[5,-2,0],"passed":false},{"actual":[1.5,3.5,6],"check":"reset zero gradient","expected":[5,0,0],"passed":false},{"actual":[3.0,2.0,6],"check":"ordinary zero gradient","expected":[3,2,6],"passed":true},{"actual":[-0.5,1.5,2],"check":"reset singleton","expected":[0,1,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reset clears both\", \"actual\": [4.0, 6.0, 12], \"expected\": [8, 2, 0], \"passed\": false}, {\"check\": \"ordinary carry\", \"actual\": [4.0, 6.0, 12], \"expected\": [4, 6, 12], \"passed\": true}, {\"check\": \"reset negative gradient\", \"actual\": [3.0, 0.0, 9], \"expected\": [5, -2, 0], \"passed\": false}, {\"check\": \"reset zero gradient\", \"actual\": [1.5, 3.5, 6], \"expected\": [5, 0, 0], \"passed\": false}, {\"check\": \"ordinary zero gradient\", \"actual\": [3.0, 2.0, 6], \"expected\": [3, 2, 6], \"passed\": true}, {\"check\": \"reset singleton\", \"actual\": [-0.5, 1.5, 2], \"expected\": [0, 1, 0], \"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."}}