{"abstract":"Cosine decay fails to restart at each cycle boundary.","category":"Learning rate schedules","checks":6,"contract":"With fixed period, cosine restarts at zero every period; each cycle begins at base.","contract_signature":"step, base, period","evaluation_group":"lr-schedule-cosine-restarts","failed_approach":"A one-step phase shift misses the specified rates at cycle starts and interior points.","family":"w3-learning-rate-schedules-cosine-restarts","id":"FA-99096","implementations":{"attempt":{"sha256":"ce7cc66518e9157793e269a29911d7081d5146715322f8e2a92c5791a286ac58","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(step, base, period):\n    import math\n    phase=step%period\n    return base*(1+math.cos(math.pi*(phase+1)/period))/2\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('initial',solve(0,10,4),10); check('quarter',solve(1,8,4),4); check('half',solve(2,12,4),0); check('restart',solve(4,7,4),7); check('next quarter',solve(5,8,4),4); check('negative clamp',solve(-1,6,4),6)\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":"0be8f398c7aab920c1064c42d11713e8d7767b40be86c9ba7933c6fbb77e47fc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(step, base, period):\n    import math\n    return base*(1+math.cos(math.pi*step/period))/2\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('initial',solve(0,10,4),10); check('quarter',solve(1,8,4),4); check('half',solve(2,12,4),0); check('restart',solve(4,7,4),7); check('next quarter',solve(5,8,4),4); check('negative clamp',solve(-1,6,4),6)\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 toy scalar contracts with integer steps and finite parameters; they do not model framework defaults or optimizer state. 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-learning-rate-schedules-cosine-restarts","generated_at":"2026-09-30T16:48:20.352075+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic scalar schedule makes step-to-rate mapping explicit for a small training loop.","root_cause":"The schedule uses a half cosine over absolute time and never resets its phase.","sha256":"78eb1e9084f5d867333182f1af4ee7e0769b9122299753b69e9cd9a306753363","title":"Cosine decay fails to restart at each cycle boundary · case 01","variant":1,"variant_policy":"The same explicitly authored fixtures repeat across all five numbered records; runtime N is unused. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.619,"exit_code":1,"observations":[{"actual":8.535533905932738,"check":"initial","expected":10,"passed":false},{"actual":4.0,"check":"quarter","expected":4,"passed":true},{"actual":1.7573593128807152,"check":"half","expected":0,"passed":false},{"actual":5.974873734152916,"check":"restart","expected":7,"passed":false},{"actual":4.0,"check":"next quarter","expected":4,"passed":true},{"actual":0.0,"check":"negative clamp","expected":6,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"initial\", \"actual\": 8.535533905932738, \"expected\": 10, \"passed\": false}, {\"check\": \"quarter\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"half\", \"actual\": 1.7573593128807152, \"expected\": 0, \"passed\": false}, {\"check\": \"restart\", \"actual\": 5.974873734152916, \"expected\": 7, \"passed\": false}, {\"check\": \"next quarter\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"negative clamp\", \"actual\": 0.0, \"expected\": 6, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.342,"exit_code":1,"observations":[{"actual":10.0,"check":"initial","expected":10,"passed":true},{"actual":6.82842712474619,"check":"quarter","expected":4,"passed":false},{"actual":6.0,"check":"half","expected":0,"passed":false},{"actual":0.0,"check":"restart","expected":7,"passed":false},{"actual":1.1715728752538093,"check":"next quarter","expected":4,"passed":false},{"actual":5.121320343559642,"check":"negative clamp","expected":6,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"initial\", \"actual\": 10.0, \"expected\": 10, \"passed\": true}, {\"check\": \"quarter\", \"actual\": 6.82842712474619, \"expected\": 4, \"passed\": false}, {\"check\": \"half\", \"actual\": 6.0, \"expected\": 0, \"passed\": false}, {\"check\": \"restart\", \"actual\": 0.0, \"expected\": 7, \"passed\": false}, {\"check\": \"next quarter\", \"actual\": 1.1715728752538093, \"expected\": 4, \"passed\": false}, {\"check\": \"negative clamp\", \"actual\": 5.121320343559642, \"expected\": 6, \"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."}}