{"abstract":"Min-max scaling applies fitted state incorrectly.","category":"Feature preprocessing fit scope","checks":7,"contract":"Train and values are nonempty numeric lists. Fit min and max on train, map values linearly to that interval, and map all values to zero when the training range is zero. Round to six decimals.","contract_signature":"train, values","evaluation_group":"w3-feature-preprocessing-fit-scope-minmax-scaling","failed_approach":"The partial repair addresses the main convention but mishandles an edge case.","family":"w3-feature-preprocessing-fit-scope-minmax-scaling-transform-state","id":"FA-100356","implementations":{"attempt":{"sha256":"c0b738caf5659ddbdc59156cd1a5e308905dfec4b72453c9936097889ebc0698","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, values):\n    lo=min(train); hi=max(train); return [round((x-lo)/(hi-lo+1),6) for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nt=[N,N+4]; v=[N-2,N+2,N+6]; check('inside',solve(t,v),[-0.5,0.5,1.5])\ncheck('eval extremes do not fit',solve([0,4],[-4,8]),[-1,2])\ncheck('training minimum',solve([N,N+2],[N]),[0])\ncheck('constant train',solve([N,N],[N,N+3]),[0,0])\ncheck('singleton',solve([N],[N]),[0])\ncheck('negative interval',solve([-4,-2],[-3]),[0.5])\ncheck('empty transform',solve([0,1],[]),[])\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":"857431d64f4092d2e66d72cf2bb389a746c8e4fdfe7e832f4f27bd97c2310479","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, values):\n    lo=min(train); hi=max(train); return [round(x/hi,6) if hi else 0 for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nt=[N,N+4]; v=[N-2,N+2,N+6]; check('inside',solve(t,v),[-0.5,0.5,1.5])\ncheck('eval extremes do not fit',solve([0,4],[-4,8]),[-1,2])\ncheck('training minimum',solve([N,N+2],[N]),[0])\ncheck('constant train',solve([N,N],[N,N+3]),[0,0])\ncheck('singleton',solve([N],[N]),[0])\ncheck('negative interval',solve([-4,-2],[-3]),[0.5])\ncheck('empty transform',solve([0,1],[]),[])\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":"Toy scalar min-max transform with a zero-range convention; clipping and production estimator APIs are outside scope. 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-feature-preprocessing-fit-scope-minmax-scaling-transform-state","generated_at":"2026-09-30T16:48:34.499721+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small deterministic preprocessing contract makes the fit boundary and transform behavior directly inspectable.","root_cause":"The transform applies a plausible but incorrect state convention.","sha256":"b06d4a853b3f12ea1ab71b3695165f0f4b3f9208a6c2fa6f89c15ab81535143f","title":"Min-max scaling applies fitted state incorrectly · 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":28.683,"exit_code":1,"observations":[{"actual":[-0.4,0.4,1.2],"check":"inside","expected":[-0.5,0.5,1.5],"passed":false},{"actual":[-0.8,1.6],"check":"eval extremes do not fit","expected":[-1,2],"passed":false},{"actual":[0.0],"check":"training minimum","expected":[0],"passed":true},{"actual":[0.0,3.0],"check":"constant train","expected":[0,0],"passed":false},{"actual":[0.0],"check":"singleton","expected":[0],"passed":true},{"actual":[0.333333],"check":"negative interval","expected":[0.5],"passed":false},{"actual":[],"check":"empty transform","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inside\", \"actual\": [-0.4, 0.4, 1.2], \"expected\": [-0.5, 0.5, 1.5], \"passed\": false}, {\"check\": \"eval extremes do not fit\", \"actual\": [-0.8, 1.6], \"expected\": [-1, 2], \"passed\": false}, {\"check\": \"training minimum\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}, {\"check\": \"constant train\", \"actual\": [0.0, 3.0], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}, {\"check\": \"negative interval\", \"actual\": [0.333333], \"expected\": [0.5], \"passed\": false}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.107,"exit_code":1,"observations":[{"actual":[-0.2,0.6,1.4],"check":"inside","expected":[-0.5,0.5,1.5],"passed":false},{"actual":[-1.0,2.0],"check":"eval extremes do not fit","expected":[-1,2],"passed":true},{"actual":[0.333333],"check":"training minimum","expected":[0],"passed":false},{"actual":[1.0,4.0],"check":"constant train","expected":[0,0],"passed":false},{"actual":[1.0],"check":"singleton","expected":[0],"passed":false},{"actual":[1.5],"check":"negative interval","expected":[0.5],"passed":false},{"actual":[],"check":"empty transform","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inside\", \"actual\": [-0.2, 0.6, 1.4], \"expected\": [-0.5, 0.5, 1.5], \"passed\": false}, {\"check\": \"eval extremes do not fit\", \"actual\": [-1.0, 2.0], \"expected\": [-1, 2], \"passed\": true}, {\"check\": \"training minimum\", \"actual\": [0.333333], \"expected\": [0], \"passed\": false}, {\"check\": \"constant train\", \"actual\": [1.0, 4.0], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [1.0], \"expected\": [0], \"passed\": false}, {\"check\": \"negative interval\", \"actual\": [1.5], \"expected\": [0.5], \"passed\": false}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"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."}}