{"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: window numbering starts from logical row one.","family":"s3-delimited-text-logical-row-window-number-origin","id":"FA-48686","implementations":{"attempt":{"sha256":"13cae447476d1baef02345e908688748e2dcda0ee0e5bacb4b982216f03b3864","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=-1\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"},"broken":{"sha256":"8844fe45aa7914878809d41f126a998d5ae50c070b78b3b97403cc7574fe726e","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=1\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"},"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-number-origin","generated_at":"2026-09-29T14:44:53.096510+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=[]; logical=0","root_cause":"Window numbering starts from logical row one.","sha256":"4b803513109035c12de777c2516570c9517e76c2be28ba6f6c22609058b44734","title":"Window numbering starts from logical row one · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.623,"exit_code":1,"observations":[{"actual":[[5,["z","y"]]],"check":"window","expected":[[4,["cell","x"]]],"passed":false},{"actual":[[2,["z","y"]]],"check":"all","expected":[[1,["cell","x"]],[2,["z","y"]]],"passed":false},{"actual":[[2,["cell"]]],"check":"space line","expected":[[1,[" "]]],"passed":false},{"actual":[],"check":"empty window","expected":[],"passed":true},{"actual":[],"check":"beyond","expected":[],"passed":true},{"actual":[[2,["cell"]]],"check":"indented comment","expected":[[1,[" #data"]]],"passed":false},{"actual":[],"check":"zero lines","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"window\", \"actual\": [[5, [\"z\", \"y\"]]], \"expected\": [[4, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"all\", \"actual\": [[2, [\"z\", \"y\"]]], \"expected\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"passed\": false}, {\"check\": \"space line\", \"actual\": [[2, [\"cell\"]]], \"expected\": [[1, [\" \"]]], \"passed\": false}, {\"check\": \"empty window\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"beyond\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"indented comment\", \"actual\": [[2, [\"cell\"]]], \"expected\": [[1, [\" #data\"]]], \"passed\": false}, {\"check\": \"zero lines\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.06,"exit_code":1,"observations":[{"actual":[[2,["a","b"]]],"check":"window","expected":[[4,["cell","x"]]],"passed":false},{"actual":[[1,["cell","x"]]],"check":"all","expected":[[1,["cell","x"]],[2,["z","y"]]],"passed":false},{"actual":[],"check":"space line","expected":[[1,[" "]]],"passed":false},{"actual":[],"check":"empty window","expected":[],"passed":true},{"actual":[],"check":"beyond","expected":[],"passed":true},{"actual":[],"check":"indented comment","expected":[[1,[" #data"]]],"passed":false},{"actual":[],"check":"zero lines","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"window\", \"actual\": [[2, [\"a\", \"b\"]]], \"expected\": [[4, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"all\", \"actual\": [[1, [\"cell\", \"x\"]]], \"expected\": [[1, [\"cell\", \"x\"]], [2, [\"z\", \"y\"]]], \"passed\": false}, {\"check\": \"space line\", \"actual\": [], \"expected\": [[1, [\" \"]]], \"passed\": false}, {\"check\": \"empty window\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"beyond\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"indented comment\", \"actual\": [], \"expected\": [[1, [\" #data\"]]], \"passed\": false}, {\"check\": \"zero lines\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.839,"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"}