{"abstract":"Natural logarithms return nats under a bits contract.","category":"Statistics","checks":4,"contract":"Integer finite observations and equal lengths for paired samples. Counts and weights are nonnegative. Rational results use reduced Fraction strings. Empty or undefined statistics return None where shown. Nonnegative frequency counts; ignore zero-probability terms and return None for zero total. Round base-two Shannon entropy to ten decimal places. Exact operational definition: round(-sum((c/sum(counts))*math.log2(c/sum(counts)) for c in counts if c),10) if sum(counts) else None","evaluation_group":"model-58f9f27d7f796ac4","failed_approach":"Maximum entropy assumes all listed categories have equal mass.","family":"xn-frequency-distribution-entropy-bits","id":"FA-6341","implementations":{"attempt":{"sha256":"8ba5338ab0d11b19a8c3ca1cc833ca7d0e00780acfa925e618cec330d7e9e33b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(counts):\n    return round(math.log2(len(counts)),10) if counts else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([1, 1],)', solve(*([1, 1],)), 1.0)\ncheck('fixture 2: ([1, 1, 1, 1],)', solve(*([1, 1, 1, 1],)), 2.0)\ncheck('fixture 3: ([5, 0],)', solve(*([5, 0],)), 0.0)\ncheck('fixture 4: ([0, 0],)', solve(*([0, 0],)), None)\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":"a527930749516a8b3abee4c281285591dbf062d3f3daed9c4b96895de235fc59","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(counts):\n    return round(-sum((c/sum(counts))*math.log(c/sum(counts)) for c in counts if c),10) if sum(counts) else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([1, 1],)', solve(*([1, 1],)), 1.0)\ncheck('fixture 2: ([1, 1, 1, 1],)', solve(*([1, 1, 1, 1],)), 2.0)\ncheck('fixture 3: ([5, 0],)', solve(*([5, 0],)), 0.0)\ncheck('fixture 4: ([0, 0],)', solve(*([0, 0],)), None)\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"},"fixed":{"sha256":"dae6ae204dbd73339d2e73c9c25285eb7e50fd3d02298204fefbc04ba10bd6b7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(counts):\n    return round(-sum((c/sum(counts))*math.log2(c/sum(counts)) for c in counts if c),10) if sum(counts) else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([1, 1],)', solve(*([1, 1],)), 1.0)\ncheck('fixture 2: ([1, 1, 1, 1],)', solve(*([1, 1, 1, 1],)), 2.0)\ncheck('fixture 3: ([5, 0],)', solve(*([5, 0],)), 0.0)\ncheck('fixture 4: ([0, 0],)', solve(*([0, 0],)), None)\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":" 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":"xn-frequency-distribution-entropy-bits","generated_at":"2026-09-29T14:38:00.550767+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Statistical estimators results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return round(-sum((c/sum(counts))*math.log2(c/sum(counts)) for c in counts if c),10) if sum(counts) else None","root_cause":"Natural logarithms return nats under a bits contract.","sha256":"2d204d5aa125f5dfb9fa7c0a74a8aba25ecc0f4c91c5a616f5b8b17f6e4b8627","title":"Frequency distribution entropy bits · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":53.564,"exit_code":1,"observations":[{"actual":1.0,"check":"fixture 1: ([1, 1],)","expected":1.0,"passed":true},{"actual":2.0,"check":"fixture 2: ([1, 1, 1, 1],)","expected":2.0,"passed":true},{"actual":1.0,"check":"fixture 3: ([5, 0],)","expected":0.0,"passed":false},{"actual":1.0,"check":"fixture 4: ([0, 0],)","expected":null,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([1, 1],)\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"fixture 2: ([1, 1, 1, 1],)\", \"actual\": 2.0, \"expected\": 2.0, \"passed\": true}, {\"check\": \"fixture 3: ([5, 0],)\", \"actual\": 1.0, \"expected\": 0.0, \"passed\": false}, {\"check\": \"fixture 4: ([0, 0],)\", \"actual\": 1.0, \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":53.867,"exit_code":1,"observations":[{"actual":0.6931471806,"check":"fixture 1: ([1, 1],)","expected":1.0,"passed":false},{"actual":1.3862943611,"check":"fixture 2: ([1, 1, 1, 1],)","expected":2.0,"passed":false},{"actual":-0.0,"check":"fixture 3: ([5, 0],)","expected":0.0,"passed":true},{"actual":null,"check":"fixture 4: ([0, 0],)","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([1, 1],)\", \"actual\": 0.6931471806, \"expected\": 1.0, \"passed\": false}, {\"check\": \"fixture 2: ([1, 1, 1, 1],)\", \"actual\": 1.3862943611, \"expected\": 2.0, \"passed\": false}, {\"check\": \"fixture 3: ([5, 0],)\", \"actual\": -0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"fixture 4: ([0, 0],)\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":67.874,"exit_code":0,"observations":[{"actual":1.0,"check":"fixture 1: ([1, 1],)","expected":1.0,"passed":true},{"actual":2.0,"check":"fixture 2: ([1, 1, 1, 1],)","expected":2.0,"passed":true},{"actual":-0.0,"check":"fixture 3: ([5, 0],)","expected":0.0,"passed":true},{"actual":null,"check":"fixture 4: ([0, 0],)","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([1, 1],)\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"fixture 2: ([1, 1, 1, 1],)\", \"actual\": 2.0, \"expected\": 2.0, \"passed\": true}, {\"check\": \"fixture 3: ([5, 0],)\", \"actual\": -0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"fixture 4: ([0, 0],)\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}