Skip to content

Slow-but-successful checks are recorded as permanent failures: track a degraded outcome class #654

Description

@SgtPooki

Problem

A check that completes successfully but slower than our window is recorded identically to one that never worked. Deal checks have a single hard cutoff (dealJobTimeoutSeconds, default 360s in config/constants.ts). When the window expires, classifyFailureStatus emits failure.timedout and the deal row is persisted with status = failed (deal.service.ts#L664). Nothing revisits that row when the addPieces message lands on chain later, so an eventually-successful deal stays a permanent failure in the DB and in every downstream metric.

The 2026-07-20/21 mainnet congestion made this concrete (internal discussion: Slack thread): elevated base fee pushed addPieces confirmations well past the deal window while the data itself stored and retrieved fine, and dealbot recorded deal failures. Those false negatives are indistinguishable from an SP that lost the data.

What this tracks

  1. An outcome class between success and failure: "worked, but outside our time requirement" (e.g. a pending_confirm-style state; naming open). Metrics and dashboards need to separate "SP broken" from "SP or chain slow".
  2. Headroom between the optimal window and a longer functional-but-degraded window, instead of one binary cutoff. Retrieval check silently records failure.timedout when outer job timeout preempts inner IPNI timeout #540 documented how a single cutoff turns a continuous latency distribution into cliff-shaped failure rates.
  3. Reconciling failed rows when the deal later confirms on chain (overlaps database synchronization with chainstate #465).

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    • Status
      🐱 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions