{"abstract":"Right padding mask includes the first padded position.","category":"Sequence batch packing","checks":6,"contract":"Right-pad tokens with zero to width and return a mask of ones for original positions followed by zeros.","contract_signature":"tokens, width","evaluation_group":"w3-seqpack-right-pad-mask-v1","failed_approach":"A max-zero guard hides the defect only when there is no padding.","family":"w3-sequence-batch-packing-right-padding-mask","id":"FA-98061","implementations":{"attempt":{"sha256":"aeb26d1085ecdd89776411861c2b5c8dc2ab02e4319218d6dca3ce754e3959be","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, width):\n    pad=width-len(tokens); return tokens+[0]*pad, [1]*len(tokens)+[0]*max(0,pad-1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('one pad', solve([N],N+1), ([N]+[0]*N,[1]+[0]*N))\ncheck('many pads', solve([N],N+3), ([N]+[0]*(N+2),[1]+[0]*(N+2)))\ncheck('no pads', solve([1]*N,N), ([1]*N,[1]*N))\ncheck('empty', solve([],N), ([0]*N,[0]*N))\ncheck('single width', solve([7],1), ([7],[1]))\ncheck('two originals', solve([2,3],4), ([2,3,0,0],[1,1,0,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":"868a968071accb243b05e6874779919b125a919de6ab71a19c96ac4df05654e2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, width):\n    pad=width-len(tokens); return tokens+[0]*pad, [1]*(len(tokens)+1)+[0]*max(0,pad-1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('one pad', solve([N],N+1), ([N]+[0]*N,[1]+[0]*N))\ncheck('many pads', solve([N],N+3), ([N]+[0]*(N+2),[1]+[0]*(N+2)))\ncheck('no pads', solve([1]*N,N), ([1]*N,[1]*N))\ncheck('empty', solve([],N), ([0]*N,[0]*N))\ncheck('single width', solve([7],1), ([7],[1]))\ncheck('two originals', solve([2,3],4), ([2,3,0,0],[1,1,0,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 short integer-token lists under the stated toy contract; results do not claim compatibility with a specific training framework. 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-sequence-batch-packing-right-padding-mask","generated_at":"2026-09-30T16:48:08.898427+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic toy packing rule models a common boundary in preparing bounded training sequences.","root_cause":"Mask construction subtracts one from the padding run.","sha256":"c8e1853eb832a3290e398972d741425b15e36272ecee350f2265b84c4c73e07a","title":"Right padding mask includes the first padded position · 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":30.019,"exit_code":1,"observations":[{"actual":[[1,0],[1]],"check":"one pad","expected":[[1,0],[1,0]],"passed":false},{"actual":[[1,0,0,0],[1,0,0]],"check":"many pads","expected":[[1,0,0,0],[1,0,0,0]],"passed":false},{"actual":[[1],[1]],"check":"no pads","expected":[[1],[1]],"passed":true},{"actual":[[0],[]],"check":"empty","expected":[[0],[0]],"passed":false},{"actual":[[7],[1]],"check":"single width","expected":[[7],[1]],"passed":true},{"actual":[[2,3,0,0],[1,1,0]],"check":"two originals","expected":[[2,3,0,0],[1,1,0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one pad\", \"actual\": [[1, 0], [1]], \"expected\": [[1, 0], [1, 0]], \"passed\": false}, {\"check\": \"many pads\", \"actual\": [[1, 0, 0, 0], [1, 0, 0]], \"expected\": [[1, 0, 0, 0], [1, 0, 0, 0]], \"passed\": false}, {\"check\": \"no pads\", \"actual\": [[1], [1]], \"expected\": [[1], [1]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[0], []], \"expected\": [[0], [0]], \"passed\": false}, {\"check\": \"single width\", \"actual\": [[7], [1]], \"expected\": [[7], [1]], \"passed\": true}, {\"check\": \"two originals\", \"actual\": [[2, 3, 0, 0], [1, 1, 0]], \"expected\": [[2, 3, 0, 0], [1, 1, 0, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.785,"exit_code":1,"observations":[{"actual":[[1,0],[1,1]],"check":"one pad","expected":[[1,0],[1,0]],"passed":false},{"actual":[[1,0,0,0],[1,1,0,0]],"check":"many pads","expected":[[1,0,0,0],[1,0,0,0]],"passed":false},{"actual":[[1],[1,1]],"check":"no pads","expected":[[1],[1]],"passed":false},{"actual":[[0],[1]],"check":"empty","expected":[[0],[0]],"passed":false},{"actual":[[7],[1,1]],"check":"single width","expected":[[7],[1]],"passed":false},{"actual":[[2,3,0,0],[1,1,1,0]],"check":"two originals","expected":[[2,3,0,0],[1,1,0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one pad\", \"actual\": [[1, 0], [1, 1]], \"expected\": [[1, 0], [1, 0]], \"passed\": false}, {\"check\": \"many pads\", \"actual\": [[1, 0, 0, 0], [1, 1, 0, 0]], \"expected\": [[1, 0, 0, 0], [1, 0, 0, 0]], \"passed\": false}, {\"check\": \"no pads\", \"actual\": [[1], [1, 1]], \"expected\": [[1], [1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[0], [1]], \"expected\": [[0], [0]], \"passed\": false}, {\"check\": \"single width\", \"actual\": [[7], [1, 1]], \"expected\": [[7], [1]], \"passed\": false}, {\"check\": \"two originals\", \"actual\": [[2, 3, 0, 0], [1, 1, 1, 0]], \"expected\": [[2, 3, 0, 0], [1, 1, 0, 0]], \"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."}}