{"abstract":"Min-max scaling uses held-out rows while fitting.","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":"Filtering rows after computing the statistic still leaves held-out influence.","family":"w3-feature-preprocessing-fit-scope-minmax-scaling-fit-leakage","id":"FA-100351","implementations":{"attempt":{"sha256":"092000abca7513a0f65b9dd9e8d06b4384cc795106d3ab9f68b7c1acd5daa9a1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, values):\n    v=train+values; lo=min(v); hi=max(v); return [round((x-lo)/(hi-lo),6) if hi!=lo 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"},"broken":{"sha256":"c556cfbcc60983da876c9383b8bf262868a1aa9c65942029e034562e289e48f1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, values):\n    if not values: return []\n    lo=min(values); hi=max(values); return [round((x-lo)/(hi-lo),6) if hi!=lo 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-fit-leakage","generated_at":"2026-09-30T16:48:34.469954+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":"Fitting reads values outside the designated training rows.","sha256":"a35982ca29765e716eae49d57c9eab93009e951d12d0044d67fc1e3b0e95a202","title":"Min-max scaling uses held-out rows while fitting · 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.651,"exit_code":1,"observations":[{"actual":[0.0,0.5,1.0],"check":"inside","expected":[-0.5,0.5,1.5],"passed":false},{"actual":[0.0,1.0],"check":"eval extremes do not fit","expected":[-1,2],"passed":false},{"actual":[0.0],"check":"training minimum","expected":[0],"passed":true},{"actual":[0.0,1.0],"check":"constant train","expected":[0,0],"passed":false},{"actual":[0],"check":"singleton","expected":[0],"passed":true},{"actual":[0.5],"check":"negative interval","expected":[0.5],"passed":true},{"actual":[],"check":"empty transform","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inside\", \"actual\": [0.0, 0.5, 1.0], \"expected\": [-0.5, 0.5, 1.5], \"passed\": false}, {\"check\": \"eval extremes do not fit\", \"actual\": [0.0, 1.0], \"expected\": [-1, 2], \"passed\": false}, {\"check\": \"training minimum\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}, {\"check\": \"constant train\", \"actual\": [0.0, 1.0], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"negative interval\", \"actual\": [0.5], \"expected\": [0.5], \"passed\": true}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.336,"exit_code":1,"observations":[{"actual":[0.0,0.5,1.0],"check":"inside","expected":[-0.5,0.5,1.5],"passed":false},{"actual":[0.0,1.0],"check":"eval extremes do not fit","expected":[-1,2],"passed":false},{"actual":[0],"check":"training minimum","expected":[0],"passed":true},{"actual":[0.0,1.0],"check":"constant train","expected":[0,0],"passed":false},{"actual":[0],"check":"singleton","expected":[0],"passed":true},{"actual":[0],"check":"negative interval","expected":[0.5],"passed":false},{"actual":[],"check":"empty transform","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inside\", \"actual\": [0.0, 0.5, 1.0], \"expected\": [-0.5, 0.5, 1.5], \"passed\": false}, {\"check\": \"eval extremes do not fit\", \"actual\": [0.0, 1.0], \"expected\": [-1, 2], \"passed\": false}, {\"check\": \"training minimum\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"constant train\", \"actual\": [0.0, 1.0], \"expected\": [0, 0], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"negative interval\", \"actual\": [0], \"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."}}