FAILURE MAP
← Case archive

FA-13021 / Numerical aggregation / Open access

Histogram interval mass: Overlap length is multiplied by mass without conversion to density. · case 01

The reduction disagrees with its explicit aggregation oracle.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Overlap length is multiplied by mass without conversion to density.

THE FAILURE

Overlap length is multiplied by mass without conversion to density.

Unsuccessful approach: Dividing by query width normalizes the wrong interval.

Case contract

Bins [left,right,mass] have positive widths and nonnegative integer masses. Treat each bin as uniform density. Return exact mass in query [a,b] as a Fraction string; reversed/empty queries have zero mass.

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(bins, a, b):
    return str(sum(m*max(0,min(r,b)-max(l,a)) for l,r,m in bins)) if a<b else "0"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[0, 4, 8], [4, 10, 3]], 2, 7)), '11/2')
check('regression 2', solve(*([[0, 4, 8]], 1, 2)), '2')
check('regression 3', solve(*([[0, 4, 8]], -3, 8)), '8')
check('regression 4', solve(*([[0, 4, 8]], 4, 9)), '0')
check('regression 5', solve(*([[0, 4, 8]], 7, 9)), '0')
check('regression 6', solve(*([], 0, 1)), '0')
check('regression 7', solve(*([[0, 4, 8]], 3, 1)), '0')
check('regression 8', solve(*([[2, 7, 10], [10, 12, 8]], 0, 11)), '14')
check("variable density mass",solve([[0,N+2,2*(N+2)]],1,N+1),str(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 fixtureActualExpectedOutcome
regression 12511/2Failed
regression 282Failed
regression 3328Failed
regression 400Passed
regression 500Passed
regression 600Passed
regression 700Passed
regression 85814Failed
variable density mass62Failed

SHA-256 / ec5afa57509c4ac8cb89e7309c3fd76d1108cd8fc5f9e921201147724fa58eef

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(bins, a, b):
    return str(sum(Fraction(m*max(0,min(r,b)-max(l,a)),b-a) for l,r,m in bins)) if a<b else "0"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[0, 4, 8], [4, 10, 3]], 2, 7)), '11/2')
check('regression 2', solve(*([[0, 4, 8]], 1, 2)), '2')
check('regression 3', solve(*([[0, 4, 8]], -3, 8)), '8')
check('regression 4', solve(*([[0, 4, 8]], 4, 9)), '0')
check('regression 5', solve(*([[0, 4, 8]], 7, 9)), '0')
check('regression 6', solve(*([], 0, 1)), '0')
check('regression 7', solve(*([[0, 4, 8]], 3, 1)), '0')
check('regression 8', solve(*([[2, 7, 10], [10, 12, 8]], 0, 11)), '14')
check("variable density mass",solve([[0,N+2,2*(N+2)]],1,N+1),str(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 fixtureActualExpectedOutcome
regression 1511/2Failed
regression 282Failed
regression 332/118Failed
regression 400Passed
regression 500Passed
regression 600Passed
regression 700Passed
regression 858/1114Failed
variable density mass62Failed

SHA-256 / 77169b60861e8abaacde66dbfe0b19d369d54f0a32a9b4bf0cc91ad1653fb173

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 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

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:03.075051+00:00.

Case digest / b7ff6586e617822695004b532c9f7d9364160f7b5f86e23e5e0129fbe6d8992a