{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Select a half-open zero-based logical row window [start,stop) from physical comma lines. Column-zero # lines and completely empty physical lines are ignored before numbering; whitespace-only lines remain data. Return [one-based physical line number, split cells] for selected logical rows.","evaluation_group":"s3-delimited-text-logical-row-window","failed_approach":"The alternate implementation still violates the same declared invariant: a row window counts comment and blank physical records.","family":"s3-delimited-text-logical-row-window-logical-numbering","id":"FA-48666","implementations":{"attempt":{"sha256":"f4eaca5dea765630326de00bcd038d28e11d0be618f5a63dd2ca8c1576fda333","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=[]; logical=0\n    for physical,line in enumerate(data['lines'],1):\n        if line=='' or line.startswith('#'): continue\n        if data['start']<=logical<data['stop']: out.append([physical,line.split(',')])\n        logical+=physical\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('window', solve(_vary({'lines': ['#note', 'a,b', '', '@,x', 'z,y'], 'start': 1, 'stop': 2})), _vary([[4, ['@', 'x']]]))\ncheck('all', solve(_vary({'lines': ['@,x', 'z,y'], 'start': 0, 'stop': 2})), _vary([[1, ['@', 'x']], [2, ['z', 'y']]]))\ncheck('space line', solve(_vary({'lines': [' ', '@'], 'start': 0, 'stop': 1})), _vary([[1, [' ']]]))\ncheck('empty window', solve(_vary({'lines': ['@'], 'start': 0, 'stop': 0})), _vary([]))\ncheck('beyond', solve(_vary({'lines': ['@'], 'start': 2, 'stop': 4})), _vary([]))\ncheck('indented comment', solve(_vary({'lines': [' #data', '@'], 'start': 0, 'stop': 1})), _vary([[1, [' #data']]]))\ncheck('zero lines', solve(_vary({'lines': [], 'start': 0, 'stop': 3})), _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":"4511970cc7c41c414ca21fb44a3ecee179549522577265f799df68c8ac388d6c","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=[]; logical=0\n    for physical,line in enumerate(data['lines'],1):\n        if line=='' or line.startswith('#'): continue\n        if data['start']<=logical<data['stop']: out.append([physical,line.split(',')])\n        logical=physical\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('window', solve(_vary({'lines': ['#note', 'a,b', '', '@,x', 'z,y'], 'start': 1, 'stop': 2})), _vary([[4, ['@', 'x']]]))\ncheck('all', solve(_vary({'lines': ['@,x', 'z,y'], 'start': 0, 'stop': 2})), _vary([[1, ['@', 'x']], [2, ['z', 'y']]]))\ncheck('space line', solve(_vary({'lines': [' ', '@'], 'start': 0, 'stop': 1})), _vary([[1, [' ']]]))\ncheck('empty window', solve(_vary({'lines': ['@'], 'start': 0, 'stop': 0})), _vary([]))\ncheck('beyond', solve(_vary({'lines': ['@'], 'start': 2, 'stop': 4})), _vary([]))\ncheck('indented comment', solve(_vary({'lines': [' #data', '@'], 'start': 0, 'stop': 1})), _vary([[1, [' #data']]]))\ncheck('zero lines', solve(_vary({'lines': [], 'start': 0, 'stop': 3})), _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":"7576fa0bf649b7cfb3210efe2fe14c053e61c6dcd92d4a5fb2b8e7bade5dbe37","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=[]; logical=0\n    for physical,line in enumerate(data['lines'],1):\n        if line=='' or line.startswith('#'): continue\n        if data['start']<=logical<data['stop']: out.append([physical,line.split(',')])\n        logical+=1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('window', solve(_vary({'lines': ['#note', 'a,b', '', '@,x', 'z,y'], 'start': 1, 'stop': 2})), _vary([[4, ['@', 'x']]]))\ncheck('all', solve(_vary({'lines': ['@,x', 'z,y'], 'start': 0, 'stop': 2})), _vary([[1, ['@', 'x']], [2, ['z', 'y']]]))\ncheck('space line', solve(_vary({'lines': [' ', '@'], 'start': 0, 'stop': 1})), _vary([[1, [' ']]]))\ncheck('empty window', solve(_vary({'lines': ['@'], 'start': 0, 'stop': 0})), _vary([]))\ncheck('beyond', solve(_vary({'lines': ['@'], 'start': 2, 'stop': 4})), _vary([]))\ncheck('indented comment', solve(_vary({'lines': [' #data', '@'], 'start': 0, 'stop': 1})), _vary([[1, [' #data']]]))\ncheck('zero lines', solve(_vary({'lines': [], 'start': 0, 'stop': 3})), _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-logical-row-window-logical-numbering","generated_at":"2026-09-29T14:44:52.795329+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: logical+=1","root_cause":"A row window counts comment and blank physical records.","sha256":"a582fe5c6642ac1949d94f7139c9f33312c1e1fdc5db2b2e012f2ce29efd7808","title":"A row window counts comment and blank physical records · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.951,"exit_code":1,"observations":[{"actual":[],"check":"window","expected":[[4,["cell","x"]]],"passed":false},{"actual":[[1,["cell","x"]],[2,["z","y"]]],"check":"all","expected":[[1,["cell","x"]],[2,["z","y"]]],"passed":true},{"actual":[[1,[" "]]],"check":"space line","expected":[[1,[" "]]],"passed":true},{"actual":[],"check":"empty window","expected":[],"passed":true},{"actual":[],"check":"beyond","expected":[],"passed":true},{"actual":[[1,[" #data"]]],"check":"indented comment","expected":[[1,[" #data"]]],"passed":true},{"actual":[],"check":"zero lines","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"window\", \"actual\": [], \"expected\": [[4, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"all\", \"actual\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"expected\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"passed\": true}, {\"check\": \"space line\", \"actual\": [[1, [\" \"]]], \"expected\": [[1, [\" \"]]], \"passed\": true}, {\"check\": \"empty window\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"beyond\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"indented comment\", \"actual\": [[1, [\" #data\"]]], \"expected\": [[1, [\" #data\"]]], \"passed\": true}, {\"check\": \"zero lines\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.99,"exit_code":1,"observations":[{"actual":[],"check":"window","expected":[[4,["cell","x"]]],"passed":false},{"actual":[[1,["cell","x"]],[2,["z","y"]]],"check":"all","expected":[[1,["cell","x"]],[2,["z","y"]]],"passed":true},{"actual":[[1,[" "]]],"check":"space line","expected":[[1,[" "]]],"passed":true},{"actual":[],"check":"empty window","expected":[],"passed":true},{"actual":[],"check":"beyond","expected":[],"passed":true},{"actual":[[1,[" #data"]]],"check":"indented comment","expected":[[1,[" #data"]]],"passed":true},{"actual":[],"check":"zero lines","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"window\", \"actual\": [], \"expected\": [[4, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"all\", \"actual\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"expected\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"passed\": true}, {\"check\": \"space line\", \"actual\": [[1, [\" \"]]], \"expected\": [[1, [\" \"]]], \"passed\": true}, {\"check\": \"empty window\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"beyond\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"indented comment\", \"actual\": [[1, [\" #data\"]]], \"expected\": [[1, [\" #data\"]]], \"passed\": true}, {\"check\": \"zero lines\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.265,"exit_code":0,"observations":[{"actual":[[4,["cell","x"]]],"check":"window","expected":[[4,["cell","x"]]],"passed":true},{"actual":[[1,["cell","x"]],[2,["z","y"]]],"check":"all","expected":[[1,["cell","x"]],[2,["z","y"]]],"passed":true},{"actual":[[1,[" "]]],"check":"space line","expected":[[1,[" "]]],"passed":true},{"actual":[],"check":"empty window","expected":[],"passed":true},{"actual":[],"check":"beyond","expected":[],"passed":true},{"actual":[[1,[" #data"]]],"check":"indented comment","expected":[[1,[" #data"]]],"passed":true},{"actual":[],"check":"zero lines","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"window\", \"actual\": [[4, [\"cell\", \"x\"]]], \"expected\": [[4, [\"cell\", \"x\"]]], \"passed\": true}, {\"check\": \"all\", \"actual\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"expected\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"passed\": true}, {\"check\": \"space line\", \"actual\": [[1, [\" \"]]], \"expected\": [[1, [\" \"]]], \"passed\": true}, {\"check\": \"empty window\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"beyond\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"indented comment\", \"actual\": [[1, [\" #data\"]]], \"expected\": [[1, [\" #data\"]]], \"passed\": true}, {\"check\": \"zero lines\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}