v0.3.15-pre.007

This commit is contained in:
2026-09-13 17:36:06 +02:00
parent 487bcbf0c1
commit 0d9ec5c490
20 changed files with 1071 additions and 109 deletions

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/release_completeness.rs
// version: 3
// version: 4
//! Release-completeness canaries for Raw Transaction Ingest Desk Config-only route inventory.
//! Release-completeness canaries for Raw Transaction Ingest Desk Start-resource reconstruction.
#![forbid(unsafe_code)]
#![deny(unreachable_pub)]
@@ -21,7 +21,7 @@ fn read_text(path: &std::path::Path) -> String {
}
#[test]
fn pre_006_production_module_inventory_adds_only_route_inventory_to_the_scaffold() {
fn pre_007_production_module_inventory_adds_only_route_start_to_pre_006_surface() {
let lib = read_text(app_root().join("src/lib.rs").as_path());
let expected = [
"mod app_state;",
@@ -33,6 +33,7 @@ fn pre_006_production_module_inventory_adds_only_route_inventory_to_the_scaffold
"mod frontend_logging;",
"mod logging_runtime;",
"mod route_inventory;",
"mod route_start;",
"mod splash;",
"mod tauri;",
"mod tw_main;",
@@ -45,46 +46,44 @@ fn pre_006_production_module_inventory_adds_only_route_inventory_to_the_scaffold
}
#[test]
fn pre_006_public_surface_still_exposes_only_application_run_entry_point() {
fn pre_007_public_surface_still_exposes_only_application_run_entry_point() {
let lib = read_text(app_root().join("src/lib.rs").as_path());
let public_reexports = lib.lines().filter(|line| return line.starts_with("pub use ")).collect::<std::vec::Vec<_>>();
assert_eq!(public_reexports, vec!["pub use self::tauri::run;"]);
}
#[test]
fn pre_006_config_inventory_keeps_start_stop_and_runtime_resources_for_later_tranches() {
let app = read_text(app_root().join("src/app_state.rs").as_path());
let tauri = read_text(app_root().join("src/tauri.rs").as_path());
for forbidden in [
"RawTransactionIngestWorker",
"RawTransactionIngestRuntimeResources",
"request_stop",
"start_with_runtime_resources",
"Store::open",
"HttpTransportPool",
"WsProtocolSession",
"YellowstoneGrpcChannel",
fn pre_007_reconstructs_all_five_worker_source_contracts_without_advancing_store_or_worker_lifecycle() {
let route_start = read_text(app_root().join("src/route_start.rs").as_path());
for required in [
"RawTransactionIngestYellowstoneSource::new",
"RawTransactionIngestStandardLogsSource::new",
"RawTransactionIngestStandardBlockSource::new",
"RawTransactionIngestHeliusTransactionSource::new",
"RawTransactionIngestHttpBlockPollingSource::new",
"SolanaLogsSubscribeFilter::AllWithVotes",
"SolanaBlockSubscribeFilter::All",
"YellowstoneSubscribeTransactionFilter::new",
] {
assert!(!app.contains(forbidden));
assert!(!tauri.contains(forbidden));
assert!(route_start.contains(required), "missing pre.007 exact Worker resource marker {required}");
}
for forbidden in ["Store::open", "start_with_runtime_resources", "request_stop", "RawTransactionIngestRuntimeResources::new"] {
assert!(!route_start.contains(forbidden), "pre.007 advanced premature lifecycle marker {forbidden}");
}
}
#[test]
fn pre_006_inventory_source_is_config_only_and_contains_all_five_capability_requirements() {
let inventory = read_text(app_root().join("src/route_inventory.rs").as_path());
fn pre_007_start_revalidation_reuses_inventory_and_requires_profile_network_identity() {
let route_start = read_text(app_root().join("src/route_start.rs").as_path());
for required in [
"WsSubscriptionKind::Logs",
"WsSubscriptionKind::Block",
"WsSubscriptionKind::HeliusTransaction",
"getTransaction",
"getBlocksWithLimit",
"MissingYellowstoneGrpc",
"MissingRequiredSecret",
"current_generation == 0",
"request.inventory_generation != current_generation",
"build_route_inventory_with_environment",
"request.profile_id",
"resolve_store_config_profile",
"store.settings().network().as_str() != network",
"transport_matches_network",
] {
assert!(inventory.contains(required), "missing pre.006 inventory requirement {required}");
}
for forbidden in ["connect(", "Store::open", "start_with_runtime_resources", "request_stop"] {
assert!(!inventory.contains(forbidden), "pre.006 inventory performs premature runtime operation {forbidden}");
assert!(route_start.contains(required), "missing pre.007 revalidation marker {required}");
}
}