FA-14036 / Numerical aggregation / Open access
Bucket extrema downsampling: A final incomplete bucket is discarded. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
A final incomplete bucket is discarded.
VERIFIED REPAIR
Preserve the bucket extrema downsampling contract at the identified reduction decision.
Unsuccessful approach: Stopping before the final position still loses a singleton tail bucket.
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,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]] | [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]] | Failed |
| regression 2 | [] | [] | Passed |
| regression 3 | [[0, 3]] | [[0, 3], [3, 1]] | Failed |
| 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]] | Failed |
| 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 / 5bb00757b97653c7f191b425751670894ac52cb4080f66ad7fb00f3422209c28
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,max(0,len(xs)-1),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]] | [[0, 8], [1, 1], [3, 2], [4, 9], [6, 4]] | Failed |
| 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]] | [[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 / db5265b712c7d5c19bf095626fd816859e709628a78a8e2f5fcf75eaa408f02d
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:12.999630+00:00.
Case digest / 667ca6d4dd156b385d50bd280b711bd7d376407e93fbe0f4d7f3053038fb738b