FA-11636 / Compression format semantics / Open access
Bounded run packets silently discard overflow · case 01
Bounded run packets silently discard overflow.
ROOT CAUSE
An encoder clamps a run to the packet count field maximum.
VERIFIED REPAIR
Split counts by quotient and remainder, emitting a remainder packet only when its count is positive.
Unsuccessful approach: Always emitting a remainder creates illegal zero-length packets on exact multiples.
Case contract
Encode count repetitions as [count,symbol] packets with positive counts no greater than limit. Emit full limit packets then a nonzero remainder; count zero emits no packets.
Why this case matters
A small offline codec model isolates a compression-specific failure without external files or libraries.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(symbol, count, limit):
return [[min(count,limit),symbol]] if count else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('overflow',solve('a',2*N+1,N),[[N,'a'],[N,'a'],[1,'a']] if N>1 else [[1,'a']]*3)
check('exact multiple',solve('x',6,3),[[3,'x'],[3,'x']])
check('empty',solve('x',0,3),[])
check('under limit',solve('x',2,3),[[2,'x']])
check('one packet',solve('x',3,3),[[3,'x']])
check('unit limit',solve('b',2,1),[[1,'b'],[1,'b']])
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 |
|---|---|---|---|
| overflow | [[1, 'a']] | [[1, 'a'], [1, 'a'], [1, 'a']] | Failed |
| exact multiple | [[3, 'x']] | [[3, 'x'], [3, 'x']] | Failed |
| empty | [] | [] | Passed |
| under limit | [[2, 'x']] | [[2, 'x']] | Passed |
| one packet | [[3, 'x']] | [[3, 'x']] | Passed |
| unit limit | [[1, 'b']] | [[1, 'b'], [1, 'b']] | Failed |
SHA-256 / 132b73c5614cadaaecda1acb31cd676443ce33add2db211189eb21385383761e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(symbol, count, limit):
return [[limit,symbol]]*(count//limit)+[[count%limit,symbol]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('overflow',solve('a',2*N+1,N),[[N,'a'],[N,'a'],[1,'a']] if N>1 else [[1,'a']]*3)
check('exact multiple',solve('x',6,3),[[3,'x'],[3,'x']])
check('empty',solve('x',0,3),[])
check('under limit',solve('x',2,3),[[2,'x']])
check('one packet',solve('x',3,3),[[3,'x']])
check('unit limit',solve('b',2,1),[[1,'b'],[1,'b']])
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 |
|---|---|---|---|
| overflow | [[1, 'a'], [1, 'a'], [1, 'a'], [0, 'a']] | [[1, 'a'], [1, 'a'], [1, 'a']] | Failed |
| exact multiple | [[3, 'x'], [3, 'x'], [0, 'x']] | [[3, 'x'], [3, 'x']] | Failed |
| empty | [[0, 'x']] | [] | Failed |
| under limit | [[2, 'x']] | [[2, 'x']] | Passed |
| one packet | [[3, 'x'], [0, 'x']] | [[3, 'x']] | Failed |
| unit limit | [[1, 'b'], [1, 'b'], [0, 'b']] | [[1, 'b'], [1, 'b']] | Failed |
SHA-256 / 919e3139b92da08ac4cec0da2178dc1cab3b3caa5a5a5cf2264b4974b89c28a4
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(symbol, count, limit):
return [[limit,symbol]]*(count//limit)+([[count%limit,symbol]] if count%limit else [])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('overflow',solve('a',2*N+1,N),[[N,'a'],[N,'a'],[1,'a']] if N>1 else [[1,'a']]*3)
check('exact multiple',solve('x',6,3),[[3,'x'],[3,'x']])
check('empty',solve('x',0,3),[])
check('under limit',solve('x',2,3),[[2,'x']])
check('one packet',solve('x',3,3),[[3,'x']])
check('unit limit',solve('b',2,1),[[1,'b'],[1,'b']])
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 |
|---|---|---|---|
| overflow | [[1, 'a'], [1, 'a'], [1, 'a']] | [[1, 'a'], [1, 'a'], [1, 'a']] | Passed |
| exact multiple | [[3, 'x'], [3, 'x']] | [[3, 'x'], [3, 'x']] | Passed |
| empty | [] | [] | Passed |
| under limit | [[2, 'x']] | [[2, 'x']] | Passed |
| one packet | [[3, 'x']] | [[3, 'x']] | Passed |
| unit limit | [[1, 'b'], [1, 'b']] | [[1, 'b'], [1, 'b']] | Passed |
SHA-256 / 61e8ba62ad4d00aeb5f29a9657b64eafc8f486b70751e8b21cab027bbb0991ad
Verification & scope
Controlled educational model, not a complete implementation of a production compression 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:49.707381+00:00.
Case digest / 7ec79a8243547167f6a778cb21b31874587952a0c72ce6d0483ddb13a1ffe1d4