FA-14056 / Numerical aggregation / Open access
Bucket extrema downsampling: The next bucket starts one sample too late. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
The next bucket starts one sample too late.
VERIFIED REPAIR
Preserve the bucket extrema downsampling contract at the identified reduction decision.
Unsuccessful approach: Reducing the stride creates overlapping buckets instead of a partition.
Case contract
For positive integer width, partition numeric observations into consecutive buckets including a final short bucket. Emit each bucket first-occurring minimum and first-occurring maximum once, in original observation order, as [global index,value]. Flat buckets emit one point.
Why this case matters
Exact bounded examples isolate a reduction defect without floating-point or external-service effects.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(xs, width):
out=[]
for start in range(0,len(xs),width+1):
bucket=xs[start:start+width]
low=min(range(len(bucket)),key=lambda i:(bucket[i],i))
high=max(range(len(bucket)),key=lambda i:(bucket[i],-i))
for i in sorted(set([low,high])):
out.append([start+i,bucket[i]])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([8, 1, 6, 2, 9, 3, 4], 3)), [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]])
check('regression 2', solve(*([], 2)), [])
check('regression 3', solve(*([3, 3, 3, 1, 1], 3)), [[0, 3], [3, 1]])
check('regression 4', solve(*([-4, -1, -8, 0], 2)), [[0, -4], [1, -1], [2, -8], [3, 0]])
check('regression 5', solve(*([9, 1, 5], 1)), [[0, 9], [1, 1], [2, 5]])
check('regression 6', solve(*([4, 2, 8, 3], 9)), [[1, 2], [2, 8]])
check('regression 7', solve(*([5, 5, 1, 1, 9, 9], 6)), [[2, 1], [4, 9]])
check("variable bucket amplitude",solve([N,0,2*N],3),[[1,0],[2,2*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 |
|---|---|---|---|
| regression 1 | [[0, 8], [1, 1], [4, 9], [5, 3]] | [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]] | Failed |
| regression 2 | [] | [] | Passed |
| regression 3 | [[0, 3], [4, 1]] | [[0, 3], [3, 1]] | Failed |
| regression 4 | [[0, -4], [1, -1], [3, 0]] | [[0, -4], [1, -1], [2, -8], [3, 0]] | Failed |
| regression 5 | [[0, 9], [2, 5]] | [[0, 9], [1, 1], [2, 5]] | Failed |
| regression 6 | [[1, 2], [2, 8]] | [[1, 2], [2, 8]] | Passed |
| regression 7 | [[2, 1], [4, 9]] | [[2, 1], [4, 9]] | Passed |
| variable bucket amplitude | [[1, 0], [2, 2]] | [[1, 0], [2, 2]] | Passed |
SHA-256 / 0912caf5f7f4694de30274534f124dcb48dc75b71da7584155a79fd4b3c3fa89
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(xs, width):
out=[]
for start in range(0,len(xs),max(1,width-1)):
bucket=xs[start:start+width]
low=min(range(len(bucket)),key=lambda i:(bucket[i],i))
high=max(range(len(bucket)),key=lambda i:(bucket[i],-i))
for i in sorted(set([low,high])):
out.append([start+i,bucket[i]])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([8, 1, 6, 2, 9, 3, 4], 3)), [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]])
check('regression 2', solve(*([], 2)), [])
check('regression 3', solve(*([3, 3, 3, 1, 1], 3)), [[0, 3], [3, 1]])
check('regression 4', solve(*([-4, -1, -8, 0], 2)), [[0, -4], [1, -1], [2, -8], [3, 0]])
check('regression 5', solve(*([9, 1, 5], 1)), [[0, 9], [1, 1], [2, 5]])
check('regression 6', solve(*([4, 2, 8, 3], 9)), [[1, 2], [2, 8]])
check('regression 7', solve(*([5, 5, 1, 1, 9, 9], 6)), [[2, 1], [4, 9]])
check("variable bucket amplitude",solve([N,0,2*N],3),[[1,0],[2,2*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 |
|---|---|---|---|
| regression 1 | [[0, 8], [1, 1], [3, 2], [4, 9], [4, 9], [5, 3], [6, 4]] | [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]] | Failed |
| regression 2 | [] | [] | Passed |
| regression 3 | [[0, 3], [2, 3], [3, 1], [4, 1]] | [[0, 3], [3, 1]] | Failed |
| regression 4 | [[0, -4], [1, -1], [1, -1], [2, -8], [2, -8], [3, 0], [3, 0]] | [[0, -4], [1, -1], [2, -8], [3, 0]] | Failed |
| regression 5 | [[0, 9], [1, 1], [2, 5]] | [[0, 9], [1, 1], [2, 5]] | Passed |
| regression 6 | [[1, 2], [2, 8]] | [[1, 2], [2, 8]] | Passed |
| regression 7 | [[2, 1], [4, 9], [5, 9]] | [[2, 1], [4, 9]] | Failed |
| variable bucket amplitude | [[1, 0], [2, 2], [2, 2]] | [[1, 0], [2, 2]] | Failed |
SHA-256 / 0861e05782b1538df899b2421a4f11d5a1163550175d8d54011f54c21b46556d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(xs, width):
out=[]
for start in range(0,len(xs),width):
bucket=xs[start:start+width]
low=min(range(len(bucket)),key=lambda i:(bucket[i],i))
high=max(range(len(bucket)),key=lambda i:(bucket[i],-i))
for i in sorted(set([low,high])):
out.append([start+i,bucket[i]])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([8, 1, 6, 2, 9, 3, 4], 3)), [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]])
check('regression 2', solve(*([], 2)), [])
check('regression 3', solve(*([3, 3, 3, 1, 1], 3)), [[0, 3], [3, 1]])
check('regression 4', solve(*([-4, -1, -8, 0], 2)), [[0, -4], [1, -1], [2, -8], [3, 0]])
check('regression 5', solve(*([9, 1, 5], 1)), [[0, 9], [1, 1], [2, 5]])
check('regression 6', solve(*([4, 2, 8, 3], 9)), [[1, 2], [2, 8]])
check('regression 7', solve(*([5, 5, 1, 1, 9, 9], 6)), [[2, 1], [4, 9]])
check("variable bucket amplitude",solve([N,0,2*N],3),[[1,0],[2,2*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 |
|---|---|---|---|
| regression 1 | [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]] | [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]] | Passed |
| regression 2 | [] | [] | Passed |
| regression 3 | [[0, 3], [3, 1]] | [[0, 3], [3, 1]] | Passed |
| regression 4 | [[0, -4], [1, -1], [2, -8], [3, 0]] | [[0, -4], [1, -1], [2, -8], [3, 0]] | Passed |
| regression 5 | [[0, 9], [1, 1], [2, 5]] | [[0, 9], [1, 1], [2, 5]] | Passed |
| regression 6 | [[1, 2], [2, 8]] | [[1, 2], [2, 8]] | Passed |
| regression 7 | [[2, 1], [4, 9]] | [[2, 1], [4, 9]] | Passed |
| variable bucket amplitude | [[1, 0], [2, 2]] | [[1, 0], [2, 2]] | Passed |
SHA-256 / 850a04ee13ca9aa30a6f150337cf2df129ec325285eb05ac5d48e7a999fabccd
Verification & scope
Small offline integer/rational inputs only; no performance, statistical inference, or production-library conformance claim. 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:39:13.050185+00:00.
Case digest / 6dbd87b12acf1d3399d3b3f4b5aa8a015fb9a877ca2332bd0d2e891cfc2c053e