{"abstract":"L2 normalization uses the squared magnitude as divisor.","category":"Embedding vector normalization","checks":6,"contract":"For a finite nonzero vector, return its Euclidean unit vector; an empty or zero vector returns an empty list.","contract_signature":"v","evaluation_group":"embedding-l2-unit-vector","failed_approach":"Dividing by the L1 length still produces a vector with the wrong Euclidean unit length.","family":"w3-embedding-vector-normalization-euclidean-unit-length","id":"FA-99341","implementations":{"attempt":{"sha256":"811c07bd6330b606625ceb71f1c33021cc6fba28087e146d356e27535352e08e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v):\n    return [x/sum(abs(y) for y in v) for x in v] if v and any(v) else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('3-4 length', solve([3,4]), [0.6,0.8])\ncheck('scaled diagonal', solve([N,N]), [N/(2*N*N)**0.5,N/(2*N*N)**0.5])\ncheck('negative coordinate', solve([-3,4]), [-0.6,0.8])\ncheck('zero', solve([0,0]), [])\ncheck('empty', solve([]), [])\ncheck('single coordinate', solve([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":"c7fc63dabecce2f16b2619cf1564166b0e9bee0c5a57e6e6dc6e8063cd2c607f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v):\n    return [x/sum(y*y for y in v) for x in v] if v and any(v) else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('3-4 length', solve([3,4]), [0.6,0.8])\ncheck('scaled diagonal', solve([N,N]), [N/(2*N*N)**0.5,N/(2*N*N)**0.5])\ncheck('negative coordinate', solve([-3,4]), [-0.6,0.8])\ncheck('zero', solve([0,0]), [])\ncheck('empty', solve([]), [])\ncheck('single coordinate', solve([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 vectors or token rows; this contract makes no claim about model quality or production embedding behavior. 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-embedding-vector-normalization-euclidean-unit-length","generated_at":"2026-09-30T16:48:23.079300+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small embedding preparation contract can be checked without a model or retrieval system.","root_cause":"The squared norm is used directly rather than its square root.","sha256":"2be253de7c752468ffb75ce988d1c263f33f94f9aefd0074cbacb9be63ff8c2d","title":"L2 normalization uses the squared magnitude as divisor · 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":26.972,"exit_code":1,"observations":[{"actual":[0.42857142857142855,0.5714285714285714],"check":"3-4 length","expected":[0.6,0.8],"passed":false},{"actual":[0.5,0.5],"check":"scaled diagonal","expected":[0.7071067811865475,0.7071067811865475],"passed":false},{"actual":[-0.42857142857142855,0.5714285714285714],"check":"negative coordinate","expected":[-0.6,0.8],"passed":false},{"actual":[],"check":"zero","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1.0],"check":"single coordinate","expected":[1.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"3-4 length\", \"actual\": [0.42857142857142855, 0.5714285714285714], \"expected\": [0.6, 0.8], \"passed\": false}, {\"check\": \"scaled diagonal\", \"actual\": [0.5, 0.5], \"expected\": [0.7071067811865475, 0.7071067811865475], \"passed\": false}, {\"check\": \"negative coordinate\", \"actual\": [-0.42857142857142855, 0.5714285714285714], \"expected\": [-0.6, 0.8], \"passed\": false}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single coordinate\", \"actual\": [1.0], \"expected\": [1.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.03,"exit_code":1,"observations":[{"actual":[0.12,0.16],"check":"3-4 length","expected":[0.6,0.8],"passed":false},{"actual":[0.5,0.5],"check":"scaled diagonal","expected":[0.7071067811865475,0.7071067811865475],"passed":false},{"actual":[-0.12,0.16],"check":"negative coordinate","expected":[-0.6,0.8],"passed":false},{"actual":[],"check":"zero","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1.0],"check":"single coordinate","expected":[1.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"3-4 length\", \"actual\": [0.12, 0.16], \"expected\": [0.6, 0.8], \"passed\": false}, {\"check\": \"scaled diagonal\", \"actual\": [0.5, 0.5], \"expected\": [0.7071067811865475, 0.7071067811865475], \"passed\": false}, {\"check\": \"negative coordinate\", \"actual\": [-0.12, 0.16], \"expected\": [-0.6, 0.8], \"passed\": false}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single coordinate\", \"actual\": [1.0], \"expected\": [1.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."}}