{"abstract":"Burrows-Wheeler inversion ignores the primary row.","category":"Compression format semantics","checks":6,"contract":"Invert a toy BWT by reconstructing sorted rotations from the last column and selecting the supplied zero-based primary row. Empty last column yields empty text.","evaluation_group":"model-3e8c36e2547928ab","failed_approach":"Choosing the last rotation merely switches which primary positions fail.","family":"z-compression-bwt-primary-row","id":"FA-11626","implementations":{"attempt":{"sha256":"19e18c5e7b0a541a783331086b26e51be198e5bc7a32139d1895f0ce3e0c0dea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(last, primary):\n    rows=['']*len(last)\n    for _ in last: rows=sorted(last[i]+rows[i] for i in range(len(last)))\n    return rows[-1] if rows else ''\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle primary',solve('b'+'a'*N,1),'a'*(N-1)+'ba')\ncheck('banana',solve('nnbaaa',3),'banana')\ncheck('first primary',solve('ba',0),'ab')\ncheck('last primary',solve('ba',1),'ba')\ncheck('empty',solve('',0),'')\ncheck('repeated symbol',solve('aaa',2),'aaa')\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":"8af7865f43b2b8d8d8fd1f70c899c04f6e72fa64a0196c82266694b20f2d987e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(last, primary):\n    rows=['']*len(last)\n    for _ in last: rows=sorted(last[i]+rows[i] for i in range(len(last)))\n    return rows[0] if rows else ''\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle primary',solve('b'+'a'*N,1),'a'*(N-1)+'ba')\ncheck('banana',solve('nnbaaa',3),'banana')\ncheck('first primary',solve('ba',0),'ab')\ncheck('last primary',solve('ba',1),'ba')\ncheck('empty',solve('',0),'')\ncheck('repeated symbol',solve('aaa',2),'aaa')\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"},"fixed":{"sha256":"f09edfcb044be84009511177c62c650f0da5d2dbce3b44836f0e3ad118785d72","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(last, primary):\n    rows=['']*len(last)\n    for _ in last: rows=sorted(last[i]+rows[i] for i in range(len(last)))\n    return rows[primary] if rows else ''\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle primary',solve('b'+'a'*N,1),'a'*(N-1)+'ba')\ncheck('banana',solve('nnbaaa',3),'banana')\ncheck('first primary',solve('ba',0),'ab')\ncheck('last primary',solve('ba',1),'ba')\ncheck('empty',solve('',0),'')\ncheck('repeated symbol',solve('aaa',2),'aaa')\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":"Controlled educational model, not a complete implementation of a production compression format. 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":"z-compression-bwt-primary-row","generated_at":"2026-09-29T14:38:49.618665+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small offline codec model isolates a compression-specific failure without external files or libraries.","repair":"Reconstruct the rotation table and select the recorded primary row rather than assuming a sorted endpoint.","root_cause":"The inverse chooses the first sorted rotation regardless of recorded primary index.","sha256":"6466804e1ef4b00ceae5002e06073f372d328332ba278d39a8f734a555371432","title":"Burrows-Wheeler inversion ignores the primary row · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.051,"exit_code":1,"observations":[{"actual":"ba","check":"middle primary","expected":"ba","passed":true},{"actual":"nanaba","check":"banana","expected":"banana","passed":false},{"actual":"ba","check":"first primary","expected":"ab","passed":false},{"actual":"ba","check":"last primary","expected":"ba","passed":true},{"actual":"","check":"empty","expected":"","passed":true},{"actual":"aaa","check":"repeated symbol","expected":"aaa","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle primary\", \"actual\": \"ba\", \"expected\": \"ba\", \"passed\": true}, {\"check\": \"banana\", \"actual\": \"nanaba\", \"expected\": \"banana\", \"passed\": false}, {\"check\": \"first primary\", \"actual\": \"ba\", \"expected\": \"ab\", \"passed\": false}, {\"check\": \"last primary\", \"actual\": \"ba\", \"expected\": \"ba\", \"passed\": true}, {\"check\": \"empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"repeated symbol\", \"actual\": \"aaa\", \"expected\": \"aaa\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.621,"exit_code":1,"observations":[{"actual":"ab","check":"middle primary","expected":"ba","passed":false},{"actual":"abanan","check":"banana","expected":"banana","passed":false},{"actual":"ab","check":"first primary","expected":"ab","passed":true},{"actual":"ab","check":"last primary","expected":"ba","passed":false},{"actual":"","check":"empty","expected":"","passed":true},{"actual":"aaa","check":"repeated symbol","expected":"aaa","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle primary\", \"actual\": \"ab\", \"expected\": \"ba\", \"passed\": false}, {\"check\": \"banana\", \"actual\": \"abanan\", \"expected\": \"banana\", \"passed\": false}, {\"check\": \"first primary\", \"actual\": \"ab\", \"expected\": \"ab\", \"passed\": true}, {\"check\": \"last primary\", \"actual\": \"ab\", \"expected\": \"ba\", \"passed\": false}, {\"check\": \"empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"repeated symbol\", \"actual\": \"aaa\", \"expected\": \"aaa\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.625,"exit_code":0,"observations":[{"actual":"ba","check":"middle primary","expected":"ba","passed":true},{"actual":"banana","check":"banana","expected":"banana","passed":true},{"actual":"ab","check":"first primary","expected":"ab","passed":true},{"actual":"ba","check":"last primary","expected":"ba","passed":true},{"actual":"","check":"empty","expected":"","passed":true},{"actual":"aaa","check":"repeated symbol","expected":"aaa","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle primary\", \"actual\": \"ba\", \"expected\": \"ba\", \"passed\": true}, {\"check\": \"banana\", \"actual\": \"banana\", \"expected\": \"banana\", \"passed\": true}, {\"check\": \"first primary\", \"actual\": \"ab\", \"expected\": \"ab\", \"passed\": true}, {\"check\": \"last primary\", \"actual\": \"ba\", \"expected\": \"ba\", \"passed\": true}, {\"check\": \"empty\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"repeated symbol\", \"actual\": \"aaa\", \"expected\": \"aaa\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}