Skip to content

Define convergence path for SAP3 native fallback models and ModelFailure #3

Description

@mabesa

Plan 100 in SAPPHIRE Flow touches the native fallback models, especially persistence_fallback, to make empty or short observation input an explicit anticipated failure.

Current state:

  • ForecastInterface requires anticipated predict failures to return ModelFailure, not raise.
  • SAP3 FI-wrapped models satisfy that through ForecastInterfaceAdapter.
  • SAP3 native StationForecastModel.predict currently returns tuple[dict[str, ForecastEnsemble], bytes | None] and has no failure-sentinel union member.
  • climatology_fallback and persistence_fallback are still native models, not ForecastInterface implementations.
  • Plan 100 therefore adds a narrow InsufficientObservationsError for persistence_fallback empty observations, which SAP3 catches as a model failure and falls through to climatology_fallback. This is explicit but still not FI-conformant.

Gap to co-design:

  • Should SAP3 native fallback models be converted to ForecastInterface implementations?
  • Or should the SAP3 native protocol grow an anticipated-failure sentinel that can map cleanly to FI ModelFailure?
  • What is the expected handling for fallback models that are operational sentinels but have different data requirements: climatology can predict from artifact alone, persistence requires at least one recent target observation.

Acceptance for this issue:

  • A documented convergence decision for native fallback anticipated failures.
  • A migration path for climatology_fallback and persistence_fallback that avoids SAP3-side silent workarounds.
  • Confirmation that Plan 100 temporary native behavior is acceptable only as an interim bridge until this issue is resolved.

Context: SAPPHIRE Flow Plan 100 forecast-feed resilience, B2 FI-adherence gate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions