FA-11836 / Document structure integrity / Open access
A cell is placed into a column occupied by a previous row span · case 01
A cell is placed into a column occupied by a previous row span in the controlled document model.
ROOT CAUSE
Logical row cells are numbered without consulting vertical merge occupancy.
VERIFIED REPAIR
Track the exclusive ending row of each occupied column and release it at that boundary.
Unsuccessful approach: Remembering occupied columns forever prevents reuse after a row span expires.
Case contract
Rows contain positive row-span lengths for unit-width cells. Place each row cell into the first free column at or after the preceding cell; previous spans occupy their columns for exactly their span rows.
Why this case matters
Structured editing must preserve document semantics independently of visual rendering.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return [list(range(len(row))) for row in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [(([[2],[1],[N]],),[[0],[1],[0]]), (([],),[]), (([[]],),[[]]), (([[1,1],[1]],),[[0,1],[0]]), (([[3],[2],[1],[1]],),[[0],[1],[2],[0]]), (([[2,1],[],[1]],),[[0,1],[],[0]])]
for i, (args, expected) in enumerate(fixtures):
check("document fixture " + str(i), solve(*args), expected)
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 |
|---|---|---|---|
| document fixture 0 | [[0], [0], [0]] | [[0], [1], [0]] | Failed |
| document fixture 1 | [] | [] | Passed |
| document fixture 2 | [[]] | [[]] | Passed |
| document fixture 3 | [[0, 1], [0]] | [[0, 1], [0]] | Passed |
| document fixture 4 | [[0], [0], [0], [0]] | [[0], [1], [2], [0]] | Failed |
| document fixture 5 | [[0, 1], [], [0]] | [[0, 1], [], [0]] | Passed |
SHA-256 / d748076570aa957809c55137735feef93521ba857b33b5f31a7b6e3608370d71
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
out=[]
occupied=set()
for row in rows:
positions=[]
col=0
for span in row:
while col in occupied: col+=1
positions.append(col)
if span>1: occupied.add(col)
col+=1
out.append(positions)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [(([[2],[1],[N]],),[[0],[1],[0]]), (([],),[]), (([[]],),[[]]), (([[1,1],[1]],),[[0,1],[0]]), (([[3],[2],[1],[1]],),[[0],[1],[2],[0]]), (([[2,1],[],[1]],),[[0,1],[],[0]])]
for i, (args, expected) in enumerate(fixtures):
check("document fixture " + str(i), solve(*args), expected)
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 |
|---|---|---|---|
| document fixture 0 | [[0], [1], [1]] | [[0], [1], [0]] | Failed |
| document fixture 1 | [] | [] | Passed |
| document fixture 2 | [[]] | [[]] | Passed |
| document fixture 3 | [[0, 1], [0]] | [[0, 1], [0]] | Passed |
| document fixture 4 | [[0], [1], [2], [2]] | [[0], [1], [2], [0]] | Failed |
| document fixture 5 | [[0, 1], [], [1]] | [[0, 1], [], [0]] | Failed |
SHA-256 / 4ffcc0bde17835993e46fc7c952b53ab66aeeb46a46d52fe83098720ae672fa9
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
out=[]
ends={}
for r,row in enumerate(rows):
positions=[]
col=0
for span in row:
while ends.get(col,0)>r: col+=1
positions.append(col)
ends[col]=r+span
col+=1
out.append(positions)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [(([[2],[1],[N]],),[[0],[1],[0]]), (([],),[]), (([[]],),[[]]), (([[1,1],[1]],),[[0,1],[0]]), (([[3],[2],[1],[1]],),[[0],[1],[2],[0]]), (([[2,1],[],[1]],),[[0,1],[],[0]])]
for i, (args, expected) in enumerate(fixtures):
check("document fixture " + str(i), solve(*args), expected)
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 |
|---|---|---|---|
| document fixture 0 | [[0], [1], [0]] | [[0], [1], [0]] | Passed |
| document fixture 1 | [] | [] | Passed |
| document fixture 2 | [[]] | [[]] | Passed |
| document fixture 3 | [[0, 1], [0]] | [[0, 1], [0]] | Passed |
| document fixture 4 | [[0], [1], [2], [0]] | [[0], [1], [2], [0]] | Passed |
| document fixture 5 | [[0, 1], [], [0]] | [[0, 1], [], [0]] | Passed |
SHA-256 / 4fb8e50b2bad877ddacf7553e09f46b860459c46fe4cfc6253884d77ba90ad8f
Verification & scope
An offline simplified document model, not a claim of conformance to any office file format. 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:38:51.473055+00:00.
Case digest / 43db8698774be24fc9e70b411a25de743d7f82dffc98255e0718f9e80d0648b2