{"abstract":"String length uses UTF-8 bytes instead of characters.","category":"Tool call schema validation","checks":7,"contract":"Length bounds count Python Unicode code points in the supplied string.","contract_signature":"value, minimum","evaluation_group":"w3-schema-string-length-codepoints","failed_approach":"Counting distinct characters fails for repeated letters even in ASCII.","family":"w3-tool-call-schema-validation-string-length-codepoints","id":"FA-99781","implementations":{"attempt":{"sha256":"387f79609ed9bf2ecbf2477e1570ee74fd0871e256b66c8774ceb2f51ed95b51","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(value, minimum):\n    return len(set(value)) >= minimum\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ASCII length',solve('abc',N),3>=N)\ncheck('repeated letters',solve('a'*(N+1),N+1),True)\ncheck('unicode one character',solve('é',1),True)\ncheck('unicode byte count is not length',solve('é',2),False)\ncheck('empty minimum zero',solve('',0),True)\ncheck('empty positive minimum',solve('',1),False)\ncheck('supplementary character',solve('🙂',1),True)\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":"74273fdb5eaf2e0afce57e0d00d7d8a20db5db8f75989d1300c02acfb8d9b6b3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(value, minimum):\n    return len(value.encode('utf-8')) >= minimum\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ASCII length',solve('abc',N),3>=N)\ncheck('repeated letters',solve('a'*(N+1),N+1),True)\ncheck('unicode one character',solve('é',1),True)\ncheck('unicode byte count is not length',solve('é',2),False)\ncheck('empty minimum zero',solve('',0),True)\ncheck('empty positive minimum',solve('',1),False)\ncheck('supplementary character',solve('🙂',1),True)\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":"Self-contained toy JSON-like schema contract over in-memory Python values; no compatibility with a production schema standard or callable binding is claimed. 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-tool-call-schema-validation-string-length-codepoints","generated_at":"2026-09-30T16:48:28.065003+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tool argument validation prevents malformed structured payloads from entering a deterministic downstream operation.","root_cause":"The implementation measures encoded bytes instead of string characters.","sha256":"3e0e5bc5d3e1e62ff73491c6fc997cbf68288de0fc0875d152b8e50b0b073695","title":"String length uses UTF-8 bytes instead of characters · 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":28.673,"exit_code":1,"observations":[{"actual":true,"check":"ASCII length","expected":true,"passed":true},{"actual":false,"check":"repeated letters","expected":true,"passed":false},{"actual":true,"check":"unicode one character","expected":true,"passed":true},{"actual":false,"check":"unicode byte count is not length","expected":false,"passed":true},{"actual":true,"check":"empty minimum zero","expected":true,"passed":true},{"actual":false,"check":"empty positive minimum","expected":false,"passed":true},{"actual":true,"check":"supplementary character","expected":true,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ASCII length\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeated letters\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"unicode one character\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"unicode byte count is not length\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"empty minimum zero\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"empty positive minimum\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"supplementary character\", \"actual\": true, \"expected\": true, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.113,"exit_code":1,"observations":[{"actual":true,"check":"ASCII length","expected":true,"passed":true},{"actual":true,"check":"repeated letters","expected":true,"passed":true},{"actual":true,"check":"unicode one character","expected":true,"passed":true},{"actual":true,"check":"unicode byte count is not length","expected":false,"passed":false},{"actual":true,"check":"empty minimum zero","expected":true,"passed":true},{"actual":false,"check":"empty positive minimum","expected":false,"passed":true},{"actual":true,"check":"supplementary character","expected":true,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ASCII length\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeated letters\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"unicode one character\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"unicode byte count is not length\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"empty minimum zero\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"empty positive minimum\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"supplementary character\", \"actual\": true, \"expected\": true, \"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."}}