FA-6386 / Discrete calculus / Open access
Central first derivative samples · case 01
The two-sided distance is treated as one step.
ROOT CAUSE
The two-sided distance is treated as one step.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return str(Fraction(right-left,2*h))
Unsuccessful approach: Endpoint values are added rather than differenced.
Case contract
Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. Central first derivative samples. Exact operational definition: str(Fraction(right-left,2*h))
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(left, right, h):
return str(Fraction(right-left,h))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 9, 1)', solve(*(1, 9, 1)), '4')
check('fixture 2: (3, 3, 2)', solve(*(3, 3, 2)), '0')
check('fixture 3: (9, 1, 2)', solve(*(9, 1, 2)), '-2')
check('fixture 4: (-2, 2, 2)', solve(*(-2, 2, 2)), '1')
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 |
|---|---|---|---|
| fixture 1: (1, 9, 1) | 8 | 4 | Failed |
| fixture 2: (3, 3, 2) | 0 | 0 | Passed |
| fixture 3: (9, 1, 2) | -4 | -2 | Failed |
| fixture 4: (-2, 2, 2) | 2 | 1 | Failed |
SHA-256 / 49f742bfd6e11359f7683b896b64c7206aee2df7c6713d5f169ae8142e4d4768
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(left, right, h):
return str(Fraction(right+left,2*h))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 9, 1)', solve(*(1, 9, 1)), '4')
check('fixture 2: (3, 3, 2)', solve(*(3, 3, 2)), '0')
check('fixture 3: (9, 1, 2)', solve(*(9, 1, 2)), '-2')
check('fixture 4: (-2, 2, 2)', solve(*(-2, 2, 2)), '1')
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 |
|---|---|---|---|
| fixture 1: (1, 9, 1) | 5 | 4 | Failed |
| fixture 2: (3, 3, 2) | 3/2 | 0 | Failed |
| fixture 3: (9, 1, 2) | 5/2 | -2 | Failed |
| fixture 4: (-2, 2, 2) | 0 | 1 | Failed |
SHA-256 / 9bc9455026e88f28d455c447f50560ade3a9f3fb6f548d61a1c932078e35f045
3 / The verified repair
Exit 0"""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(left, right, h):
return str(Fraction(right-left,2*h))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 9, 1)', solve(*(1, 9, 1)), '4')
check('fixture 2: (3, 3, 2)', solve(*(3, 3, 2)), '0')
check('fixture 3: (9, 1, 2)', solve(*(9, 1, 2)), '-2')
check('fixture 4: (-2, 2, 2)', solve(*(-2, 2, 2)), '1')
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 |
|---|---|---|---|
| fixture 1: (1, 9, 1) | 4 | 4 | Passed |
| fixture 2: (3, 3, 2) | 0 | 0 | Passed |
| fixture 3: (9, 1, 2) | -2 | -2 | Passed |
| fixture 4: (-2, 2, 2) | 1 | 1 | Passed |
SHA-256 / 44fa496e8a9612f67a3af5d622fe64db74e0dae826abff3807ea51b083c33ab6
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:01.398417+00:00.
Case digest / 8bc6b77b316995ec3dbfc0370392eceb6122f8455f738364449aa2413ddb0d67