v0.3.15-pre.007-fix.001

This commit is contained in:
2026-09-13 17:51:44 +02:00
parent 0d9ec5c490
commit 320699e61a
12 changed files with 90 additions and 88 deletions

View File

@@ -99,10 +99,7 @@ impl crate::AppState {
}
/// Revalidates one future Start request and reconstructs its exact Transport/Worker source contract without launching a Worker.
pub(crate) fn validate_route_start(
&self,
request: &crate::RawIngestRouteStartRequestDto,
) -> ksp_core_lib::Result<crate::RawIngestRouteStartValidationDto> {
pub(crate) fn validate_route_start(&self, request: &crate::RawIngestRouteStartRequestDto) -> ksp_core_lib::Result<crate::RawIngestRouteStartValidationDto> {
let generation = self.inventory_generation.lock();
let generation = match generation {
std::result::Result::Ok(value) => *value,

View File

@@ -26,13 +26,7 @@ impl crate::RawIngestRouteId {
/// Returns all V1 route identifiers in stable UI order.
#[must_use]
pub(crate) fn all() -> std::vec::Vec<Self> {
return vec![
Self::YellowstoneHydrated,
Self::StandardLogsHydrated,
Self::StandardBlockDirect,
Self::HeliusTransactionHydrated,
Self::HttpBlockPolling,
];
return vec![Self::YellowstoneHydrated, Self::StandardLogsHydrated, Self::StandardBlockDirect, Self::HeliusTransactionHydrated, Self::HttpBlockPolling];
}
/// Returns the application-owned route family used by safe UI projections.
@@ -263,11 +257,7 @@ impl crate::RawIngestRouteDto {
/// Builds one route that is not composable from the current Config profile.
#[must_use]
pub(crate) fn unavailable(
route_id: crate::RawIngestRouteId,
network: std::option::Option<&str>,
reason: crate::RawIngestRouteUnavailableReason,
) -> Self {
pub(crate) fn unavailable(route_id: crate::RawIngestRouteId, network: std::option::Option<&str>, reason: crate::RawIngestRouteUnavailableReason) -> Self {
return Self {
family: route_id.family(),
label: route_id.label().to_owned(),

View File

@@ -39,11 +39,9 @@ pub(crate) const ERROR_CODE_SPLASH_ORIGIN_INVALID: ksp_core_lib::ErrorCode =
pub(crate) const ERROR_CODE_SPLASH_SETTING_INVALID: ksp_core_lib::ErrorCode =
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "splash_setting_invalid");
/// Tauri runtime assembly or execution failed.
pub(crate) const ERROR_CODE_TAURI_RUNTIME_FAILED: ksp_core_lib::ErrorCode =
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_runtime_failed");
pub(crate) const ERROR_CODE_TAURI_RUNTIME_FAILED: ksp_core_lib::ErrorCode = ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_runtime_failed");
/// A required Tauri window is missing from the configured application runtime.
pub(crate) const ERROR_CODE_TAURI_WINDOW_MISSING: ksp_core_lib::ErrorCode =
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_missing");
pub(crate) const ERROR_CODE_TAURI_WINDOW_MISSING: ksp_core_lib::ErrorCode = ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_missing");
/// A Tauri window show/focus/destroy/event operation failed.
pub(crate) const ERROR_CODE_TAURI_WINDOW_OPERATION_FAILED: ksp_core_lib::ErrorCode =
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_operation_failed");

View File

@@ -45,10 +45,10 @@ pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_LOGGING;
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_STORE;
/// Composite-local identifier for the standard Transport component.
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT;
/// Prefix used by optional same-network Transport capability sources.
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_PREFIX;
/// Composite-local optional Transport source for Helius WebSocket capabilities.
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_HELIUS;
/// Prefix used by optional same-network Transport capability sources.
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_PREFIX;
/// Composite-local optional Transport source for Yellowstone gRPC capabilities.
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_YELLOWSTONE;
/// Structured domain used while bootstrapping Config and Logging.

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-raw-transaction-ingest-desk/src/route_inventory.rs
// version: 4
// version: 5
//! Config-only logical route inventory for Raw Transaction Ingest Desk.
@@ -48,10 +48,7 @@ impl RouteCapabilities {
}
/// Rebuilds the complete safe route inventory from validated Config without opening any network, Store or Worker resource.
pub(crate) fn build_route_inventory(
management: &ksp_config_lib::ConfigManagement,
generation: u32,
) -> ksp_core_lib::Result<crate::RawIngestRouteInventoryDto> {
pub(crate) fn build_route_inventory(management: &ksp_config_lib::ConfigManagement, generation: u32) -> ksp_core_lib::Result<crate::RawIngestRouteInventoryDto> {
let environment = ksp_config_lib::ConfigEnvironment::load();
let environment = match environment {
std::result::Result::Ok(value) => value,
@@ -61,7 +58,7 @@ pub(crate) fn build_route_inventory(
}
/// Rebuilds the complete safe route inventory from one already captured Config environment snapshot.
pub(crate) pub(crate) fn build_route_inventory_with_environment(
pub(crate) fn build_route_inventory_with_environment(
management: &ksp_config_lib::ConfigManagement,
environment: &ksp_config_lib::ConfigEnvironment,
generation: u32,
@@ -73,12 +70,7 @@ pub(crate) pub(crate) fn build_route_inventory_with_environment(
};
let mut profiles = std::vec::Vec::with_capacity(catalog.profile_ids.len());
for profile_id in &catalog.profile_ids {
profiles.push(build_profile_inventory(
management,
environment,
profile_id.as_str(),
profile_id == &catalog.default_profile,
));
profiles.push(build_profile_inventory(management, environment, profile_id.as_str(), profile_id == &catalog.default_profile));
}
ksp_logging_lib::debug!(
target: crate::TRACING_TARGET,
@@ -164,11 +156,8 @@ fn build_profile_inventory(
},
};
let network = store.settings().network().as_str().to_owned();
let base_transport_profile = crate::required_composite_component_profile(
&composite,
crate::COMPOSITE_COMPONENT_ID_TRANSPORT,
ksp_config_lib::FILE_ID_STD_TRANSPORT,
);
let base_transport_profile =
crate::required_composite_component_profile(&composite, crate::COMPOSITE_COMPONENT_ID_TRANSPORT, ksp_config_lib::FILE_ID_STD_TRANSPORT);
let base_transport_profile = match base_transport_profile {
std::result::Result::Ok(value) => value,
std::result::Result::Err(_) => {
@@ -184,12 +173,7 @@ fn build_profile_inventory(
let base_transport = match base_transport {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => {
return unavailable_profile(
profile_id,
is_default,
std::option::Option::Some(network.as_str()),
resolution_error_reason(&error),
);
return unavailable_profile(profile_id, is_default, std::option::Option::Some(network.as_str()), resolution_error_reason(&error));
},
};
if !transport_matches_network(&base_transport, network.as_str()) {

View File

@@ -60,11 +60,8 @@ pub(crate) fn validate_route_start(
"Raw Transaction Ingest Desk Start-time Store network no longer matches the selected route",
));
}
let transport_profile = crate::required_composite_component_profile(
&composite,
crate::COMPOSITE_COMPONENT_ID_TRANSPORT,
ksp_config_lib::FILE_ID_STD_TRANSPORT,
);
let transport_profile =
crate::required_composite_component_profile(&composite, crate::COMPOSITE_COMPONENT_ID_TRANSPORT, ksp_config_lib::FILE_ID_STD_TRANSPORT);
let transport_profile = match transport_profile {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => return route_start_error("Cannot resolve Start-time base Transport profile", error),
@@ -115,12 +112,8 @@ fn prepare_standard_logs(
network: &str,
commitment: ksp_onchain_transport_lib::SolanaCommitment,
) -> ksp_core_lib::Result<()> {
let endpoint = single_ws_endpoint(
transport,
network,
ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard,
ksp_onchain_transport_lib::WsSubscriptionKind::Logs,
);
let endpoint =
single_ws_endpoint(transport, network, ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard, ksp_onchain_transport_lib::WsSubscriptionKind::Logs);
let endpoint = match endpoint {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => return std::result::Result::Err(error),
@@ -155,12 +148,8 @@ fn prepare_standard_block(
network: &str,
commitment: ksp_onchain_transport_lib::SolanaCommitment,
) -> ksp_core_lib::Result<()> {
let endpoint = single_ws_endpoint(
transport,
network,
ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard,
ksp_onchain_transport_lib::WsSubscriptionKind::Block,
);
let endpoint =
single_ws_endpoint(transport, network, ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard, ksp_onchain_transport_lib::WsSubscriptionKind::Block);
let endpoint = match endpoint {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => return std::result::Result::Err(error),
@@ -416,9 +405,7 @@ fn single_http_role(
let matching = roles
.into_iter()
.filter(|role_name| {
return request_kinds
.iter()
.all(|request_kind| return http_role_supports_request_kind(settings, network, role_name.as_str(), request_kind));
return request_kinds.iter().all(|request_kind| return http_role_supports_request_kind(settings, network, role_name.as_str(), request_kind));
})
.collect::<std::vec::Vec<_>>();
if matching.len() != 1 {
@@ -427,12 +414,7 @@ fn single_http_role(
return std::result::Result::Ok(ksp_onchain_transport_lib::HttpRoleName::new(matching[0].clone()));
}
fn http_role_supports_request_kind(
settings: &ksp_onchain_transport_lib::HttpTransportSettings,
network: &str,
role_name: &str,
request_kind: &str,
) -> bool {
fn http_role_supports_request_kind(settings: &ksp_onchain_transport_lib::HttpTransportSettings, network: &str, role_name: &str, request_kind: &str) -> bool {
for endpoint in settings.endpoints() {
if !endpoint.enabled() || endpoint.cluster().as_str() != network {
continue;

View File

@@ -149,8 +149,6 @@ async fn validate_route_start(
let result = state.validate_route_start(&request);
return match result {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(error) => {
std::result::Result::Err(project_command_error("validate_route_start", crate::TRACING_DOMAIN_ROUTE_START, &error))
},
std::result::Result::Err(error) => std::result::Result::Err(project_command_error("validate_route_start", crate::TRACING_DOMAIN_ROUTE_START, &error)),
};
}