{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":11,"contract":"Resolve an ordered comma column selector against width. Decimal selectors are one based, ranges a-b include both endpoints, and * adds every column not selected earlier. Explicit duplicate selections are retained. Reject malformed, reversed or out-of-bound numeric ranges. Return zero-based physical indexes.","contract_signature":"data","evaluation_group":"s3-delimited-text-column-selector","failed_approach":"Extending the endpoint one too far selects an extra column.","family":"s3-delimited-text-column-selector-range-upper","id":"FA-47921","implementations":{"attempt":{"sha256":"b9882e3c548d6724920257ea46e7bc934c6d03c29998df8df49bf76503bf2f93","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 = []\n    for token in data['selector'].split(','):\n        if token == '*':\n            out.extend(i for i in range(data['width']) if i not in out)\n            continue\n        parts = token.split('-')\n        if len(parts) not in (1,2) or any(not p.isascii() or not p.isdecimal() for p in parts): return None\n        start, end = int(parts[0]), int(parts[-1])\n        if not 1 <= start <= end <= data['width']: return None\n        out.extend(range(start-1, min(end+1, data['width'])))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ordered', solve(_vary({'selector': '3,1', 'width': 3})), _vary([2, 0]))\ncheck('range', solve(_vary({'selector': '2-4', 'width': 4})), _vary([1, 2, 3]))\ncheck('wildcard', solve(_vary({'selector': '2,*', 'width': 3})), _vary([1, 0, 2]))\ncheck('duplicate', solve(_vary({'selector': '2,2', 'width': 3})), _vary([1, 1]))\ncheck('reversed', solve(_vary({'selector': '3-1', 'width': 3})), _vary(None))\ncheck('zero', solve(_vary({'selector': '0', 'width': 3})), _vary(None))\ncheck('outside', solve(_vary({'selector': '4', 'width': 3})), _vary(None))\ncheck('bad range', solve(_vary({'selector': '1-2-3', 'width': 3})), _vary(None))\ncheck('empty', solve(_vary({'selector': '', 'width': 3})), _vary(None))\ncheck('variable width', solve(_vary({'selector': '1,*', 'width': 4})), _vary([0, 1, 2, 3]))\ncheck('variant selector width', solve({'selector':'1,*','width':N+2}), list(range(N+2)))\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":"10e25acfd697acd19840bd7eba0847e48687457f11cf3b0e15e0d912cb9d06a0","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 = []\n    for token in data['selector'].split(','):\n        if token == '*':\n            out.extend(i for i in range(data['width']) if i not in out)\n            continue\n        parts = token.split('-')\n        if len(parts) not in (1,2) or any(not p.isascii() or not p.isdecimal() for p in parts): return None\n        start, end = int(parts[0]), int(parts[-1])\n        if not 1 <= start <= end <= data['width']: return None\n        out.extend(range(start-1, end-1))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ordered', solve(_vary({'selector': '3,1', 'width': 3})), _vary([2, 0]))\ncheck('range', solve(_vary({'selector': '2-4', 'width': 4})), _vary([1, 2, 3]))\ncheck('wildcard', solve(_vary({'selector': '2,*', 'width': 3})), _vary([1, 0, 2]))\ncheck('duplicate', solve(_vary({'selector': '2,2', 'width': 3})), _vary([1, 1]))\ncheck('reversed', solve(_vary({'selector': '3-1', 'width': 3})), _vary(None))\ncheck('zero', solve(_vary({'selector': '0', 'width': 3})), _vary(None))\ncheck('outside', solve(_vary({'selector': '4', 'width': 3})), _vary(None))\ncheck('bad range', solve(_vary({'selector': '1-2-3', 'width': 3})), _vary(None))\ncheck('empty', solve(_vary({'selector': '', 'width': 3})), _vary(None))\ncheck('variable width', solve(_vary({'selector': '1,*', 'width': 4})), _vary([0, 1, 2, 3]))\ncheck('variant selector width', solve({'selector':'1,*','width':N+2}), list(range(N+2)))\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-column-selector-range-upper","generated_at":"2026-09-29T14:44:46.186850+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.","root_cause":"The range constructor treats an inclusive selector endpoint as exclusive.","sha256":"af63280e8fc7576c7f49f217221d49eb85a5e6c7f3304066528c9953d2c8bcf4","title":"A column range omits its inclusive last endpoint · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.255,"exit_code":1,"observations":[{"actual":[2,0,1],"check":"ordered","expected":[2,0],"passed":false},{"actual":[1,2,3],"check":"range","expected":[1,2,3],"passed":true},{"actual":[1,2,0],"check":"wildcard","expected":[1,0,2],"passed":false},{"actual":[1,2,1,2],"check":"duplicate","expected":[1,1],"passed":false},{"actual":null,"check":"reversed","expected":null,"passed":true},{"actual":null,"check":"zero","expected":null,"passed":true},{"actual":null,"check":"outside","expected":null,"passed":true},{"actual":null,"check":"bad range","expected":null,"passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":[0,1,2,3],"check":"variable width","expected":[0,1,2,3],"passed":true},{"actual":[0,1,2],"check":"variant selector width","expected":[0,1,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ordered\", \"actual\": [2, 0, 1], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"range\", \"actual\": [1, 2, 3], \"expected\": [1, 2, 3], \"passed\": true}, {\"check\": \"wildcard\", \"actual\": [1, 2, 0], \"expected\": [1, 0, 2], \"passed\": false}, {\"check\": \"duplicate\", \"actual\": [1, 2, 1, 2], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"reversed\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"outside\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"variable width\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"variant selector width\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.435,"exit_code":1,"observations":[{"actual":[],"check":"ordered","expected":[2,0],"passed":false},{"actual":[1,2],"check":"range","expected":[1,2,3],"passed":false},{"actual":[0,1,2],"check":"wildcard","expected":[1,0,2],"passed":false},{"actual":[],"check":"duplicate","expected":[1,1],"passed":false},{"actual":null,"check":"reversed","expected":null,"passed":true},{"actual":null,"check":"zero","expected":null,"passed":true},{"actual":null,"check":"outside","expected":null,"passed":true},{"actual":null,"check":"bad range","expected":null,"passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":[0,1,2,3],"check":"variable width","expected":[0,1,2,3],"passed":true},{"actual":[0,1,2],"check":"variant selector width","expected":[0,1,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ordered\", \"actual\": [], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"range\", \"actual\": [1, 2], \"expected\": [1, 2, 3], \"passed\": false}, {\"check\": \"wildcard\", \"actual\": [0, 1, 2], \"expected\": [1, 0, 2], \"passed\": false}, {\"check\": \"duplicate\", \"actual\": [], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"reversed\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"outside\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"variable width\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"variant selector width\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}], \"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."}}