FA-11611 / Compression format semantics / Open access
Bit reservoir loses codes that cross byte boundaries · case 01
Bit reservoir loses codes that cross byte boundaries.
ROOT CAUSE
Each code is placed into a separate byte instead of a shared bit reservoir.
THE FAILURE
Each code is placed into a separate byte instead of a shared bit reservoir.
Unsuccessful approach: Packing globally in most-significant-bit order reverses the specified wire convention.
Case contract
Pack nonnegative values less than 2**width consecutively least-significant-bit first, yielding integer bytes with zero high padding. Width is 1..8.
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(values, width):
return list(values)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cross byte',solve([N,N,N],3),[(N+8*N+64*N)&255,(N+8*N+64*N)>>8])
check('one bit',solve([1],1),[1])
check('empty',solve([],3),[])
check('byte codes',solve([1,255],8),[1,255])
check('full byte',solve([1,2],4),[33])
check('zero tail',solve([0,1,0],4),[16,0])
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 |
|---|---|---|---|
| cross byte | [1, 1, 1] | [73, 0] | Failed |
| one bit | [1] | [1] | Passed |
| empty | [] | [] | Passed |
| byte codes | [1, 255] | [1, 255] | Passed |
| full byte | [1, 2] | [33] | Failed |
| zero tail | [0, 1, 0] | [16, 0] | Failed |
SHA-256 / 3d6dcd3b290b2faa9e4185b93a8527cdc797be1918c1c1b4f663295daf3a21dc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values, width):
bits=''.join(format(v,'0'+str(width)+'b') for v in values)
bits += '0' * ((-len(bits))%8)
return [int(bits[i:i+8],2) for i in range(0,len(bits),8)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cross byte',solve([N,N,N],3),[(N+8*N+64*N)&255,(N+8*N+64*N)>>8])
check('one bit',solve([1],1),[1])
check('empty',solve([],3),[])
check('byte codes',solve([1,255],8),[1,255])
check('full byte',solve([1,2],4),[33])
check('zero tail',solve([0,1,0],4),[16,0])
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 |
|---|---|---|---|
| cross byte | [36, 128] | [73, 0] | Failed |
| one bit | [128] | [1] | Failed |
| empty | [] | [] | Passed |
| byte codes | [1, 255] | [1, 255] | Passed |
| full byte | [18] | [33] | Failed |
| zero tail | [1, 0] | [16, 0] | Failed |
SHA-256 / a47a71e6ae9ac9d2303ea774ef9850e1bb92a4c5f8f127946be9959f1e66b632
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.375310+00:00.
Case digest / 9d6b609df81fadca5e709277fc79a76adbbffbb202191a4c0b03481434025c61