FA-11796 / Document structure integrity / Open access
An explicitly empty section header incorrectly inherits content · case 01
An explicitly empty section header incorrectly inherits content in the controlled document model.
ROOT CAUSE
Every missing header is replaced with the global default instead of the previous section header.
VERIFIED REPAIR
Resolve only None through the preceding section and retain explicit empty content.
Unsuccessful approach: A truthiness fallback conflates an explicitly blank header with a linked header.
Case contract
Each section header is a string or None; None links to the previous resolved header, initially default, while empty string explicitly clears it.
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(headers):
return [x or 'default' for x in headers]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [((['H'+str(N),None,'',None],),['H'+str(N),'H'+str(N),'','']), (([],),[]), (([None],),['default']), (([''],),['']), ((['a',None],),['a','a']), ((['a','b',None],),['a','b','b'])]
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 | ['H1', 'default', 'default', 'default'] | ['H1', 'H1', '', ''] | Failed |
| document fixture 1 | [] | [] | Passed |
| document fixture 2 | ['default'] | ['default'] | Passed |
| document fixture 3 | ['default'] | [''] | Failed |
| document fixture 4 | ['a', 'default'] | ['a', 'a'] | Failed |
| document fixture 5 | ['a', 'b', 'default'] | ['a', 'b', 'b'] | Failed |
SHA-256 / fde00e64850167971739f47e84c0d43cd5ad39b1bc7e5c44febdc9e6bbc22f40
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(headers):
out=[]
last='default'
for x in headers:
last=x or last
out.append(last)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [((['H'+str(N),None,'',None],),['H'+str(N),'H'+str(N),'','']), (([],),[]), (([None],),['default']), (([''],),['']), ((['a',None],),['a','a']), ((['a','b',None],),['a','b','b'])]
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 | ['H1', 'H1', 'H1', 'H1'] | ['H1', 'H1', '', ''] | Failed |
| document fixture 1 | [] | [] | Passed |
| document fixture 2 | ['default'] | ['default'] | Passed |
| document fixture 3 | ['default'] | [''] | Failed |
| document fixture 4 | ['a', 'a'] | ['a', 'a'] | Passed |
| document fixture 5 | ['a', 'b', 'b'] | ['a', 'b', 'b'] | Passed |
SHA-256 / dc1028079c178deb645b825ad177e3feb9cd90f9ba5f5ba17a6c7137001533b1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(headers):
out=[]
last='default'
for x in headers:
if x is not None: last=x
out.append(last)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [((['H'+str(N),None,'',None],),['H'+str(N),'H'+str(N),'','']), (([],),[]), (([None],),['default']), (([''],),['']), ((['a',None],),['a','a']), ((['a','b',None],),['a','b','b'])]
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 | ['H1', 'H1', '', ''] | ['H1', 'H1', '', ''] | Passed |
| document fixture 1 | [] | [] | Passed |
| document fixture 2 | ['default'] | ['default'] | Passed |
| document fixture 3 | [''] | [''] | Passed |
| document fixture 4 | ['a', 'a'] | ['a', 'a'] | Passed |
| document fixture 5 | ['a', 'b', 'b'] | ['a', 'b', 'b'] | Passed |
SHA-256 / 86d4f857315ec827a9c1eb23c216454f00d048aecd7a8cc0e6489d887f7537b9
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.092583+00:00.
Case digest / 28caf3b650b1f481ffca7354557f46c07424c603dfd433c2967ff5a0aad8df7b