{"abstract":"½ and .5 are rejected as invalid.","category":"Go territory scoring","checks":8,"contract":"Input a komi string: optional sign, whole points, and an optional half written \".5\"/\".0\" or \"½\". A bare half (\"½\", \".5\") is allowed. Return komi in tenths or \"invalid\".","contract_signature":"x","evaluation_group":"w2-go-territory-scoring-komi-parse","failed_approach":"Accepting any empty whole part makes \"\" and \"-\" parse as zero komi.","family":"w2-go-territory-scoring-komi-parse-bare-half-handling","id":"FA-83316","implementations":{"attempt":{"sha256":"90574ab22fa1390f6885f14cb3d81925dac41926008285c96d969b8b9b0e27bd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s = x.strip()\n    neg = s.startswith('-')\n    if s[:1] in '+-' and s:\n        s = s[1:]\n    half = 0\n    if s.endswith('½'):\n        half = 5\n        s = s[:-1]\n    elif '.' in s:\n        s, _, frac = s.partition('.')\n        if frac not in ('0', '5'):\n            return 'invalid'\n        half = int(frac)\n    if not s.isdigit():\n        if s == '':\n            s = '0'\n        else:\n            return 'invalid'\n    v = int(s) * 10 + half\n    return -v if neg else v\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['½', 5], ['+5.5', 55], ['7.0', 70], ['6.3', 'invalid'], ['.5', 5], ['', 'invalid'], ['-', 'invalid'], ['abc', 'invalid']], [['½', 5], ['5.', 'invalid'], [' 6.5 ', 65], ['-3', -30], ['-7.5', -75], ['0.0', 0], ['1 1/2', 'invalid'], ['+', 'invalid']], [['6.5', 65], ['7', 70], ['-0.5', -5], ['½', 5], ['-', 'invalid'], ['6.50', 'invalid'], ['+', 'invalid'], ['+½', 5]], [['6½', 65], ['½', 5], ['-6½', -65], ['0', 0], ['+5.5', 55], ['7.0', 70], ['6.3', 'invalid'], ['', 'invalid']], [['½', 5], ['', 'invalid'], ['-', 'invalid'], ['abc', 'invalid'], ['5.', 'invalid'], [' 6.5 ', 65], ['-3', -30], ['+', 'invalid']]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"komi case %d\" % i, solve(args), expected)\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":"b54e5e3ee868ee648887db77a477adf3dfd282f22ec8ef84f9f2d131de4c19bd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s = x.strip()\n    neg = s.startswith('-')\n    if s[:1] in '+-' and s:\n        s = s[1:]\n    half = 0\n    if s.endswith('½'):\n        half = 5\n        s = s[:-1]\n    elif '.' in s:\n        s, _, frac = s.partition('.')\n        if frac not in ('0', '5'):\n            return 'invalid'\n        half = int(frac)\n    if not s.isdigit():\n        return 'invalid'\n    v = int(s) * 10 + half\n    return -v if neg else v\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['½', 5], ['+5.5', 55], ['7.0', 70], ['6.3', 'invalid'], ['.5', 5], ['', 'invalid'], ['-', 'invalid'], ['abc', 'invalid']], [['½', 5], ['5.', 'invalid'], [' 6.5 ', 65], ['-3', -30], ['-7.5', -75], ['0.0', 0], ['1 1/2', 'invalid'], ['+', 'invalid']], [['6.5', 65], ['7', 70], ['-0.5', -5], ['½', 5], ['-', 'invalid'], ['6.50', 'invalid'], ['+', 'invalid'], ['+½', 5]], [['6½', 65], ['½', 5], ['-6½', -65], ['0', 0], ['+5.5', 55], ['7.0', 70], ['6.3', 'invalid'], ['', 'invalid']], [['½', 5], ['', 'invalid'], ['-', 'invalid'], ['abc', 'invalid'], ['5.', 'invalid'], [' 6.5 ', 65], ['-3', -30], ['+', 'invalid']]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"komi case %d\" % i, solve(args), expected)\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":"Small rectangular toy boards given as strings of B, W and dot; a bounded teaching model of one scoring or bookkeeping rule, not a complete rules engine or server implementation. 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":"w2-go-territory-scoring-komi-parse-bare-half-handling","generated_at":"2026-09-29T14:50:20.530575+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Go servers and scoring tools compute this value automatically; a wrong answer changes a game result.","root_cause":"An empty whole part always fails.","sha256":"8bc58ad45c695df4dd139334f72160844868259a76d3eeaea59bd23bb99e4143","title":"A bare half-point komi is rejected · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.959,"exit_code":1,"observations":[{"actual":5,"check":"komi case 0","expected":5,"passed":true},{"actual":55,"check":"komi case 1","expected":55,"passed":true},{"actual":70,"check":"komi case 2","expected":70,"passed":true},{"actual":"invalid","check":"komi case 3","expected":"invalid","passed":true},{"actual":5,"check":"komi case 4","expected":5,"passed":true},{"actual":0,"check":"komi case 5","expected":"invalid","passed":false},{"actual":0,"check":"komi case 6","expected":"invalid","passed":false},{"actual":"invalid","check":"komi case 7","expected":"invalid","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"komi case 0\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"komi case 1\", \"actual\": 55, \"expected\": 55, \"passed\": true}, {\"check\": \"komi case 2\", \"actual\": 70, \"expected\": 70, \"passed\": true}, {\"check\": \"komi case 3\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"komi case 4\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"komi case 5\", \"actual\": 0, \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"komi case 6\", \"actual\": 0, \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"komi case 7\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.661,"exit_code":1,"observations":[{"actual":"invalid","check":"komi case 0","expected":5,"passed":false},{"actual":55,"check":"komi case 1","expected":55,"passed":true},{"actual":70,"check":"komi case 2","expected":70,"passed":true},{"actual":"invalid","check":"komi case 3","expected":"invalid","passed":true},{"actual":"invalid","check":"komi case 4","expected":5,"passed":false},{"actual":"invalid","check":"komi case 5","expected":"invalid","passed":true},{"actual":"invalid","check":"komi case 6","expected":"invalid","passed":true},{"actual":"invalid","check":"komi case 7","expected":"invalid","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"komi case 0\", \"actual\": \"invalid\", \"expected\": 5, \"passed\": false}, {\"check\": \"komi case 1\", \"actual\": 55, \"expected\": 55, \"passed\": true}, {\"check\": \"komi case 2\", \"actual\": 70, \"expected\": 70, \"passed\": true}, {\"check\": \"komi case 3\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"komi case 4\", \"actual\": \"invalid\", \"expected\": 5, \"passed\": false}, {\"check\": \"komi case 5\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"komi case 6\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"komi case 7\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"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."}}