FA-37246 / Table interactions / Open access
Table clipboard serialization: selected copy order · case 01
The table selected copy order result violates the stipulated table clipboard serialization contract.
ROOT CAUSE
The selected copy order decision uses "[r for r in reversed(rows) if r['id'] in selected]" instead of "[r for r in rows if r['id'] in selected]".
VERIFIED REPAIR
Apply the complete selected copy order rule: [r for r in rows if r['id'] in selected].
Unsuccessful approach: The attempted repair "[r for r in rows if r['id'] in selected[:1]]" still loses a required part of the table contract.
Case contract
Serialize selected rows in current table order and copyable visible columns in schema order. Optional labels precede records, display/raw selection is explicit, None is empty while zero is retained, TSV-special cells use doubled quotes, and records use CRLF without a trailing separator.
Why this case matters
An offline table UI model isolates table clipboard serialization, including adversarial row/column relationships.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, columns, selected, hidden, include_headers, raw):
cols=[c for c in columns if c['id'] not in hidden and c.get('copy',True)]
rr=[r for r in reversed(rows) if r['id'] in selected]
def text(v):
s='' if v is None else str(v)
return '"'+s.replace('"','""')+'"' if any(x in s for x in ('\t','\n','"')) else s
lines=[]
if include_headers: lines.append('\t'.join(text(c['label']) for c in cols))
for r in rr:
values=[r.get(c['id']) if raw else r.get('_display',{}).get(c['id'],r.get(c['id'])) for c in cols]
lines.append('\t'.join(text(v) for v in values))
return '\r\n'.join(lines)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('display selected rows', solve([{'id':'r1','a':1,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 2:
check('display selected rows', solve([{'id':'r1','a':2,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 3:
check('display selected rows', solve([{'id':'r1','a':3,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 4:
check('display selected rows', solve([{'id':'r1','a':4,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 5:
check('display selected rows', solve([{'id':'r1','a':5,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
check('variant formatted clipboard value', solve([{'id':'r','a':N,'_display':{'a':'value'+str(N)}}], [{'id':'a','label':'A'}], ['r'], [], False, False), 'value'+str(N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| display selected rows | Alpha Beta
x
shown 0 | Alpha Beta
shown 0
x | Failed |
| quoted cells | "x""y" "line
next" "x y" | "x""y" "line
next" "x y" | Passed |
| hidden private | 3 | 3 | Passed |
| raw mode | 2 | 2 | Passed |
| header-only | Alpha | Alpha | Passed |
| no selection | | | Passed |
| variant formatted clipboard value | value1 | value1 | Passed |
SHA-256 / f2cba8546781964ab6fda83583e25592a80502802440b54040ff5f7e52e7f108
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, columns, selected, hidden, include_headers, raw):
cols=[c for c in columns if c['id'] not in hidden and c.get('copy',True)]
rr=[r for r in rows if r['id'] in selected[:1]]
def text(v):
s='' if v is None else str(v)
return '"'+s.replace('"','""')+'"' if any(x in s for x in ('\t','\n','"')) else s
lines=[]
if include_headers: lines.append('\t'.join(text(c['label']) for c in cols))
for r in rr:
values=[r.get(c['id']) if raw else r.get('_display',{}).get(c['id'],r.get(c['id'])) for c in cols]
lines.append('\t'.join(text(v) for v in values))
return '\r\n'.join(lines)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('display selected rows', solve([{'id':'r1','a':1,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 2:
check('display selected rows', solve([{'id':'r1','a':2,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 3:
check('display selected rows', solve([{'id':'r1','a':3,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 4:
check('display selected rows', solve([{'id':'r1','a':4,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 5:
check('display selected rows', solve([{'id':'r1','a':5,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
check('variant formatted clipboard value', solve([{'id':'r','a':N,'_display':{'a':'value'+str(N)}}], [{'id':'a','label':'A'}], ['r'], [], False, False), 'value'+str(N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| display selected rows | Alpha Beta
x | Alpha Beta
shown 0
x | Failed |
| quoted cells | "x""y" "line
next" "x y" | "x""y" "line
next" "x y" | Passed |
| hidden private | 3 | 3 | Passed |
| raw mode | 2 | 2 | Passed |
| header-only | Alpha | Alpha | Passed |
| no selection | | | Passed |
| variant formatted clipboard value | value1 | value1 | Passed |
SHA-256 / f939da5f5661c77f8c0adc24e0f454f00d87c89869190f63f1d26d30250945f0
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, columns, selected, hidden, include_headers, raw):
cols=[c for c in columns if c['id'] not in hidden and c.get('copy',True)]
rr=[r for r in rows if r['id'] in selected]
def text(v):
s='' if v is None else str(v)
return '"'+s.replace('"','""')+'"' if any(x in s for x in ('\t','\n','"')) else s
lines=[]
if include_headers: lines.append('\t'.join(text(c['label']) for c in cols))
for r in rr:
values=[r.get(c['id']) if raw else r.get('_display',{}).get(c['id'],r.get(c['id'])) for c in cols]
lines.append('\t'.join(text(v) for v in values))
return '\r\n'.join(lines)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('display selected rows', solve([{'id':'r1','a':1,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 2:
check('display selected rows', solve([{'id':'r1','a':2,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 3:
check('display selected rows', solve([{'id':'r1','a':3,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 4:
check('display selected rows', solve([{'id':'r1','a':4,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
if N == 5:
check('display selected rows', solve([{'id':'r1','a':5,'b':0,'_display':{'a':'shown'}},{'id':'r2','a':None,'b':'x'}], [{'id':'a','label':'Alpha'},{'id':'b','label':'Beta'}], ['r2','r1'], [], True, False), 'Alpha\tBeta\r\nshown\t0\r\n\tx')
check('quoted cells', solve([{'id':'r','a':'x"y','b':'line\nnext','c':'x\ty'}], [{'id':'a','label':'A'},{'id':'b','label':'B'},{'id':'c','label':'C'}], ['r'], [], False, True), '"x""y"\t"line\nnext"\t"x\ty"')
check('hidden private', solve([{'id':'r','a':1,'b':2,'c':3}], [{'id':'a','label':'A'},{'id':'b','label':'B','copy':False},{'id':'c','label':'C'}], ['r'], ['a'], False, True), '3')
check('raw mode', solve([{'id':'r','a':2,'b':None,'_display':{'a':'two'}}], [{'id':'a','label':'A'},{'id':'b','label':'B'}], ['r'], [], False, True), '2\t')
check('header-only', solve([], [{'id':'a','label':'Alpha'}], [], [], True, True), 'Alpha')
check('no selection', solve([{'id':'r','a':1}], [{'id':'a','label':'A'}], [], [], False, False), '')
check('variant formatted clipboard value', solve([{'id':'r','a':N,'_display':{'a':'value'+str(N)}}], [{'id':'a','label':'A'}], ['r'], [], False, False), 'value'+str(N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| display selected rows | Alpha Beta
shown 0
x | Alpha Beta
shown 0
x | Passed |
| quoted cells | "x""y" "line
next" "x y" | "x""y" "line
next" "x y" | Passed |
| hidden private | 3 | 3 | Passed |
| raw mode | 2 | 2 | Passed |
| header-only | Alpha | Alpha | Passed |
| no selection | | | Passed |
| variant formatted clipboard value | value1 | value1 | Passed |
SHA-256 / 5981d927f7a37deb30551e3ed5974458bafc184a19eac1992fa8851d4eda7107
Verification & scope
Source row/column IDs are unique. Cell strings exclude lone carriage returns; quoting models tabs, LF, and double quotes only. Deterministic offline table UI model; no browser, DOM, framework, or standards conformance is claimed. 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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:42:59.307719+00:00.
Case digest / ff4e5cdcc8b740b65cbabbf0b8332be6609b436246aaccd28f85dd0f60cddcb0