{"abstract":"Piecewise interpolation is anchored at the upper knot.","category":"Learning rate schedules","checks":6,"contract":"Given sorted [step,rate] knots, linearly interpolate within each segment and clamp to endpoint rates.","contract_signature":"step, knots","evaluation_group":"lr-schedule-piecewise-linear","failed_approach":"Returning a segment endpoint without interpolation creates a staircase.","family":"w3-learning-rate-schedules-piecewise-linear","id":"FA-99111","implementations":{"attempt":{"sha256":"8b063e0bf8508714c8f666e33ee77e2c977acec34357662ee18c31aad3aa166e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(step, knots):\n    if step<=knots[0][0]: return knots[0][1]\n    for (x0,y0),(x1,y1) in zip(knots,knots[1:]):\n     if step<=x1: return y1\n    return knots[-1][1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nk=[[0,0],[N,10],[N+2,2]]; check('first segment',solve(1,k),10/N); check('first knot',solve(N,k),10); check('between',solve(N+1,k),6); check('last knot',solve(N+2,k),2); check('before',solve(-1,k),0); check('after',solve(N+5,k),2)\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":"f586483b631bec0b5c113f17b785c6373497de688f96e9d5a8c8bc910762b0e3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(step, knots):\n    if step<=knots[0][0]: return knots[0][1]\n    for (x0,y0),(x1,y1) in zip(knots,knots[1:]):\n     if step<=x1: return y1+(y1-y0)*(step-x0)/(x1-x0)\n    return knots[-1][1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nk=[[0,0],[N,10],[N+2,2]]; check('first segment',solve(1,k),10/N); check('first knot',solve(N,k),10); check('between',solve(N+1,k),6); check('last knot',solve(N+2,k),2); check('before',solve(-1,k),0); check('after',solve(N+5,k),2)\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-piecewise-linear","generated_at":"2026-09-30T16:48:20.352541+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":"Interpolation starts from the upper knot and then moves farther in the segment direction.","sha256":"f9ac3a6e918c10aaa6321bcc6d704e2d6fc73316b4f158eae66b02ff7a672f6d","title":"Piecewise interpolation is anchored at the upper knot · 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":27.272,"exit_code":1,"observations":[{"actual":10,"check":"first segment","expected":10.0,"passed":true},{"actual":10,"check":"first knot","expected":10,"passed":true},{"actual":2,"check":"between","expected":6,"passed":false},{"actual":2,"check":"last knot","expected":2,"passed":true},{"actual":0,"check":"before","expected":0,"passed":true},{"actual":2,"check":"after","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"first segment\", \"actual\": 10, \"expected\": 10.0, \"passed\": true}, {\"check\": \"first knot\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"between\", \"actual\": 2, \"expected\": 6, \"passed\": false}, {\"check\": \"last knot\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"before\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"after\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":25.828,"exit_code":1,"observations":[{"actual":20.0,"check":"first segment","expected":10.0,"passed":false},{"actual":20.0,"check":"first knot","expected":10,"passed":false},{"actual":-2.0,"check":"between","expected":6,"passed":false},{"actual":-6.0,"check":"last knot","expected":2,"passed":false},{"actual":0,"check":"before","expected":0,"passed":true},{"actual":2,"check":"after","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"first segment\", \"actual\": 20.0, \"expected\": 10.0, \"passed\": false}, {\"check\": \"first knot\", \"actual\": 20.0, \"expected\": 10, \"passed\": false}, {\"check\": \"between\", \"actual\": -2.0, \"expected\": 6, \"passed\": false}, {\"check\": \"last knot\", \"actual\": -6.0, \"expected\": 2, \"passed\": false}, {\"check\": \"before\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"after\", \"actual\": 2, \"expected\": 2, \"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."}}