{"abstract":"Grouped recall pools groups before averaging.","category":"Evaluation metric aggregation","checks":7,"contract":"Rows are [group,actual,predicted]. Return mean recall across groups that contain actual positives; groups with no positives are omitted; none yields 0.","contract_signature":"rows","evaluation_group":"w3-eval-grouped-macro","failed_approach":"Averaging per-row correctness counts groups only when they have equal sizes.","family":"w3-evaluation-metric-aggregation-grouped-macro","id":"FA-99981","implementations":{"attempt":{"sha256":"82e41ddeed1cc85a6d998fdf7782e8eda6b6798207fc7a09be1f16d63cb9220f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    groups=sorted({g for g,a,p in rows if a==1}); vals=[]\n    for g in groups:\n        total=sum(a==1 for g2,a,p in rows if g2==g); hit=sum(a==1 and p==1 for g2,a,p in rows if g2==g); vals.append(hit/total)\n    return sum(vals)/max(1,len(rows))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal group sizes',solve([['a',1,1]]*N+[['b',1,0]]),.5)\ncheck('distinct group rates',solve([['a',1,1],['a',1,0],['b',1,1]]),.75)\ncheck('perfect groups',solve([['a',1,1],['b',1,1]]),1)\ncheck('empty',solve([]),0)\ncheck('no positive group',solve([['a',0,1]]),0)\ncheck('negative group omitted',solve([['a',1,1],['b',0,1]]),1)\ncheck('grouped miss',solve([['a',1,0]]*N),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":"60e9f4c81e6496f10aba2009769a273f616d9eea6e7fa2347758f6f9aecfb717","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    tp=sum(g==g2 and a==1 and p==1 for g,a,p in rows for g2,_,_ in rows); positives=sum(a==1 for _,a,_ in rows); return tp/positives if positives else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal group sizes',solve([['a',1,1]]*N+[['b',1,0]]),.5)\ncheck('distinct group rates',solve([['a',1,1],['a',1,0],['b',1,1]]),.75)\ncheck('perfect groups',solve([['a',1,1],['b',1,1]]),1)\ncheck('empty',solve([]),0)\ncheck('no positive group',solve([['a',0,1]]),0)\ncheck('negative group omitted',solve([['a',1,1],['b',0,1]]),1)\ncheck('grouped miss',solve([['a',1,0]]*N),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-grouped-macro","generated_at":"2026-09-30T16:48:30.355847+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":"Rows from larger groups dominate an evaluation intended to give groups equal weight.","sha256":"cb9168e43ea10e5fc0b865430f62d4bca7fd2e5caa86575a1514bf28c5258dcc","title":"Grouped recall pools groups before averaging · 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":30.694,"exit_code":1,"observations":[{"actual":0.5,"check":"unequal group sizes","expected":0.5,"passed":true},{"actual":0.5,"check":"distinct group rates","expected":0.75,"passed":false},{"actual":1.0,"check":"perfect groups","expected":1,"passed":true},{"actual":0.0,"check":"empty","expected":0,"passed":true},{"actual":0.0,"check":"no positive group","expected":0,"passed":true},{"actual":0.5,"check":"negative group omitted","expected":1,"passed":false},{"actual":0.0,"check":"grouped miss","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal group sizes\", \"actual\": 0.5, \"expected\": 0.5, \"passed\": true}, {\"check\": \"distinct group rates\", \"actual\": 0.5, \"expected\": 0.75, \"passed\": false}, {\"check\": \"perfect groups\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"no positive group\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"negative group omitted\", \"actual\": 0.5, \"expected\": 1, \"passed\": false}, {\"check\": \"grouped miss\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.529,"exit_code":1,"observations":[{"actual":0.5,"check":"unequal group sizes","expected":0.5,"passed":true},{"actual":1.0,"check":"distinct group rates","expected":0.75,"passed":false},{"actual":1.0,"check":"perfect groups","expected":1,"passed":true},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":0,"check":"no positive group","expected":0,"passed":true},{"actual":1.0,"check":"negative group omitted","expected":1,"passed":true},{"actual":0.0,"check":"grouped miss","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal group sizes\", \"actual\": 0.5, \"expected\": 0.5, \"passed\": true}, {\"check\": \"distinct group rates\", \"actual\": 1.0, \"expected\": 0.75, \"passed\": false}, {\"check\": \"perfect groups\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"no positive group\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"negative group omitted\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"grouped miss\", \"actual\": 0.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."}}