{"abstract":"Accuracy divides by predicted positives.","category":"Evaluation metric aggregation","checks":6,"contract":"Return the fraction of equal positions in two equally sized label lists; empty lists yield 0.","contract_signature":"truth, pred","evaluation_group":"w3-eval-accuracy-denominator","failed_approach":"Adding one to the denominator distorts every nonempty sample.","family":"w3-evaluation-metric-aggregation-accuracy-denominator","id":"FA-99941","implementations":{"attempt":{"sha256":"1a54c5148bd226830003fe3410a3857bd45e0f5a7e7528d44c690b4a92e7e688","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, pred):\n    return sum(a==b for a,b in zip(truth,pred))/(len(truth)+1) if truth else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed',solve([1,0,1],[1,1,0]),1/3)\ncheck('all correct',solve([0,1],[0,1]),1)\ncheck('all wrong',solve([0,0],[1,1]),0)\ncheck('empty',solve([],[]),0)\ncheck('singleton hit',solve([N],[N]),1)\ncheck('singleton miss',solve([N],[N+1]),0)\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":"87f30007bfe2fb156aedadc3dd531ef57ebaf0a31b525178dc6da7d470d52166","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, pred):\n    return sum(a==b for a,b in zip(truth,pred))/sum(x==1 for x in pred) if pred and sum(x==1 for x in pred) else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed',solve([1,0,1],[1,1,0]),1/3)\ncheck('all correct',solve([0,1],[0,1]),1)\ncheck('all wrong',solve([0,0],[1,1]),0)\ncheck('empty',solve([],[]),0)\ncheck('singleton hit',solve([N],[N]),1)\ncheck('singleton miss',solve([N],[N+1]),0)\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-accuracy-denominator","generated_at":"2026-09-30T16:48:29.887459+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":"The denominator counts positive predictions rather than every labeled example.","sha256":"dbdc701c6fd9f3331f26e311bff73fb443b3ca169d23ee483705ecd34df20d9d","title":"Accuracy divides by predicted positives · 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":31.785,"exit_code":1,"observations":[{"actual":0.25,"check":"mixed","expected":0.3333333333333333,"passed":false},{"actual":0.6666666666666666,"check":"all correct","expected":1,"passed":false},{"actual":0.0,"check":"all wrong","expected":0,"passed":true},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":0.5,"check":"singleton hit","expected":1,"passed":false},{"actual":0.0,"check":"singleton miss","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed\", \"actual\": 0.25, \"expected\": 0.3333333333333333, \"passed\": false}, {\"check\": \"all correct\", \"actual\": 0.6666666666666666, \"expected\": 1, \"passed\": false}, {\"check\": \"all wrong\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"singleton hit\", \"actual\": 0.5, \"expected\": 1, \"passed\": false}, {\"check\": \"singleton miss\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":30.614,"exit_code":1,"observations":[{"actual":0.5,"check":"mixed","expected":0.3333333333333333,"passed":false},{"actual":2.0,"check":"all correct","expected":1,"passed":false},{"actual":0.0,"check":"all wrong","expected":0,"passed":true},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":1.0,"check":"singleton hit","expected":1,"passed":true},{"actual":0,"check":"singleton miss","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed\", \"actual\": 0.5, \"expected\": 0.3333333333333333, \"passed\": false}, {\"check\": \"all correct\", \"actual\": 2.0, \"expected\": 1, \"passed\": false}, {\"check\": \"all wrong\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"singleton hit\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"singleton miss\", \"actual\": 0, \"expected\": 0, \"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."}}