{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Read comma rows, with an R|count control line repeating the most recent data row count additional times. Count must be positive ASCII decimal; controls cannot precede data. Repeated rows do not become a distinct source row. Return independent row values in order; ordinary payloads contain no pipe.","evaluation_group":"s3-delimited-text-repeated-rows","failed_approach":"The alternate implementation still violates the same declared invariant: repeated rows are prepended ahead of earlier data.","family":"s3-delimited-text-repeated-rows-repeat-position","id":"FA-48476","implementations":{"attempt":{"sha256":"4e98dcc33469a5f83e5d5416e8af3de5248ee038b4eff4a66b17f64072a57efe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    out=[]; previous=None\n    for line in data:\n        if line.startswith('R|'):\n            token=line[2:]\n            if previous is None or not token.isascii() or not token.isdecimal() or int(token)<1: return None\n            out=[list(previous) for _ in range(int(token))]+out\n        else:\n            if '|' in line: return None\n            previous=line.split(',')\n            out.append(previous)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeat', solve(_vary(['@,x', 'R|2'])), _vary([['@', 'x'], ['@', 'x'], ['@', 'x']]))\ncheck('new source', solve(_vary(['a,b', 'R|1', '@,z', 'R|1'])), _vary([['a', 'b'], ['a', 'b'], ['@', 'z'], ['@', 'z']]))\ncheck('orphan', solve(_vary(['R|2'])), _vary(None))\ncheck('zero', solve(_vary(['a', 'R|0'])), _vary(None))\ncheck('negative', solve(_vary(['a', 'R|-1'])), _vary(None))\ncheck('empty row', solve(_vary(['', 'R|1'])), _vary([[''], ['']]))\ncheck('chained', solve(_vary(['@', 'R|1', 'R|1'])), _vary([['@'], ['@'], ['@']]))\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":"eaf82a15206eb8318d7abd2a1a7dda1d6240a2d88d66ae5f337356ba50792948","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    out=[]; previous=None\n    for line in data:\n        if line.startswith('R|'):\n            token=line[2:]\n            if previous is None or not token.isascii() or not token.isdecimal() or int(token)<1: return None\n            out[0:0]=[list(previous) for _ in range(int(token))]\n        else:\n            if '|' in line: return None\n            previous=line.split(',')\n            out.append(previous)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeat', solve(_vary(['@,x', 'R|2'])), _vary([['@', 'x'], ['@', 'x'], ['@', 'x']]))\ncheck('new source', solve(_vary(['a,b', 'R|1', '@,z', 'R|1'])), _vary([['a', 'b'], ['a', 'b'], ['@', 'z'], ['@', 'z']]))\ncheck('orphan', solve(_vary(['R|2'])), _vary(None))\ncheck('zero', solve(_vary(['a', 'R|0'])), _vary(None))\ncheck('negative', solve(_vary(['a', 'R|-1'])), _vary(None))\ncheck('empty row', solve(_vary(['', 'R|1'])), _vary([[''], ['']]))\ncheck('chained', solve(_vary(['@', 'R|1', 'R|1'])), _vary([['@'], ['@'], ['@']]))\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":"0404f6f8095c5adfbca880b90dfe3b84c3c8f87c21e7d0bc82d0f215d4412c9b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    out=[]; previous=None\n    for line in data:\n        if line.startswith('R|'):\n            token=line[2:]\n            if previous is None or not token.isascii() or not token.isdecimal() or int(token)<1: return None\n            out.extend([list(previous) for _ in range(int(token))])\n        else:\n            if '|' in line: return None\n            previous=line.split(',')\n            out.append(previous)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeat', solve(_vary(['@,x', 'R|2'])), _vary([['@', 'x'], ['@', 'x'], ['@', 'x']]))\ncheck('new source', solve(_vary(['a,b', 'R|1', '@,z', 'R|1'])), _vary([['a', 'b'], ['a', 'b'], ['@', 'z'], ['@', 'z']]))\ncheck('orphan', solve(_vary(['R|2'])), _vary(None))\ncheck('zero', solve(_vary(['a', 'R|0'])), _vary(None))\ncheck('negative', solve(_vary(['a', 'R|-1'])), _vary(None))\ncheck('empty row', solve(_vary(['', 'R|1'])), _vary([[''], ['']]))\ncheck('chained', solve(_vary(['@', 'R|1', 'R|1'])), _vary([['@'], ['@'], ['@']]))\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":"Deterministic bounded in-memory model. No claim of complete CSV or external format conformance. 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":"s3-delimited-text-repeated-rows-repeat-position","generated_at":"2026-09-29T14:44:51.165246+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Delimited interchange needs explicit framing, schema and field semantics at ingestion and emission boundaries.","repair":"Preserve the named invariant at the faulty decision: out.extend([list(previous) for _ in range(int(token))])","root_cause":"Repeated rows are prepended ahead of earlier data.","sha256":"afe02f545a85204ea7b5cb848ce9b88ae8f3ee9a306df01db24fc32717c06ec4","title":"Repeated rows are prepended ahead of earlier data · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.255,"exit_code":1,"observations":[{"actual":[["cell","x"],["cell","x"],["cell","x"]],"check":"repeat","expected":[["cell","x"],["cell","x"],["cell","x"]],"passed":true},{"actual":[["cell","z"],["a","b"],["a","b"],["cell","z"]],"check":"new source","expected":[["a","b"],["a","b"],["cell","z"],["cell","z"]],"passed":false},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"zero","expected":null,"passed":true},{"actual":null,"check":"negative","expected":null,"passed":true},{"actual":[[""],[""]],"check":"empty row","expected":[[""],[""]],"passed":true},{"actual":[["cell"],["cell"],["cell"]],"check":"chained","expected":[["cell"],["cell"],["cell"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeat\", \"actual\": [[\"cell\", \"x\"], [\"cell\", \"x\"], [\"cell\", \"x\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"x\"], [\"cell\", \"x\"]], \"passed\": true}, {\"check\": \"new source\", \"actual\": [[\"cell\", \"z\"], [\"a\", \"b\"], [\"a\", \"b\"], [\"cell\", \"z\"]], \"expected\": [[\"a\", \"b\"], [\"a\", \"b\"], [\"cell\", \"z\"], [\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"negative\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[\"\"], [\"\"]], \"expected\": [[\"\"], [\"\"]], \"passed\": true}, {\"check\": \"chained\", \"actual\": [[\"cell\"], [\"cell\"], [\"cell\"]], \"expected\": [[\"cell\"], [\"cell\"], [\"cell\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.898,"exit_code":1,"observations":[{"actual":[["cell","x"],["cell","x"],["cell","x"]],"check":"repeat","expected":[["cell","x"],["cell","x"],["cell","x"]],"passed":true},{"actual":[["cell","z"],["a","b"],["a","b"],["cell","z"]],"check":"new source","expected":[["a","b"],["a","b"],["cell","z"],["cell","z"]],"passed":false},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"zero","expected":null,"passed":true},{"actual":null,"check":"negative","expected":null,"passed":true},{"actual":[[""],[""]],"check":"empty row","expected":[[""],[""]],"passed":true},{"actual":[["cell"],["cell"],["cell"]],"check":"chained","expected":[["cell"],["cell"],["cell"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeat\", \"actual\": [[\"cell\", \"x\"], [\"cell\", \"x\"], [\"cell\", \"x\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"x\"], [\"cell\", \"x\"]], \"passed\": true}, {\"check\": \"new source\", \"actual\": [[\"cell\", \"z\"], [\"a\", \"b\"], [\"a\", \"b\"], [\"cell\", \"z\"]], \"expected\": [[\"a\", \"b\"], [\"a\", \"b\"], [\"cell\", \"z\"], [\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"negative\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[\"\"], [\"\"]], \"expected\": [[\"\"], [\"\"]], \"passed\": true}, {\"check\": \"chained\", \"actual\": [[\"cell\"], [\"cell\"], [\"cell\"]], \"expected\": [[\"cell\"], [\"cell\"], [\"cell\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.255,"exit_code":0,"observations":[{"actual":[["cell","x"],["cell","x"],["cell","x"]],"check":"repeat","expected":[["cell","x"],["cell","x"],["cell","x"]],"passed":true},{"actual":[["a","b"],["a","b"],["cell","z"],["cell","z"]],"check":"new source","expected":[["a","b"],["a","b"],["cell","z"],["cell","z"]],"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"zero","expected":null,"passed":true},{"actual":null,"check":"negative","expected":null,"passed":true},{"actual":[[""],[""]],"check":"empty row","expected":[[""],[""]],"passed":true},{"actual":[["cell"],["cell"],["cell"]],"check":"chained","expected":[["cell"],["cell"],["cell"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeat\", \"actual\": [[\"cell\", \"x\"], [\"cell\", \"x\"], [\"cell\", \"x\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"x\"], [\"cell\", \"x\"]], \"passed\": true}, {\"check\": \"new source\", \"actual\": [[\"a\", \"b\"], [\"a\", \"b\"], [\"cell\", \"z\"], [\"cell\", \"z\"]], \"expected\": [[\"a\", \"b\"], [\"a\", \"b\"], [\"cell\", \"z\"], [\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"negative\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[\"\"], [\"\"]], \"expected\": [[\"\"], [\"\"]], \"passed\": true}, {\"check\": \"chained\", \"actual\": [[\"cell\"], [\"cell\"], [\"cell\"]], \"expected\": [[\"cell\"], [\"cell\"], [\"cell\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}