0.7.38-B
This commit is contained in:
@@ -451,6 +451,10 @@ pub(crate) struct DemoPipeline2LocalPipelineDiagnosticSummary {
|
||||
/// Missing trade events grouped by diagnostic reason.
|
||||
pub missing_trade_event_reason_summaries:
|
||||
std::vec::Vec<DemoPipeline2LocalMissingTradeEventReasonSummary>,
|
||||
/// Samples of launch-origin attributions.
|
||||
pub launch_origin_samples: std::vec::Vec<DemoPipeline2LocalLaunchOriginDiagnosticSample>,
|
||||
/// Samples of pool-origin rows and their optional launch linkage.
|
||||
pub pool_origin_samples: std::vec::Vec<DemoPipeline2LocalPoolOriginDiagnosticSample>,
|
||||
/// Prioritized samples of tokens whose display metadata is still incomplete.
|
||||
pub token_metadata_gap_samples:
|
||||
std::vec::Vec<DemoPipeline2LocalTokenMetadataGapDiagnosticSample>,
|
||||
@@ -896,6 +900,77 @@ pub(crate) struct DemoPipeline2LocalPairGapDiagnosticSample {
|
||||
pub pair_candle_count: i64,
|
||||
}
|
||||
|
||||
/// Local launch-origin diagnostic sample for the UI.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[ts(
|
||||
export,
|
||||
export_to = "../frontend/ts/bindings/DemoPipeline2LocalLaunchOriginDiagnosticSample.ts"
|
||||
)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub(crate) struct DemoPipeline2LocalLaunchOriginDiagnosticSample {
|
||||
/// Launch attribution id.
|
||||
#[ts(type = "number")]
|
||||
pub launch_attribution_id: i64,
|
||||
/// Launch surface code.
|
||||
pub launch_surface_code: std::string::String,
|
||||
/// Launch surface display name.
|
||||
pub launch_surface_name: std::string::String,
|
||||
/// Transaction signature.
|
||||
pub transaction_signature: std::string::String,
|
||||
/// Decoded event id.
|
||||
#[ts(type = "number")]
|
||||
pub decoded_event_id: i64,
|
||||
/// Effective protocol recorded on the decoded event.
|
||||
pub protocol_name: std::string::String,
|
||||
/// Match kind used for attribution.
|
||||
pub match_kind: std::string::String,
|
||||
/// Matched key value.
|
||||
pub matched_value: std::string::String,
|
||||
/// Optional pool id.
|
||||
#[ts(type = "number | null")]
|
||||
pub pool_id: std::option::Option<i64>,
|
||||
/// Optional pool address.
|
||||
pub pool_address: std::option::Option<std::string::String>,
|
||||
/// Optional pair id.
|
||||
#[ts(type = "number | null")]
|
||||
pub pair_id: std::option::Option<i64>,
|
||||
/// Optional pair symbol.
|
||||
pub pair_symbol: std::option::Option<std::string::String>,
|
||||
}
|
||||
|
||||
/// Local pool-origin diagnostic sample for the UI.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[ts(
|
||||
export,
|
||||
export_to = "../frontend/ts/bindings/DemoPipeline2LocalPoolOriginDiagnosticSample.ts"
|
||||
)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub(crate) struct DemoPipeline2LocalPoolOriginDiagnosticSample {
|
||||
/// Pool-origin id.
|
||||
#[ts(type = "number")]
|
||||
pub pool_origin_id: i64,
|
||||
/// Effective DEX code attached to the pool.
|
||||
pub dex_code: std::string::String,
|
||||
/// Pool id.
|
||||
#[ts(type = "number")]
|
||||
pub pool_id: i64,
|
||||
/// Pool address.
|
||||
pub pool_address: std::string::String,
|
||||
/// Optional pair id.
|
||||
#[ts(type = "number | null")]
|
||||
pub pair_id: std::option::Option<i64>,
|
||||
/// Optional pair symbol.
|
||||
pub pair_symbol: std::option::Option<std::string::String>,
|
||||
/// Optional launch surface code.
|
||||
pub launch_surface_code: std::option::Option<std::string::String>,
|
||||
/// Founding transaction signature.
|
||||
pub founding_signature: std::string::String,
|
||||
/// Founding effective protocol.
|
||||
pub founding_protocol_name: std::string::String,
|
||||
/// Founding decoded event kind.
|
||||
pub founding_event_kind: std::string::String,
|
||||
}
|
||||
|
||||
/// Local token metadata gap sample for the UI.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[ts(
|
||||
@@ -1188,7 +1263,7 @@ pub(crate) async fn demo_pipeline2_validate_local_pipeline(
|
||||
let service = kb_lib::LocalPipelineValidationService::new(database.clone());
|
||||
let profile_code = match request {
|
||||
Some(request) => request.profile_code,
|
||||
None => "0.7.38_token_metadata_gap_prioritization".to_string(),
|
||||
None => "0.7.39_launch_surface_origin_baseline".to_string(),
|
||||
};
|
||||
let run_result = match profile_code.as_str() {
|
||||
"0.7.27" | "0.7.27_dexes_non_regression" => {
|
||||
@@ -1227,6 +1302,9 @@ pub(crate) async fn demo_pipeline2_validate_local_pipeline(
|
||||
"0.7.38" | "0.7.38_token_metadata_gap_prioritization" => {
|
||||
service.validate_v0_7_38_current_database().await
|
||||
},
|
||||
"0.7.39" | "0.7.39_launch_surface_origin_baseline" => {
|
||||
service.validate_v0_7_39_current_database().await
|
||||
},
|
||||
other => Err(kb_lib::Error::InvalidState(format!(
|
||||
"unsupported local pipeline validation profile: {other}"
|
||||
))),
|
||||
@@ -1777,6 +1855,14 @@ fn demo_pipeline2_map_local_diagnostics_summary(
|
||||
multi_trade_signature_pair_samples
|
||||
.push(demo_pipeline2_map_multi_trade_signature_pair_sample(sample));
|
||||
}
|
||||
let mut launch_origin_samples = std::vec::Vec::new();
|
||||
for sample in summary.launch_origin_samples {
|
||||
launch_origin_samples.push(demo_pipeline2_map_launch_origin_sample(sample));
|
||||
}
|
||||
let mut pool_origin_samples = std::vec::Vec::new();
|
||||
for sample in summary.pool_origin_samples {
|
||||
pool_origin_samples.push(demo_pipeline2_map_pool_origin_sample(sample));
|
||||
}
|
||||
let mut token_metadata_gap_samples = std::vec::Vec::new();
|
||||
for sample in summary.token_metadata_gap_samples {
|
||||
token_metadata_gap_samples.push(demo_pipeline2_map_token_metadata_gap_sample(sample));
|
||||
@@ -1853,6 +1939,8 @@ fn demo_pipeline2_map_local_diagnostics_summary(
|
||||
decoded_event_summaries,
|
||||
event_classification_summaries,
|
||||
missing_trade_event_reason_summaries,
|
||||
launch_origin_samples,
|
||||
pool_origin_samples,
|
||||
token_metadata_gap_samples,
|
||||
non_actionable_pair_count: summary.non_actionable_pair_count,
|
||||
non_actionable_pair_summaries,
|
||||
@@ -2052,6 +2140,42 @@ fn demo_pipeline2_map_multi_trade_signature_pair_sample(
|
||||
};
|
||||
}
|
||||
|
||||
fn demo_pipeline2_map_launch_origin_sample(
|
||||
sample: kb_lib::LocalLaunchOriginDiagnosticSampleDto,
|
||||
) -> DemoPipeline2LocalLaunchOriginDiagnosticSample {
|
||||
return DemoPipeline2LocalLaunchOriginDiagnosticSample {
|
||||
launch_attribution_id: sample.launch_attribution_id,
|
||||
launch_surface_code: sample.launch_surface_code,
|
||||
launch_surface_name: sample.launch_surface_name,
|
||||
transaction_signature: sample.transaction_signature,
|
||||
decoded_event_id: sample.decoded_event_id,
|
||||
protocol_name: sample.protocol_name,
|
||||
match_kind: sample.match_kind,
|
||||
matched_value: sample.matched_value,
|
||||
pool_id: sample.pool_id,
|
||||
pool_address: sample.pool_address,
|
||||
pair_id: sample.pair_id,
|
||||
pair_symbol: sample.pair_symbol,
|
||||
};
|
||||
}
|
||||
|
||||
fn demo_pipeline2_map_pool_origin_sample(
|
||||
sample: kb_lib::LocalPoolOriginDiagnosticSampleDto,
|
||||
) -> DemoPipeline2LocalPoolOriginDiagnosticSample {
|
||||
return DemoPipeline2LocalPoolOriginDiagnosticSample {
|
||||
pool_origin_id: sample.pool_origin_id,
|
||||
dex_code: sample.dex_code,
|
||||
pool_id: sample.pool_id,
|
||||
pool_address: sample.pool_address,
|
||||
pair_id: sample.pair_id,
|
||||
pair_symbol: sample.pair_symbol,
|
||||
launch_surface_code: sample.launch_surface_code,
|
||||
founding_signature: sample.founding_signature,
|
||||
founding_protocol_name: sample.founding_protocol_name,
|
||||
founding_event_kind: sample.founding_event_kind,
|
||||
};
|
||||
}
|
||||
|
||||
fn demo_pipeline2_map_token_metadata_gap_sample(
|
||||
sample: kb_lib::LocalTokenMetadataGapDiagnosticSampleDto,
|
||||
) -> DemoPipeline2LocalTokenMetadataGapDiagnosticSample {
|
||||
|
||||
Reference in New Issue
Block a user