// file: kb_lib/src/dex_support_matrix.rs

//! Shared DEX support matrix.
//!
//! This module centralizes protocol metadata that was previously duplicated
//! across catalog, transaction classification, candidate recording and roadmap
//! surfaces. It intentionally does not decode instructions and does not decide
//! whether one decoded event is actionable.

/// Support matrix entry for one DEX, router, aggregator or launch surface.
#[derive(Debug, Copy, Clone, Eq, PartialEq, serde::Serialize)]
#[serde(rename_all = "camelCase")]
pub struct DexSupportMatrixEntry {
    /// Stable internal protocol or surface code.
    pub code: &'static str,
    /// Human-readable protocol or surface name.
    pub display_name: &'static str,
    /// Protocol family, for example `raydium`, `meteora` or `pump`.
    pub family: &'static str,
    /// Protocol version or `unknown` when not verified locally.
    pub version: &'static str,
    /// Technical surface type: `launch`, `bonding_curve`, `AMM`, `CLMM`, `DLMM`, `router`, `aggregator` or `unknown`.
    pub surface_type: &'static str,
    /// Strategic surface role used by the DEX-first roadmap: `dex_effective`, `aggregator_router`, `launch_surface` or `to_verify`.
    pub surface_role: &'static str,
    /// Primary Solana program id, when verified in local constants or docs.
    pub program_id: std::option::Option<&'static str>,
    /// Optional router program id, when this entry uses a distinct router.
    pub router_program_id: std::option::Option<&'static str>,
    /// Program id confidence: `known`, `to_verify` or `unknown`.
    pub program_id_status: &'static str,
    /// Whether this protocol has been observed in the local replay corpus.
    pub observed: bool,
    /// Whether the code currently contains a decoder for this protocol.
    pub decoded: bool,
    /// Whether decoded events are currently materialized beyond raw decoded rows.
    pub materialized: bool,
    /// Whether this protocol can currently produce trade candidates.
    pub trade_candidate: bool,
    /// Whether this protocol can currently produce candle candidates.
    pub candle_candidate: bool,
    /// Whether this protocol can currently produce pair candidates.
    pub pair_candidate: bool,
    /// Whether this protocol can currently produce pool candidates.
    pub pool_candidate: bool,
    /// Operational support status: `supported`, `partial`, `planned`, `ignored`, `to_verify` or `unknown`.
    pub status: &'static str,
    /// Confidence level attached to this matrix entry.
    pub confidence: &'static str,
    /// Optional explicit skip reason for partial or ignored entries.
    pub skip_reason: std::option::Option<&'static str>,
    /// Whether the entry should be inserted as an enabled DEX in the storage catalog.
    pub catalog_enabled: bool,
}

/// Owned DTO form of a DEX support matrix entry.
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DexSupportMatrixEntryDto {
    /// Stable internal protocol or surface code.
    pub code: std::string::String,
    /// Human-readable protocol or surface name.
    pub display_name: std::string::String,
    /// Protocol family, for example `raydium`, `meteora` or `pump`.
    pub family: std::string::String,
    /// Protocol version or `unknown` when not verified locally.
    pub version: std::string::String,
    /// Technical surface type: `launch`, `bonding_curve`, `AMM`, `CLMM`, `DLMM`, `router`, `aggregator` or `unknown`.
    pub surface_type: std::string::String,
    /// Strategic surface role used by the DEX-first roadmap: `dex_effective`, `aggregator_router`, `launch_surface` or `to_verify`.
    pub surface_role: std::string::String,
    /// Primary Solana program id, when verified in local constants or docs.
    pub program_id: std::option::Option<std::string::String>,
    /// Optional router program id, when this entry uses a distinct router.
    pub router_program_id: std::option::Option<std::string::String>,
    /// Program id confidence: `known`, `to_verify` or `unknown`.
    pub program_id_status: std::string::String,
    /// Whether this protocol has been observed in the local replay corpus.
    pub observed: bool,
    /// Whether the code currently contains a decoder for this protocol.
    pub decoded: bool,
    /// Whether decoded events are currently materialized beyond raw decoded rows.
    pub materialized: bool,
    /// Whether this protocol can currently produce trade candidates.
    pub trade_candidate: bool,
    /// Whether this protocol can currently produce candle candidates.
    pub candle_candidate: bool,
    /// Whether this protocol can currently produce pair candidates.
    pub pair_candidate: bool,
    /// Whether this protocol can currently produce pool candidates.
    pub pool_candidate: bool,
    /// Operational support status: `supported`, `partial`, `planned`, `ignored`, `to_verify` or `unknown`.
    pub status: std::string::String,
    /// Confidence level attached to this matrix entry.
    pub confidence: std::string::String,
    /// Optional explicit skip reason for partial or ignored entries.
    pub skip_reason: std::option::Option<std::string::String>,
    /// Whether the entry should be inserted as an enabled DEX in the storage catalog.
    pub catalog_enabled: bool,
}

impl DexSupportMatrixEntryDto {
    /// Builds an owned DTO from one static support matrix entry.
    pub fn from_entry(entry: &crate::DexSupportMatrixEntry) -> Self {
        return Self {
            code: entry.code.to_string(),
            display_name: entry.display_name.to_string(),
            family: entry.family.to_string(),
            version: entry.version.to_string(),
            surface_type: entry.surface_type.to_string(),
            surface_role: entry.surface_role.to_string(),
            program_id: match entry.program_id {
                Some(program_id) => Some(program_id.to_string()),
                None => None,
            },
            router_program_id: match entry.router_program_id {
                Some(router_program_id) => Some(router_program_id.to_string()),
                None => None,
            },
            program_id_status: entry.program_id_status.to_string(),
            observed: entry.observed,
            decoded: entry.decoded,
            materialized: entry.materialized,
            trade_candidate: entry.trade_candidate,
            candle_candidate: entry.candle_candidate,
            pair_candidate: entry.pair_candidate,
            pool_candidate: entry.pool_candidate,
            status: entry.status.to_string(),
            confidence: entry.confidence.to_string(),
            skip_reason: match entry.skip_reason {
                Some(skip_reason) => Some(skip_reason.to_string()),
                None => None,
            },
            catalog_enabled: entry.catalog_enabled,
        };
    }
}

const DEX_SUPPORT_MATRIX_ENTRIES: &[DexSupportMatrixEntry] = &[
    DexSupportMatrixEntry {
        code: "pump_fun",
        display_name: "Pump.fun",
        family: "pump",
        version: "bonding_curve",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: Some(crate::PUMP_FUN_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "high",
        skip_reason: Some("launch_surface_requires_migration_linking_before_live_trading"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "pump_swap",
        display_name: "PumpSwap",
        family: "pump",
        version: "amm",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::PUMP_SWAP_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: true,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "supported",
        confidence: "high",
        skip_reason: None,
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "raydium_cpmm",
        display_name: "Raydium CPMM",
        family: "raydium",
        version: "cpmm",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::RAYDIUM_CPMM_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: true,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "supported",
        confidence: "high",
        skip_reason: None,
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "raydium_clmm",
        display_name: "Raydium CLMM",
        family: "raydium",
        version: "clmm",
        surface_type: "CLMM",
        surface_role: "dex_effective",
        program_id: Some(crate::RAYDIUM_CLMM_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: true,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "supported",
        confidence: "high",
        skip_reason: None,
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "raydium_amm_v4",
        display_name: "Raydium AMM v4",
        family: "raydium",
        version: "amm_v4",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::RAYDIUM_AMM_V4_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: true,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "supported",
        confidence: "high",
        skip_reason: None,
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "raydium_launchpad",
        display_name: "Raydium LaunchLab / Launchpad",
        family: "raydium",
        version: "launchpad",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: Some(crate::RAYDIUM_LAUNCHPAD_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "bootstrap",
        confidence: "medium",
        skip_reason: Some("decoded_events_only_until_local_corpus"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "raydium_liquidity_locking",
        display_name: "Raydium Liquidity Locking",
        family: "raydium",
        version: "unknown",
        surface_type: "liquidity_locking",
        surface_role: "to_verify",
        program_id: Some(crate::RAYDIUM_LIQUIDITY_LOCKING_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "raydium_router",
        display_name: "Raydium Router",
        family: "raydium",
        version: "router",
        surface_type: "router",
        surface_role: "aggregator_router",
        program_id: Some(crate::RAYDIUM_AMM_ROUTING_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("router_not_materialized_as_direct_trade_surface"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "raydium_stable_swap",
        display_name: "Raydium Stable Swap AMM",
        family: "raydium",
        version: "stable_swap",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::RAYDIUM_STABLE_SWAP_AMM_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "planned",
        confidence: "medium",
        skip_reason: Some("deprecated_program_not_prioritized"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "meteora_dlmm",
        display_name: "Meteora DLMM",
        family: "meteora",
        version: "dlmm",
        surface_type: "DLMM",
        surface_role: "dex_effective",
        program_id: Some(crate::METEORA_DLMM_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: true,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "supported",
        confidence: "high",
        skip_reason: None,
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "meteora_dlc",
        display_name: "Meteora DLC",
        family: "meteora",
        version: "unknown",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: None,
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("surface_and_program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "meteora_damm_v1",
        display_name: "Meteora DAMM v1",
        family: "meteora",
        version: "damm_v1",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::METEORA_DAMM_V1_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: true,
        decoded: true,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("meteora_damm_v1_swap_without_amount_payload"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "meteora_damm_v2",
        display_name: "Meteora DAMM v2",
        family: "meteora",
        version: "damm_v2",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::METEORA_DAMM_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("not_observed_in_0_7_28_replay"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "meteora_dbc",
        display_name: "Meteora DBC",
        family: "meteora",
        version: "dbc",
        surface_type: "bonding_curve",
        surface_role: "dex_effective",
        program_id: Some(crate::METEORA_DBC_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("not_observed_in_0_7_28_replay"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "orca_whirlpools",
        display_name: "Orca Whirlpools",
        family: "orca",
        version: "whirlpools",
        surface_type: "CLMM",
        surface_role: "dex_effective",
        program_id: Some(crate::ORCA_WHIRLPOOLS_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("not_observed_in_0_7_28_replay"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "fluxbeam",
        display_name: "FluxBeam",
        family: "fluxbeam",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::FLUXBEAM_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("not_observed_in_0_7_28_replay"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "dexlab",
        display_name: "DexLab Swap/Pool",
        family: "dexlab",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::DEXLAB_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "known",
        observed: false,
        decoded: true,
        materialized: true,
        trade_candidate: true,
        candle_candidate: true,
        pair_candidate: true,
        pool_candidate: true,
        status: "partial",
        confidence: "medium",
        skip_reason: Some("not_observed_in_0_7_28_replay"),
        catalog_enabled: true,
    },
    DexSupportMatrixEntry {
        code: "bags",
        display_name: "Bags",
        family: "bags",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "letsbonk",
        display_name: "LetsBonk / Bonk.fun",
        family: "bonk",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "bonk",
        display_name: "Bonk launch surface",
        family: "bonk",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "bonk_fun",
        display_name: "Bonk.fun",
        family: "bonk",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "okx_dex",
        display_name: "OKX DEX",
        family: "okx",
        version: "unknown",
        surface_type: "aggregator",
        surface_role: "aggregator_router",
        program_id: Some(crate::OKX_DEX_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "boop_fun",
        display_name: "Boop.fun",
        family: "boop",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: Some(crate::BOOP_FUN_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "moonshot",
        display_name: "Moonshot",
        family: "moonshot",
        version: "historical_entities_py",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: Some(crate::MOONSHOT_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "believe",
        display_name: "Believe",
        family: "believe",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "metadao",
        display_name: "metaDAO",
        family: "metadao",
        version: "umbrella",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: None,
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("umbrella_surface_programs_split_into_specific_discovery_targets"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "metadao_launchpad_v0_7_0",
        display_name: "MetaDAO Launchpad v0.7.0",
        family: "metadao",
        version: "v0.7.0",
        surface_type: "launch",
        surface_role: "to_verify",
        program_id: Some(crate::METADAO_LAUNCHPAD_V0_7_0_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "medium",
        skip_reason: Some("official_metadao_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "metadao_bid_wall_v0_7_0",
        display_name: "MetaDAO Bid Wall v0.7.0",
        family: "metadao",
        version: "v0.7.0",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::METADAO_BID_WALL_V0_7_0_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "medium",
        skip_reason: Some("official_metadao_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "metadao_futarchy_v0_6_0",
        display_name: "MetaDAO Futarchy v0.6.0",
        family: "metadao",
        version: "v0.6.0",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::METADAO_FUTARCHY_V0_6_0_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "medium",
        skip_reason: Some("official_metadao_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "metadao_amm_v0_5_0",
        display_name: "MetaDAO AMM v0.5.0",
        family: "metadao",
        version: "v0.5.0",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::METADAO_AMM_V0_5_0_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "medium",
        skip_reason: Some("official_metadao_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "printr",
        display_name: "Printr",
        family: "printr",
        version: "solscan_candidate",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::PRINTR_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "medium",
        skip_reason: Some("solscan_program_label_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "zora",
        display_name: "Zora",
        family: "zora",
        version: "solscan_candidate",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::ZORA_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "medium",
        skip_reason: Some("solscan_program_label_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "moonit",
        display_name: "Moonit",
        family: "moonit",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "launchbeam",
        display_name: "LaunchBeam",
        family: "launchbeam",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: None,
        router_program_id: None,
        program_id_status: "unknown",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "heaven",
        display_name: "Heaven",
        family: "heaven",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: Some(crate::HEAVEN_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "planned",
        confidence: "low",
        skip_reason: Some("program_id_to_verify"),
        catalog_enabled: false,
    },
    // Carbon-backed discovery surfaces added for 0.7.47. These entries expose
    // program ids for Demo3 targeting while keeping all business support disabled
    // until a dedicated 0.7.47/0.7.48 corpus validates each surface.
    DexSupportMatrixEntry {
        code: "gavel",
        display_name: "Gavel",
        family: "gavel",
        version: "unknown",
        surface_type: "auction",
        surface_role: "to_verify",
        program_id: Some(crate::GAVEL_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "pump_fees",
        display_name: "Pump Fees",
        family: "pump",
        version: "fee_program",
        surface_type: "fee_program",
        surface_role: "to_verify",
        program_id: Some(crate::PUMP_FEES_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "meteora_pools",
        display_name: "Meteora Pools",
        family: "meteora",
        version: "pools",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: None,
        router_program_id: None,
        program_id_status: "alias_of_meteora_damm_v1",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: true,
        pool_candidate: true,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("program_id_alias_held_by_meteora_damm_v1"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "dflow_aggregator_v4",
        display_name: "DFlow Aggregator v4",
        family: "dflow",
        version: "v4",
        surface_type: "aggregator",
        surface_role: "aggregator_router",
        program_id: Some(crate::DFLOW_AGGREGATOR_V4_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "drift_v2",
        display_name: "Drift v2",
        family: "drift",
        version: "v2",
        surface_type: "perps",
        surface_role: "to_verify",
        program_id: Some(crate::DRIFT_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "jupiter_swap",
        display_name: "Jupiter Swap",
        family: "jupiter",
        version: "swap",
        surface_type: "aggregator",
        surface_role: "aggregator_router",
        program_id: Some(crate::JUPITER_SWAP_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "jupiter_dca",
        display_name: "Jupiter DCA",
        family: "jupiter",
        version: "dca",
        surface_type: "dca",
        surface_role: "aggregator_router",
        program_id: Some(crate::JUPITER_DCA_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "jupiter_limit_order",
        display_name: "Jupiter Limit Order",
        family: "jupiter",
        version: "limit_order",
        surface_type: "limit_order",
        surface_role: "aggregator_router",
        program_id: Some(crate::JUPITER_LIMIT_ORDER_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "jupiter_limit_order_2",
        display_name: "Jupiter Limit Order 2",
        family: "jupiter",
        version: "limit_order_2",
        surface_type: "limit_order",
        surface_role: "aggregator_router",
        program_id: Some(crate::JUPITER_LIMIT_ORDER_2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "jupiter_perpetuals",
        display_name: "Jupiter Perpetuals",
        family: "jupiter",
        version: "perpetuals",
        surface_type: "perps",
        surface_role: "to_verify",
        program_id: Some(crate::JUPITER_PERPETUALS_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "jupiter_lend",
        display_name: "Jupiter Lend",
        family: "jupiter",
        version: "lend",
        surface_type: "lending",
        surface_role: "to_verify",
        program_id: Some(crate::JUPITER_LEND_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "kamino_lending",
        display_name: "Kamino Lending",
        family: "kamino",
        version: "lending",
        surface_type: "lending",
        surface_role: "to_verify",
        program_id: Some(crate::KAMINO_LENDING_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "kamino_vault",
        display_name: "Kamino Vault",
        family: "kamino",
        version: "vault",
        surface_type: "vault",
        surface_role: "to_verify",
        program_id: Some(crate::KAMINO_VAULT_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "kamino_farms",
        display_name: "Kamino Farms",
        family: "kamino",
        version: "farms",
        surface_type: "farms",
        surface_role: "to_verify",
        program_id: Some(crate::KAMINO_FARMS_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "kamino_limit_order",
        display_name: "Kamino Limit Order",
        family: "kamino",
        version: "limit_order",
        surface_type: "limit_order",
        surface_role: "to_verify",
        program_id: Some(crate::KAMINO_LIMIT_ORDER_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "marginfi_v2",
        display_name: "Marginfi v2",
        family: "marginfi",
        version: "v2",
        surface_type: "lending",
        surface_role: "to_verify",
        program_id: Some(crate::MARGINFI_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "onchain_labs_dex_v1",
        display_name: "Onchain Labs DEX v1",
        family: "onchain_labs",
        version: "v1",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: None,
        router_program_id: None,
        program_id_status: "alias_of_okx_dex",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("program_id_alias_held_by_okx_dex"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "onchain_labs_dex_v2",
        display_name: "Onchain Labs DEX v2",
        family: "onchain_labs",
        version: "v2",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::ONCHAIN_LABS_DEX_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "pancake_swap",
        display_name: "Pancake Swap",
        family: "pancake",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::PANCAKE_SWAP_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "vertigo",
        display_name: "Vertigo",
        family: "vertigo",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::VERTIGO_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "virtuals",
        display_name: "Virtuals",
        family: "virtuals",
        version: "unknown",
        surface_type: "launch",
        surface_role: "launch_surface",
        program_id: Some(crate::VIRTUALS_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "wavebreak",
        display_name: "Wavebreak",
        family: "wavebreak",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "dex_effective",
        program_id: Some(crate::WAVEBREAK_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("upstream_git_program_id_requires_local_corpus_verification"),
        catalog_enabled: false,
    },
    // Historical program ids imported from the legacy Python entities.py list.
    // These entries are intentionally not treated as verified support: they exist so
    // Demo3 can target signatures by program id while corpus validation remains strict.
    DexSupportMatrixEntry {
        code: "aldrin",
        display_name: "Aldrin",
        family: "aldrin",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "aldrin_v2",
        display_name: "Aldrin V2",
        family: "aldrin",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "crema",
        display_name: "Crema",
        family: "crema",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "cropper",
        display_name: "Cropper",
        family: "cropper",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "lifinity_v1",
        display_name: "Lifinity V1",
        family: "lifinity",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("EewxydAPCCVuNEyrVN68PuSYdQ7wKn27V9Gjeoi8dy3S"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "lifinity_v2",
        display_name: "Lifinity V2",
        family: "lifinity",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::LIFINITY_AMM_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "mercurial",
        display_name: "Mercurial",
        family: "mercurial",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "orca_v1",
        display_name: "Orca V1",
        family: "orca",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "orca_v2",
        display_name: "Orca V2",
        family: "orca",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "phoenix",
        display_name: "Phoenix",
        family: "phoenix",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::PHOENIX_V1_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "saber",
        display_name: "Saber",
        family: "saber",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "saber_decimals",
        display_name: "Saber Decimals",
        family: "saber",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "openbook_v2",
        display_name: "OpenBook V2",
        family: "openbook",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::OPENBOOK_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "fox",
        display_name: "Fox",
        family: "fox",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("HyhpEq587ANShDdbx1mP4dTmDZC44CXWft29oYQXDb53"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "sanctum_infinity",
        display_name: "Sanctum Infinity",
        family: "sanctum",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "saros",
        display_name: "Saros",
        family: "saros",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "stabble_stable_swap",
        display_name: "Stabble Stable Swap",
        family: "stabble",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::STABBLE_STABLE_SWAP_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "stabble_weighted_swap",
        display_name: "Stabble Weighted Swap",
        family: "stabble",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::STABBLE_WEIGHTED_SWAP_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "stepn",
        display_name: "StepN",
        family: "stepn",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "solayer",
        display_name: "Solayer",
        family: "solayer",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("endoLNCKTqDn8gSVnN2hDdpgACUPWHZTwoYnnMybpAT"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "penguin",
        display_name: "Penguin",
        family: "penguin",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("PSwapMdSai8tjrEXcxFeQth87xC4rRsa4VA5mhGhXkP"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "sanctum",
        display_name: "Sanctum",
        family: "sanctum",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "one_dex",
        display_name: "1DEX",
        family: "one_dex",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "solfi",
        display_name: "SolFi",
        family: "solfi",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "bonkswap",
        display_name: "Bonkswap",
        family: "bonkswap",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::BONKSWAP_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "guacswap",
        display_name: "Guacswap",
        family: "guacswap",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "invariant",
        display_name: "Invariant",
        family: "invariant",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("HyaB3W9q6XdA5xwpU4XnSZV94htfmbmqJXZcEbRaJutt"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "oasis",
        display_name: "Oasis",
        family: "oasis",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("9tKE7Mbmj4mxDjWatikzGAtkoWosiiZX9y6J4Hfm2R8H"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "token_swap",
        display_name: "Token Swap",
        family: "token_swap",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "helium_network",
        display_name: "Helium Network",
        family: "helium",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "marinade_liquid_staking",
        display_name: "Marinade Liquid Staking",
        family: "marinade",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::MARINADE_FINANCE_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "francium_yield_pools",
        display_name: "Francium Yield Pools",
        family: "francium",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("FC81tbGt6JWRXidaWYFXxGnTk4VgobhJHATvTRVMqgWj"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "marinade_governance",
        display_name: "Marinade Governance",
        family: "marinade",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "serum_dao",
        display_name: "Serum DAO",
        family: "serum",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "port_finance",
        display_name: "Port Finance",
        family: "port",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "solend_classic",
        display_name: "Solend Classic",
        family: "solend",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "hyperspace_nft_amm",
        display_name: "Hyperspace NFT AMM",
        family: "hyperspace",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("HYPERfwdTjyJ2SCaKHmpF2MtrXqWxrsotYDsTrshHWq8"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "magic_eden_nft_amm",
        display_name: "Magic Eden NFT AMM",
        family: "magic_eden",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "raydium_staking_early",
        display_name: "Raydium Staking Early",
        family: "raydium",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "orca_aquafarm_v1",
        display_name: "Orca Aquafarm V1",
        family: "orca",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("82yxjeMsvaURa4MbZZ7WZZHfobirZYkH1zF8fmeGtyaQ"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "quarry_merge_mining",
        display_name: "Quarry Merge Mining",
        family: "quarry",
        version: "historical_entities_py",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some("QMNeHCGYnLVDn1icRAfQZpjPLBNkfGbSKRB83G5d8KB"),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("historical_entities_py_program_id_requires_corpus_verification"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "goosefx_v1",
        display_name: "GooseFX V1",
        family: "goosefx",
        version: "v1",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::GOOSEFX_V1_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "obric_v2",
        display_name: "Obric V2",
        family: "obric",
        version: "v2",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::OBRIC_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "ondo_global_market",
        display_name: "Ondo Global Market",
        family: "ondo",
        version: "global_market",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::ONDO_GLOBAL_MARKET_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "scorch",
        display_name: "Scorch",
        family: "scorch",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::SCORCH_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "zerofi",
        display_name: "ZeroFi",
        family: "zerofi",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::ZEROFI_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "manifest_clob",
        display_name: "Manifest CLOB",
        family: "manifest",
        version: "clob",
        surface_type: "orderbook",
        surface_role: "to_verify",
        program_id: Some(crate::MANIFEST_CLOB_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "alphaq",
        display_name: "AlphaQ",
        family: "alphaq",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::ALPHAQ_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "goonfi",
        display_name: "Goonfi",
        family: "goonfi",
        version: "v1",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::GOONFI_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "goonfi_v2",
        display_name: "Goonfi V2",
        family: "goonfi",
        version: "v2",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::GOONFI_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "byreal",
        display_name: "Byreal",
        family: "byreal",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::BYREAL_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "bisonfi",
        display_name: "BisonFi",
        family: "bisonfi",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::BISONFI_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "fusionamm",
        display_name: "FusionAMM",
        family: "fusion",
        version: "amm",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::FUSIONAMM_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "woofi",
        display_name: "Woofi",
        family: "woofi",
        version: "unknown",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::WOOFI_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "aquifer",
        display_name: "Aquifer",
        family: "aquifer",
        version: "unknown",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::AQUIFER_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "humidifi",
        display_name: "Humidifi",
        family: "humidifi",
        version: "unknown",
        surface_type: "unknown",
        surface_role: "to_verify",
        program_id: Some(crate::HUMIDIFI_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
    DexSupportMatrixEntry {
        code: "solfi_v2",
        display_name: "SolFi V2",
        family: "solfi",
        version: "v2",
        surface_type: "AMM",
        surface_role: "to_verify",
        program_id: Some(crate::SOLFI_V2_PROGRAM_ID),
        router_program_id: None,
        program_id_status: "to_verify",
        observed: false,
        decoded: false,
        materialized: false,
        trade_candidate: false,
        candle_candidate: false,
        pair_candidate: false,
        pool_candidate: false,
        status: "to_verify",
        confidence: "low",
        skip_reason: Some("vybe_supported_dex_amm_requires_local_corpus_and_decoder_source"),
        catalog_enabled: false,
    },
];

/// Returns all static DEX support matrix entries.
pub fn dex_support_matrix_entries() -> &'static [crate::DexSupportMatrixEntry] {
    return DEX_SUPPORT_MATRIX_ENTRIES;
}

/// Returns all DEX support matrix entries as owned DTOs.
pub fn dex_support_matrix_entry_dtos() -> std::vec::Vec<crate::DexSupportMatrixEntryDto> {
    let mut entries = std::vec::Vec::new();
    for entry in crate::dex_support_matrix_entries() {
        entries.push(crate::DexSupportMatrixEntryDto::from_entry(entry));
    }
    return entries;
}

/// Looks up one DEX support matrix entry by internal code.
pub fn dex_support_matrix_entry_by_code(
    code: &str,
) -> std::option::Option<&'static crate::DexSupportMatrixEntry> {
    for entry in crate::dex_support_matrix_entries() {
        if entry.code == code {
            return Some(entry);
        }
    }
    return None;
}

/// Looks up one DEX support matrix entry by primary or router program id.
pub fn dex_support_matrix_entry_by_program_id(
    program_id: &str,
) -> std::option::Option<&'static crate::DexSupportMatrixEntry> {
    for entry in crate::dex_support_matrix_entries() {
        if let Some(entry_program_id) = entry.program_id {
            if entry_program_id == program_id {
                return Some(entry);
            }
        }
        if let Some(entry_router_program_id) = entry.router_program_id {
            if entry_router_program_id == program_id {
                return Some(entry);
            }
        }
    }
    return None;
}

#[cfg(test)]
mod tests {
    use std::str::FromStr;

    use super::DEX_SUPPORT_MATRIX_ENTRIES;

    #[test]
    fn matrix_program_ids_are_valid_solana_pubkeys() {
        for entry in DEX_SUPPORT_MATRIX_ENTRIES {
            let Some(program_id) = entry.program_id else {
                continue;
            };
            if let Err(error) = solana_sdk::pubkey::Pubkey::from_str(program_id) {
                panic!(
                    "matrix entry '{}' has invalid Solana program id '{}': {}",
                    entry.code, program_id, error
                );
            }
            let Some(router_program_id) = entry.router_program_id else {
                continue;
            };
            if let Err(error) = solana_sdk::pubkey::Pubkey::from_str(router_program_id) {
                panic!(
                    "matrix entry '{}' has invalid Solana router program id '{}': {}",
                    entry.code, router_program_id, error
                );
            }
        }
    }

    #[test]
    fn matrix_contains_required_0_7_39_dex_first_entries() {
        let codes = [
            "pump_fun",
            "pump_swap",
            "raydium_cpmm",
            "raydium_clmm",
            "raydium_amm_v4",
            "raydium_launchpad",
            "raydium_liquidity_locking",
            "meteora_dlmm",
            "meteora_dlc",
            "meteora_damm_v1",
            "meteora_damm_v2",
            "bags",
            "bonk",
            "bonk_fun",
            "okx_dex",
            "boop_fun",
            "believe",
            "zora",
            "moonit",
            "launchbeam",
            "heaven",
            "dexlab",
            "metadao",
            "metadao_launchpad_v0_7_0",
            "printr",
        ];
        for code in codes {
            let entry = crate::dex_support_matrix_entry_by_code(code);
            assert!(entry.is_some(), "missing matrix entry for {}", code);
        }
    }

    #[test]
    fn matrix_does_not_invent_program_ids_for_unverified_planned_surfaces() {
        let codes = [
            "bags",
            "letsbonk",
            "bonk",
            "bonk_fun",
            "believe",
            "moonit",
            "launchbeam",
            "metadao",
        ];
        for code in codes {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing matrix entry for {}", code),
            };
            assert!(entry.program_id.is_none(), "{} should not have invented program id", code);
            assert!(!entry.catalog_enabled, "{} should not be enabled before verification", code);
        }
    }

    #[test]
    fn matrix_lookup_by_program_id_returns_expected_protocol() {
        let entry =
            match crate::dex_support_matrix_entry_by_program_id(crate::METEORA_DLMM_PROGRAM_ID) {
                Some(entry) => entry,
                None => panic!("expected meteora_dlmm program id lookup"),
            };
        assert_eq!(entry.code, "meteora_dlmm");

        let raydium_entry =
            match crate::dex_support_matrix_entry_by_program_id(crate::RAYDIUM_AMM_V4_PROGRAM_ID) {
                Some(entry) => entry,
                None => panic!("expected raydium AMM v4 program id lookup"),
            };
        assert_eq!(raydium_entry.code, "raydium_amm_v4");
    }

    #[test]
    fn matrix_marks_raydium_amm_v4_supported_after_0_7_41() {
        let entry = match crate::dex_support_matrix_entry_by_code("raydium_amm_v4") {
            Some(entry) => entry,
            None => panic!("expected raydium_amm_v4 matrix entry"),
        };
        assert!(entry.observed);
        assert!(entry.decoded);
        assert!(entry.materialized);
        assert!(entry.trade_candidate);
        assert!(entry.candle_candidate);
        assert_eq!(entry.status, "supported");
        assert_eq!(entry.confidence, "high");
        assert_eq!(entry.skip_reason, None);
    }

    #[test]
    fn matrix_marks_partial_meteora_damm_v1_correctly() {
        let entry = match crate::dex_support_matrix_entry_by_code("meteora_damm_v1") {
            Some(entry) => entry,
            None => panic!("expected meteora_damm_v1 matrix entry"),
        };
        assert_eq!(entry.status, "partial");
        assert!(entry.observed);
        assert!(entry.decoded);
        assert!(!entry.trade_candidate);
        assert!(!entry.candle_candidate);
        assert_eq!(entry.skip_reason, Some("meteora_damm_v1_swap_without_amount_payload"));
    }

    #[test]
    fn matrix_marks_raydium_launchpad_bootstrap_conservatively() {
        let entry = match crate::dex_support_matrix_entry_by_code("raydium_launchpad") {
            Some(entry) => entry,
            None => panic!("expected raydium_launchpad matrix entry"),
        };
        assert_eq!(entry.status, "bootstrap");
        assert!(entry.decoded);
        assert!(!entry.materialized);
        assert!(!entry.trade_candidate);
        assert!(!entry.candle_candidate);
        assert_eq!(entry.skip_reason, Some("decoded_events_only_until_local_corpus"));
    }

    #[test]
    fn matrix_marks_launch_surfaces_as_launch_or_bonding_curve() {
        let codes = [
            "pump_fun",
            "raydium_launchpad",
            "letsbonk",
            "bonk_fun",
            "bags",
            "moonshot",
            "moonit",
            "boop_fun",
            "believe",
            "heaven",
        ];
        for code in codes {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing matrix entry for {}", code),
            };
            assert!(
                entry.surface_type == "launch" || entry.surface_type == "bonding_curve",
                "{} has unexpected surface type {}",
                code,
                entry.surface_type
            );
        }
    }

    #[test]
    fn matrix_keeps_0_7_39_deferred_surfaces_non_trade_materialized() {
        let codes = [
            "letsbonk", "bonk_fun", "bags", "moonshot", "moonit", "boop_fun", "believe", "heaven",
        ];
        for code in codes {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing matrix entry for {}", code),
            };
            assert!(!entry.decoded, "{} must not be decoded without corpus", code);
            assert!(!entry.materialized, "{} must not materialize launch rows as trades", code);
            assert!(!entry.trade_candidate, "{} must not create trade candidates", code);
            assert!(!entry.candle_candidate, "{} must not create candle candidates", code);
            assert!(!entry.catalog_enabled, "{} must not be inserted as enabled DEX", code);
        }
    }

    #[test]
    fn matrix_marks_effective_dexes_for_dex_first_work() {
        let codes = [
            "pump_swap",
            "raydium_cpmm",
            "raydium_clmm",
            "raydium_amm_v4",
            "raydium_stable_swap",
            "meteora_dlmm",
            "meteora_damm_v1",
            "meteora_damm_v2",
            "meteora_dbc",
            "orca_whirlpools",
            "fluxbeam",
            "dexlab",
        ];
        for code in codes {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing matrix entry for {}", code),
            };
            assert_eq!(entry.surface_role, "dex_effective", "{} must be DEX-first", code);
        }
    }

    #[test]
    fn matrix_keeps_metadao_umbrella_unverified_without_program_id() {
        let entry = match crate::dex_support_matrix_entry_by_code("metadao") {
            Some(entry) => entry,
            None => panic!("missing matrix entry for metadao"),
        };
        assert_eq!(entry.surface_role, "to_verify");
        assert_eq!(entry.program_id_status, "to_verify");
        assert!(entry.program_id.is_none());
        assert!(!entry.decoded);
        assert!(!entry.materialized);
        assert!(!entry.trade_candidate);
        assert!(!entry.candle_candidate);
        assert!(!entry.catalog_enabled);
    }

    #[test]
    fn matrix_exposes_sourced_candidate_program_ids_without_activation() {
        let candidates = [
            ("printr", crate::PRINTR_PROGRAM_ID),
            ("zora", crate::ZORA_PROGRAM_ID),
            ("raydium_liquidity_locking", crate::RAYDIUM_LIQUIDITY_LOCKING_PROGRAM_ID),
            ("okx_dex", crate::OKX_DEX_PROGRAM_ID),
            ("boop_fun", crate::BOOP_FUN_PROGRAM_ID),
            ("heaven", crate::HEAVEN_PROGRAM_ID),
            ("bonkswap", crate::BONKSWAP_PROGRAM_ID),
            ("metadao_launchpad_v0_7_0", crate::METADAO_LAUNCHPAD_V0_7_0_PROGRAM_ID),
            ("metadao_bid_wall_v0_7_0", crate::METADAO_BID_WALL_V0_7_0_PROGRAM_ID),
            ("metadao_futarchy_v0_6_0", crate::METADAO_FUTARCHY_V0_6_0_PROGRAM_ID),
            ("metadao_amm_v0_5_0", crate::METADAO_AMM_V0_5_0_PROGRAM_ID),
        ];
        for (code, expected_program_id) in candidates {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing matrix entry for {}", code),
            };
            assert!(
                entry.surface_role == "to_verify"
                    || entry.surface_role == "launch_surface"
                    || entry.surface_role == "aggregator_router",
                "{} has unexpected candidate role {}",
                code,
                entry.surface_role
            );
            assert_eq!(entry.program_id, Some(expected_program_id));
            assert_eq!(entry.program_id_status, "to_verify");
            assert!(!entry.decoded);
            assert!(!entry.materialized);
            assert!(!entry.trade_candidate);
            assert!(!entry.candle_candidate);
            assert!(!entry.catalog_enabled);
        }
    }

    #[test]
    fn matrix_exposes_historical_entities_py_program_ids_as_unverified_targets() {
        let codes = [
            "aldrin",
            "lifinity_v1",
            "openbook_v2",
            "moonshot",
            "one_dex",
            "token_swap",
            "orca_v1",
            "saber",
            "stabble_stable_swap",
        ];
        for code in codes {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing historical matrix entry for {}", code),
            };
            assert!(entry.program_id.is_some(), "{} should expose historical program id", code);
            assert_eq!(entry.program_id_status, "to_verify");
            assert!(!entry.decoded, "{} must not be decoded without corpus", code);
            assert!(!entry.materialized, "{} must not be materialized without corpus", code);
            assert!(!entry.trade_candidate, "{} must not create trade candidates", code);
            assert!(!entry.candle_candidate, "{} must not create candle candidates", code);
            assert!(
                !entry.catalog_enabled,
                "{} must not be catalog-enabled before verification",
                code
            );
        }
    }

    #[test]
    fn matrix_exposes_vybe_supported_program_ids_as_unverified_targets() {
        let candidates = [
            ("goosefx_v1", crate::GOOSEFX_V1_PROGRAM_ID),
            ("obric_v2", crate::OBRIC_V2_PROGRAM_ID),
            ("ondo_global_market", crate::ONDO_GLOBAL_MARKET_PROGRAM_ID),
            ("scorch", crate::SCORCH_PROGRAM_ID),
            ("zerofi", crate::ZEROFI_PROGRAM_ID),
            ("manifest_clob", crate::MANIFEST_CLOB_PROGRAM_ID),
            ("alphaq", crate::ALPHAQ_PROGRAM_ID),
            ("goonfi", crate::GOONFI_PROGRAM_ID),
            ("goonfi_v2", crate::GOONFI_V2_PROGRAM_ID),
            ("byreal", crate::BYREAL_PROGRAM_ID),
            ("bisonfi", crate::BISONFI_PROGRAM_ID),
            ("fusionamm", crate::FUSIONAMM_PROGRAM_ID),
            ("woofi", crate::WOOFI_PROGRAM_ID),
            ("aquifer", crate::AQUIFER_PROGRAM_ID),
            ("humidifi", crate::HUMIDIFI_PROGRAM_ID),
            ("solfi_v2", crate::SOLFI_V2_PROGRAM_ID),
        ];
        for (code, expected_program_id) in candidates {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing Vybe-backed matrix entry for {}", code),
            };
            assert_eq!(entry.program_id, Some(expected_program_id));
            assert_eq!(entry.program_id_status, "to_verify");
            assert_eq!(entry.status, "to_verify");
            assert!(!entry.decoded);
            assert!(!entry.materialized);
            assert!(!entry.trade_candidate);
            assert!(!entry.candle_candidate);
            assert!(!entry.catalog_enabled);
        }
    }

    #[test]
    fn matrix_has_no_duplicate_codes_or_program_ids() {
        let mut seen_codes = std::collections::BTreeSet::new();
        let mut seen_program_ids = std::collections::BTreeMap::<&str, &str>::new();
        for entry in DEX_SUPPORT_MATRIX_ENTRIES {
            assert!(seen_codes.insert(entry.code), "duplicate matrix code {}", entry.code);
            if let Some(program_id) = entry.program_id {
                match seen_program_ids.insert(program_id, entry.code) {
                    Some(previous_code) => panic!(
                        "duplicate matrix program_id {} for {} and {}",
                        program_id, previous_code, entry.code
                    ),
                    None => (),
                }
            }
        }
    }

    #[test]
    fn matrix_keeps_remaining_alias_surfaces_without_duplicate_program_ids() {
        let aliases = [
            (
                "meteora_pools",
                "alias_of_meteora_damm_v1",
                "program_id_alias_held_by_meteora_damm_v1",
            ),
            ("onchain_labs_dex_v1", "alias_of_okx_dex", "program_id_alias_held_by_okx_dex"),
        ];
        for (code, expected_status, expected_skip_reason) in aliases {
            let entry = match crate::dex_support_matrix_entry_by_code(code) {
                Some(entry) => entry,
                None => panic!("missing alias matrix entry for {}", code),
            };
            assert_eq!(entry.program_id, None);
            assert_eq!(entry.program_id_status, expected_status);
            assert_eq!(entry.skip_reason, Some(expected_skip_reason));
            assert!(!entry.decoded);
            assert!(!entry.materialized);
            assert!(!entry.trade_candidate);
            assert!(!entry.candle_candidate);
            assert!(!entry.catalog_enabled);
        }
    }

    #[test]
    fn matrix_dto_preserves_core_fields() {
        let entry = match crate::dex_support_matrix_entry_by_code("pump_swap") {
            Some(entry) => entry,
            None => panic!("expected pump_swap matrix entry"),
        };
        let dto = crate::DexSupportMatrixEntryDto::from_entry(entry);
        assert_eq!(dto.code, "pump_swap");
        assert_eq!(dto.program_id, Some(crate::PUMP_SWAP_PROGRAM_ID.to_string()));
        assert_eq!(dto.surface_role, "dex_effective");
        assert!(dto.trade_candidate);
        assert!(dto.candle_candidate);
    }
}
