{"abstract":"Threshold sweep reuses the previous threshold counts.","category":"Evaluation metric aggregation","checks":6,"contract":"Return [TP,FP] for each supplied threshold, counting scores >= threshold; order matches thresholds.","contract_signature":"truth, scores, thresholds","evaluation_group":"w3-eval-threshold-sweep","failed_approach":"Using strict greater-than drops examples exactly on the threshold.","family":"w3-evaluation-metric-aggregation-threshold-sweep","id":"FA-100016","implementations":{"attempt":{"sha256":"48026e40ca3b93837e11f2174434bd4f5af3cf8d3a5e58b5798140b17e360172","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, scores, thresholds):\n    return [[sum(a==1 and s>t for a,s in zip(truth,scores)),sum(a==0 and s>t for a,s in zip(truth,scores))] for t in thresholds]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two cutoffs',solve([1,0,1],[N, N+1, N-1],[N,N+1]),[[1,1],[0,1]])\ncheck('exact boundary',solve([1,0],[N,N],[N]),[[1,1]])\ncheck('high cutoff',solve([1],[N],[N+1]),[[0,0]])\ncheck('empty cutoffs',solve([1],[N],[]),[])\ncheck('empty examples',solve([],[],[0,N]),[[0,0],[0,0]])\ncheck('lower threshold',solve([1,0],[N,0],[0]),[[1,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":"85c47ca67c1d0d6a70c8f508f813d187d7f4d8023ecbbc5d57ddc0e854928359","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, scores, thresholds):\n    counts=[]; tp=fp=0\n    for t in thresholds:\n        tp+=sum(a==1 and s>=t for a,s in zip(truth,scores)); fp+=sum(a==0 and s>=t for a,s in zip(truth,scores)); counts.append([tp,fp])\n    return counts\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two cutoffs',solve([1,0,1],[N, N+1, N-1],[N,N+1]),[[1,1],[0,1]])\ncheck('exact boundary',solve([1,0],[N,N],[N]),[[1,1]])\ncheck('high cutoff',solve([1],[N],[N+1]),[[0,0]])\ncheck('empty cutoffs',solve([1],[N],[]),[])\ncheck('empty examples',solve([],[],[0,N]),[[0,0],[0,0]])\ncheck('lower threshold',solve([1,0],[N,0],[0]),[[1,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":"Inputs are finite toy labels and scores; this defines no benchmark protocol, production metric library, or model quality claim. 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-evaluation-metric-aggregation-threshold-sweep","generated_at":"2026-09-30T16:48:30.810551+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small explicit evaluation contract makes aggregation behavior reproducible across labeled examples.","root_cause":"A boundary prediction is counted in consecutive threshold buckets.","sha256":"515b42d1bec6099dbf94d21208dfaf1851c030b80f490930f5c0b946b9776a55","title":"Threshold sweep reuses the previous threshold counts · 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.115,"exit_code":1,"observations":[{"actual":[[0,1],[0,0]],"check":"two cutoffs","expected":[[1,1],[0,1]],"passed":false},{"actual":[[0,0]],"check":"exact boundary","expected":[[1,1]],"passed":false},{"actual":[[0,0]],"check":"high cutoff","expected":[[0,0]],"passed":true},{"actual":[],"check":"empty cutoffs","expected":[],"passed":true},{"actual":[[0,0],[0,0]],"check":"empty examples","expected":[[0,0],[0,0]],"passed":true},{"actual":[[1,0]],"check":"lower threshold","expected":[[1,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two cutoffs\", \"actual\": [[0, 1], [0, 0]], \"expected\": [[1, 1], [0, 1]], \"passed\": false}, {\"check\": \"exact boundary\", \"actual\": [[0, 0]], \"expected\": [[1, 1]], \"passed\": false}, {\"check\": \"high cutoff\", \"actual\": [[0, 0]], \"expected\": [[0, 0]], \"passed\": true}, {\"check\": \"empty cutoffs\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty examples\", \"actual\": [[0, 0], [0, 0]], \"expected\": [[0, 0], [0, 0]], \"passed\": true}, {\"check\": \"lower threshold\", \"actual\": [[1, 0]], \"expected\": [[1, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.098,"exit_code":1,"observations":[{"actual":[[1,1],[1,2]],"check":"two cutoffs","expected":[[1,1],[0,1]],"passed":false},{"actual":[[1,1]],"check":"exact boundary","expected":[[1,1]],"passed":true},{"actual":[[0,0]],"check":"high cutoff","expected":[[0,0]],"passed":true},{"actual":[],"check":"empty cutoffs","expected":[],"passed":true},{"actual":[[0,0],[0,0]],"check":"empty examples","expected":[[0,0],[0,0]],"passed":true},{"actual":[[1,1]],"check":"lower threshold","expected":[[1,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two cutoffs\", \"actual\": [[1, 1], [1, 2]], \"expected\": [[1, 1], [0, 1]], \"passed\": false}, {\"check\": \"exact boundary\", \"actual\": [[1, 1]], \"expected\": [[1, 1]], \"passed\": true}, {\"check\": \"high cutoff\", \"actual\": [[0, 0]], \"expected\": [[0, 0]], \"passed\": true}, {\"check\": \"empty cutoffs\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty examples\", \"actual\": [[0, 0], [0, 0]], \"expected\": [[0, 0], [0, 0]], \"passed\": true}, {\"check\": \"lower threshold\", \"actual\": [[1, 1]], \"expected\": [[1, 1]], \"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."}}