{"abstract":"Loss denominator counts inputs instead of supervised targets.","category":"Autoregressive target shifting","checks":6,"contract":"For labels and an aligned mask, count true mask entries at target indexes labels[1:]. Short masks contribute only where present.","contract_signature":"labels, mask","evaluation_group":"w3-ars-loss_count","failed_approach":"Counting all mask entries adds the context-only mask at index zero.","family":"w3-autoregressive-target-shifting-suffix-loss-count","id":"FA-98311","implementations":{"attempt":{"sha256":"04d0d29c205f8b00a41ea44801d129a5845fb2c3b3eedb23e2fffb874f3dff76","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(labels, mask):\n    return sum(bool(mask[i]) for i in range(min(len(mask),len(labels))))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('trailing context excluded',solve([1,2,3],[1,1,1]),2)\ncheck('ignored target',solve([1,2,3,4],[1,0,1]),1)\ncheck('no mask',solve([1,2],[]),0)\ncheck('singleton',solve([1],[1]),0)\ncheck('empty',solve([],[]),0)\ncheck('short mask',solve([1,2,3],[1,1]),1)\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":"63e5fba09d28039f950798bcf084ff316d58194b329e822b7f669505a06509dc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(labels, mask):\n    return sum(x is not None for x in labels)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('trailing context excluded',solve([1,2,3],[1,1,1]),2)\ncheck('ignored target',solve([1,2,3,4],[1,0,1]),1)\ncheck('no mask',solve([1,2],[]),0)\ncheck('singleton',solve([1],[1]),0)\ncheck('empty',solve([],[]),0)\ncheck('short mask',solve([1,2,3],[1,1]),1)\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 toy integer token sequences; this contract says nothing about model quality, batching, sampling, or production training frameworks. 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-autoregressive-target-shifting-suffix-loss-count","generated_at":"2026-09-30T16:48:11.499170+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small deterministic token-stream contract makes next-token alignment errors inspectable.","root_cause":"A trailing context token without a target is included in the normalization count.","sha256":"801441e0b8de2ccbaeda7efc2c88e156ed62f18023f06d998ae0be3115607b3f","title":"Loss denominator counts inputs instead of supervised targets · case 01","variant":1,"variant_policy":"The same explicitly authored fixtures repeat across all five numbered records; runtime N is unused. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.809,"exit_code":1,"observations":[{"actual":3,"check":"trailing context excluded","expected":2,"passed":false},{"actual":2,"check":"ignored target","expected":1,"passed":false},{"actual":0,"check":"no mask","expected":0,"passed":true},{"actual":1,"check":"singleton","expected":0,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":2,"check":"short mask","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"trailing context excluded\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"ignored target\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"no mask\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"singleton\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"short mask\", \"actual\": 2, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.73,"exit_code":1,"observations":[{"actual":3,"check":"trailing context excluded","expected":2,"passed":false},{"actual":4,"check":"ignored target","expected":1,"passed":false},{"actual":2,"check":"no mask","expected":0,"passed":false},{"actual":1,"check":"singleton","expected":0,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":3,"check":"short mask","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"trailing context excluded\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"ignored target\", \"actual\": 4, \"expected\": 1, \"passed\": false}, {\"check\": \"no mask\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"singleton\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"short mask\", \"actual\": 3, \"expected\": 1, \"passed\": false}], \"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."}}