@buzzr/dfs-engine
    Preparing search index...

    Function shouldRegradeLeg

    • Decide whether the reconciliation cron (Phase G.write) should re-grade a leg. We only act on stat corrections that flip the leg's status (won ↔ lost ↔ push) — raw value drift that stays on the same side of the line is ignored.

      Rationale: re-grading purely-numeric corrections would generate notification churn and audit-log noise without changing money flow. The leg's displayed actualValue may show a stale number on the bet detail screen until a flip-worthy correction fires; that's an acceptable trade for the noise reduction.

      Inputs:

      • oldActual: the value we graded against (leg.gradingSnapshot.actualValue)
      • newActual: the value ESPN currently reports (this tick's fetch) Returns false if either is null, if they're equal, or if their resulting legStatus matches.

      Parameters

      • opts: {
            direction: "over" | "under";
            line: number;
            newActual: number | null;
            oldActual: number | null;
        }

      Returns boolean