v0.1.0-pre.062

This commit is contained in:
2026-07-30 10:27:06 +02:00
parent f40fb78817
commit 460671e19d
319 changed files with 392513 additions and 9507 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-pipeline-demo-scenarios/src/solana_memo_execution.rs
// version: 3
// version: 5
//! Devnet SPL Memo v4 execution with canonical post-validation.
@@ -458,7 +458,7 @@ where
diagnostic.decode_replayed = decode_completed(&first_replay);
summary.decode_replay = std::option::Option::Some(first_replay);
let filter = match kb_store::MaterializedEventFilter::new(
std::option::Option::Some("transaction_annotations".to_string()),
std::option::Option::Some("materializer.transaction.annotations".to_string()),
std::option::Option::Some("transaction_annotation".to_string()),
std::option::Option::Some(signature.0.clone()),
8,
@@ -753,18 +753,16 @@ fn decode_completed(summary: &kb_pipeline::DecodeReplaySummary) -> bool {
#[cfg(test)]
mod tests {
fn local_devnet_profile() -> kb_config::ProfileConfig {
fn example_devnet_profile() -> kb_config::ProfileConfig {
let config =
match kb_config::parse_config_json(include_str!("../../config/example.config.json")) {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => panic!("example config parse failed: {error}"),
};
for profile in config.profiles {
if profile.name == "local_devnet" {
return profile;
}
}
panic!("local_devnet profile missing");
return match crate::resolve_demo_devnet_profile(&config, std::option::Option::None) {
std::result::Result::Ok(profile) => profile,
std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"),
};
}
#[test]
@@ -779,7 +777,7 @@ mod tests {
#[test]
fn exact_v4_plan_has_zero_spend_and_wallet_signer() {
let profile = local_devnet_profile();
let profile = example_devnet_profile();
let fee_payer = kb_lib::MdPubkey(kb_program_ids::SYSTEM_PROGRAM_ID.to_string());
let mut request = crate::DevnetMemoExecutionRequest::new("memo-3", "hello");
request.submit = true;
@@ -800,7 +798,7 @@ mod tests {
#[test]
fn submission_requires_profile_enablement_and_confirmation() {
let profile = local_devnet_profile();
let profile = example_devnet_profile();
let mut request = crate::DevnetMemoExecutionRequest::new("memo-4", "hello");
assert!(super::validate_profile(&profile, &request).is_ok());
request.submit = true;
@@ -822,7 +820,7 @@ mod tests {
panic!("KB_POSTGRES_TEST_URL is required: {error}");
},
};
let mut profile = local_devnet_profile();
let mut profile = example_devnet_profile();
profile.database.backend = "postgres".to_string();
profile.database.postgres.url = database_url;
if let std::result::Result::Ok(directory) = std::env::var("KB_DEVNET_WALLET_DIR") {