v0.3.14-pre.002

This commit is contained in:
2026-09-11 19:58:32 +02:00
parent 2ca56dbaf4
commit b2068e9ef2
8 changed files with 1194 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
// version: 24
// version: 25
//! External public, security, redaction and release-boundary hardening canaries through `pre.012`.
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.002`.
fn network(value: &'static str) -> std::option::Option<ksp_store_lib::RawNetworkId> {
let result = ksp_store_lib::RawNetworkId::new(value);
@@ -957,3 +957,57 @@ fn v0_3_13_pre_012_cross_layer_security_closure_is_complete_and_source_neutral()
}
return;
}
#[test]
fn v0_3_14_pre_002_continuity_contracts_are_private_bounded_and_io_free() {
let continuity = include_str!("../src/continuity.rs");
let resources = include_str!("../src/runtime_resources.rs");
let root = include_str!("../src/lib.rs");
for required in [
"MAX_RAW_TRANSACTION_INGEST_OPEN_REPAIR_GAPS",
"MAX_RAW_TRANSACTION_INGEST_REPAIR_ACTIVE_GAPS",
"MAX_RAW_TRANSACTION_INGEST_REPAIR_BLOCK_FETCH_IN_FLIGHT",
"MAX_RAW_TRANSACTION_INGEST_REPAIR_DISCOVERY_WINDOW_SLOTS",
"MAX_RAW_TRANSACTION_INGEST_REPAIR_RANGE_SLOTS",
"FullLedgerTransactions",
"ExactSourceScope",
"KnownReferences",
"RawTransactionIngestGapLedger",
"RawTransactionIngestTargetCoverage",
"RawTransactionIngestRepairCapabilityDescriptor",
"RawTransactionIngestContinuityContracts",
"continuity.known_references_not_target_scope",
"continuity.coalescible_gap_ranges",
] {
assert!(continuity.contains(required), "required pre.002 continuity contract missing: {required}");
}
for required in [
"repair_capability_descriptor",
"yellowstone_coverage_scope_fingerprint",
"http_role_supports_repair_scan",
"RawTransactionIngestContinuityContracts::new",
"validate_for_source_count",
] {
assert!(resources.contains(required), "required pre.002 runtime-resource capability wiring missing: {required}");
}
for forbidden in [
"get_block_observed",
"get_transaction_observed",
"get_blocks_with_limit",
"get_blocks(",
"open_standard_subscribe",
"SolanaStandardWsSession::connect",
"HeliusLaserStreamWsSession::connect",
"ksp_config_lib::",
"ksp_job_backfill_lib::",
"ksp_store_postgres_lib::",
"reqwest::",
"tonic::",
"yellowstone_grpc_proto::",
] {
assert!(!continuity.contains(forbidden), "pre.002 continuity contract performed or imported forbidden I/O/boundary: {forbidden}");
}
assert!(!root.contains("pub use self::continuity::"));
assert!(root.contains("pub(crate) use self::continuity::RawTransactionIngestContinuityContracts;"));
return;
}

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/release_completeness.rs
// version: 20
// version: 21
//! Release-completeness canaries through the `pre.012` cross-layer completeness/security tranche.
//! Release-completeness canaries through the `v0.3.14-pre.002` continuity-contract tranche.
#[test]
fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
@@ -34,7 +34,18 @@ fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
names.sort_unstable();
assert_eq!(
names,
std::vec!["admission.rs", "error.rs", "identity.rs", "lib.rs", "persistence.rs", "runtime.rs", "runtime_resources.rs", "settings.rs", "snapshot.rs",]
std::vec![
"admission.rs",
"continuity.rs",
"error.rs",
"identity.rs",
"lib.rs",
"persistence.rs",
"runtime.rs",
"runtime_resources.rs",
"settings.rs",
"snapshot.rs",
]
);
return std::result::Result::Ok(());
}
@@ -132,6 +143,7 @@ fn pre_010_external_hardening_suite_is_present_and_scoped() {
"v0_3_13_pre_009_duplicate_storm_disagreement_and_starvation_guards_are_explicit",
"v0_3_13_pre_010_multi_source_health_is_conservative_counted_and_redacted",
"v0_3_13_pre_011_shutdown_races_are_bounded_joined_atomic_and_counter_safe",
"v0_3_14_pre_002_continuity_contracts_are_private_bounded_and_io_free",
] {
assert!(hardening.contains(required), "required pre.010 hardening canary missing: {required}");
}