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-app-demo-desktop/src/demo_decode_replay.rs
// version: 32
// version: 33
//! Tauri commands and UI payloads for contextual instruction decode replay.
@@ -600,7 +600,7 @@ pub(crate) fn coverage_payload(
pub(crate) fn annotation_payload(
row: kb_store::MaterializedEventQueryRow,
) -> std::result::Result<crate::DemoTransactionAnnotationRow, std::string::String> {
if row.processor_name != "transaction_annotations"
if row.processor_name != "materializer.transaction.annotations"
|| row.materialized_family != "transaction_annotation"
{
return std::result::Result::Err(
@@ -720,9 +720,9 @@ mod tests {
program_id: kb_lib::MdProgramId(
kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID.to_string(),
),
protocol_code: kb_lib::MdProtocolCode("spl_associated_token_account".to_string()),
surface_code: kb_lib::MdSurfaceCode("spl_associated_token_account".to_string()),
event_code: kb_lib::MdEventCode(format!("spl_associated_token_account.{entry}")),
protocol_code: kb_lib::MdProtocolCode("spl.associated_token_account".to_string()),
surface_code: kb_lib::MdSurfaceCode("spl.associated_token_account".to_string()),
event_code: kb_lib::MdEventCode(format!("spl.associated_token_account.{entry}")),
event_name: kb_lib::MdEventName(entry.to_string()),
event_family: kb_lib::MdEventFamily::Lifecycle,
source_kind: kb_lib::MdEventSourceKind::Instruction,
@@ -750,13 +750,13 @@ mod tests {
.collect::<std::vec::Vec<_>>();
names.sort();
let mut expected_names = std::vec![
"metadata_metaplex_token_metadata".to_string(),
"solana_native_classifier".to_string(),
"spl_associated_token_account".to_string(),
"spl_elgamal_registry".to_string(),
"spl_memo".to_string(),
"spl_token".to_string(),
"spl_token_2022".to_string(),
"metadata.metaplex_token_metadata".to_string(),
"solana.core".to_string(),
"spl.associated_token_account".to_string(),
"spl.elgamal_registry".to_string(),
"spl.memo".to_string(),
"spl.token".to_string(),
"spl.token_2022".to_string(),
];
expected_names.sort();
assert_eq!(names, expected_names);
@@ -773,14 +773,14 @@ mod tests {
assert_eq!(
names,
std::vec![
"solana_native_admin".to_string(),
"solana_native_compliance_audit".to_string(),
"fees".to_string(),
"solana_native_lifecycle".to_string(),
"solana_native_staking".to_string(),
"spl_token_accounts".to_string(),
"spl_token_risk".to_string(),
"transaction_annotations".to_string(),
"materializer.admin".to_string(),
"materializer.compliance.audit".to_string(),
"materializer.fees".to_string(),
"materializer.lifecycle".to_string(),
"materializer.staking".to_string(),
"materializer.token.accounts".to_string(),
"materializer.risk".to_string(),
"materializer.transaction.annotations".to_string(),
]
);
}
@@ -788,10 +788,13 @@ mod tests {
#[test]
fn ata_materializer_ownership_is_exact_in_the_runtime_registry() {
for (entry, expected) in [
("create", std::vec!["spl_token_accounts".to_string()]),
("create", std::vec!["materializer.token.accounts".to_string()]),
(
"recover_nested",
std::vec!["spl_token_accounts".to_string(), "spl_token_risk".to_string(),],
std::vec![
"materializer.token.accounts".to_string(),
"materializer.risk".to_string(),
],
),
] {
let observation = ata_observation(entry);
@@ -821,7 +824,7 @@ mod tests {
program_id: std::option::Option::None,
instruction_state: "actionable".to_string(),
instruction_paths_text: std::option::Option::None,
decoder_names: std::vec!["solana_native_classifier".to_string()],
decoder_names: std::vec!["solana.core".to_string()],
limit: 10,
max_concurrent_inputs: 2,
all_compatible: false,
@@ -918,12 +921,12 @@ mod tests {
#[test]
fn committed_annotation_row_is_mapped_to_ui_safe_contract() {
let row = kb_store::MaterializedEventQueryRow {
processor_name: "transaction_annotations".to_string(),
processor_name: "materializer.transaction.annotations".to_string(),
processor_version: "0.4.3".to_string(),
input_key: "input".to_string(),
output_key: "output".to_string(),
source_event_key: "memo:0".to_string(),
source_decoder_name: "spl_memo".to_string(),
source_decoder_name: "spl.memo".to_string(),
source_decoder_version: "0.4.3".to_string(),
signature: "signature".to_string(),
slot: u64::MAX,
@@ -954,12 +957,12 @@ mod tests {
#[test]
fn malformed_annotation_payload_fails_closed() {
let row = kb_store::MaterializedEventQueryRow {
processor_name: "transaction_annotations".to_string(),
processor_name: "materializer.transaction.annotations".to_string(),
processor_version: "0.4.3".to_string(),
input_key: "input".to_string(),
output_key: "output".to_string(),
source_event_key: "memo:0".to_string(),
source_decoder_name: "spl_memo".to_string(),
source_decoder_name: "spl.memo".to_string(),
source_decoder_version: "0.4.3".to_string(),
signature: "signature".to_string(),
slot: 1,