FAILURE MAP
← Case archive

FA-6461 / Discrete calculus / Open access

Composite midpoint cell integral · case 01

The cell width is omitted.

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

ROOT CAUSE

The cell width is omitted.

THE FAILURE

The cell width is omitted.

Unsuccessful approach: Averaging cell values loses the number of intervals.

Case contract

Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. mid_values lists midpoint observations for equal cells of rational width h>=0. Exact operational definition: str(Fraction(h)*sum(mid_values))

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Discrete calculus results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(mid_values, h):
    return str(sum(mid_values))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 3, 5], 2)', solve(*([1, 3, 5], 2)), '18')
check('fixture 2: ([4, 4], 3)', solve(*([4, 4], 3)), '24')
check('fixture 3: ([], 2)', solve(*([], 2)), '0')
check('fixture 4: ([5], 0)', solve(*([5], 0)), '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 fixtureActualExpectedOutcome
fixture 1: ([1, 3, 5], 2)918Failed
fixture 2: ([4, 4], 3)824Failed
fixture 3: ([], 2)00Passed
fixture 4: ([5], 0)50Failed

SHA-256 / 0f32610d21e16a5b36aa50d71fac0ece86c34c0bc7e17b1a202ca3f554ac2803

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(mid_values, h):
    return str(Fraction(h)*sum(mid_values)/len(mid_values)) if mid_values else "0"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 3, 5], 2)', solve(*([1, 3, 5], 2)), '18')
check('fixture 2: ([4, 4], 3)', solve(*([4, 4], 3)), '24')
check('fixture 3: ([], 2)', solve(*([], 2)), '0')
check('fixture 4: ([5], 0)', solve(*([5], 0)), '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 fixtureActualExpectedOutcome
fixture 1: ([1, 3, 5], 2)618Failed
fixture 2: ([4, 4], 3)1224Failed
fixture 3: ([], 2)00Passed
fixture 4: ([5], 0)00Passed

SHA-256 / 672557e6d90b78c5d6f9074151c71a8dd58716e9494fbc8ebbc82def2c88a923

HELD IN THE MEMBER ARCHIVE

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

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

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

Case digest / eacf5d5d4fd02ea10e31a49657ea5cbe828abfacee130c25944185db8e08aeb0