v0.3.13-pre.008
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
||||
// version: 23
|
||||
// version: 24
|
||||
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -568,3 +568,39 @@ fn v0_3_12_pre_008_worker_observes_transport_reconnect_replay_and_faults_only_on
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_13_pre_008_cross_source_convergence_reuses_store_and_transport_facades_only() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
let persistence = include_str!("../src/persistence.rs");
|
||||
let runtime = include_str!("../src/runtime.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
for required in [
|
||||
"RawTransactionIngestPersistenceConvergence",
|
||||
"persist_raw_transaction_ingest_converged_acquisition",
|
||||
"RawTransactionIngestPersistencePort",
|
||||
"record_raw_transaction_observation",
|
||||
"RawTransactionObservationWrite",
|
||||
"payload().content_hash()",
|
||||
"content_conflict_error()",
|
||||
] {
|
||||
assert!(persistence.contains(required) || root.contains(required), "required pre.008 persistence convergence contract missing: {required}");
|
||||
}
|
||||
for required in [
|
||||
"RawTransactionIngestGlobalHydrationRegistry",
|
||||
"fetch_hydration_shared",
|
||||
"subscribe_or_lead",
|
||||
"get_transaction_observed",
|
||||
"settings.admission_queue_capacity()",
|
||||
] {
|
||||
assert!(resources.contains(required), "required pre.008 hydration convergence contract missing: {required}");
|
||||
}
|
||||
assert!(runtime.contains("settings.admission_queue_capacity().max(settings.persistence_concurrency())"));
|
||||
for forbidden in ["ksp_store_postgres_lib::", "reqwest::", "tonic::", "yellowstone_grpc_proto::", "ksp_job_backfill_lib::", "unbounded_channel"] {
|
||||
assert!(
|
||||
!persistence.contains(forbidden) && !runtime.contains(forbidden) && !resources.contains(forbidden),
|
||||
"pre.008 convergence crossed a dependency/boundedness boundary: {forbidden}"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
|
||||
// version: 17
|
||||
// version: 18
|
||||
|
||||
//! External public, security, redaction and release-boundary hardening canaries for `pre.010`.
|
||||
|
||||
@@ -751,3 +751,38 @@ fn v0_3_13_pre_007_multi_source_supervisor_is_fail_closed_joined_and_does_not_pu
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_13_pre_008_cross_source_convergence_is_bounded_conflict_checked_and_private() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
let persistence = include_str!("../src/persistence.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
for required in [
|
||||
"max_entries: usize",
|
||||
"entries.len() >= self.max_entries",
|
||||
"std::sync::Arc::strong_count(entry) == 1",
|
||||
"known_hash_value != content_hash",
|
||||
"record_observation(observation)",
|
||||
"persistence.additional_observation_not_recorded",
|
||||
] {
|
||||
assert!(persistence.contains(required), "required pre.008 persistence hardening guard missing: {required}");
|
||||
}
|
||||
for required in [
|
||||
"max_pending: usize",
|
||||
"pending.len() >= self.max_pending",
|
||||
"source.global_hydration_pending_saturated",
|
||||
"tokio::sync::watch::channel",
|
||||
"publish_and_remove",
|
||||
] {
|
||||
assert!(resources.contains(required), "required pre.008 hydration hardening guard missing: {required}");
|
||||
}
|
||||
for forbidden in [
|
||||
"pub struct RawTransactionIngestPersistenceConvergence",
|
||||
"pub struct RawTransactionIngestGlobalHydrationRegistry",
|
||||
"pub fn persist_raw_transaction_ingest_converged_acquisition",
|
||||
] {
|
||||
assert!(!root.contains(forbidden), "pre.008 private convergence implementation leaked publicly: {forbidden}");
|
||||
}
|
||||
assert!(!resources.contains("unbounded_channel"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/public_api.rs
|
||||
// version: 17
|
||||
// version: 18
|
||||
|
||||
//! External public-surface proofs for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -336,3 +336,18 @@ fn v0_3_13_pre_007_source_inventory_and_logical_keys_remain_private() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_13_pre_008_convergence_cache_registry_and_source_keys_remain_private() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
for forbidden in [
|
||||
"pub use self::persistence::RawTransactionIngestPersistenceConvergence",
|
||||
"pub use self::persistence::persist_raw_transaction_ingest_converged_acquisition",
|
||||
"RawTransactionIngestGlobalHydrationRegistry",
|
||||
"RawTransactionIngestHydrationKey",
|
||||
"source_key",
|
||||
] {
|
||||
assert!(!root.contains(forbidden), "pre.008 convergence implementation leaked through public crate root: {forbidden}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/release_completeness.rs
|
||||
// version: 15
|
||||
// version: 16
|
||||
|
||||
//! Release-completeness canaries through the `pre.010` public/release/security hardening tranche.
|
||||
|
||||
@@ -128,6 +128,7 @@ fn pre_010_external_hardening_suite_is_present_and_scoped() {
|
||||
"v0_3_13_pre_005_helius_transaction_redaction_full_reference_and_tier_neutrality_are_explicit",
|
||||
"v0_3_13_pre_006_http_block_polling_is_bounded_run_local_stop_preemptible_and_redacted",
|
||||
"v0_3_13_pre_007_multi_source_supervisor_is_fail_closed_joined_and_does_not_publish_source_identity",
|
||||
"v0_3_13_pre_008_cross_source_convergence_is_bounded_conflict_checked_and_private",
|
||||
] {
|
||||
assert!(hardening.contains(required), "required pre.010 hardening canary missing: {required}");
|
||||
}
|
||||
@@ -146,6 +147,7 @@ fn pre_010_external_hardening_suite_is_present_and_scoped() {
|
||||
assert!(dependency_boundary.contains("v0_3_13_pre_005_helius_transaction_source_reuses_transport_facade_and_common_hydration_only"));
|
||||
assert!(dependency_boundary.contains("v0_3_13_pre_006_http_block_polling_reuses_transport_facades_without_becoming_backfill"));
|
||||
assert!(dependency_boundary.contains("v0_3_13_pre_007_multi_source_supervisor_and_inventory_remain_private_bounded_and_source_neutral"));
|
||||
assert!(dependency_boundary.contains("v0_3_13_pre_008_cross_source_convergence_reuses_store_and_transport_facades_only"));
|
||||
let public_api = include_str!("public_api.rs");
|
||||
assert!(public_api.contains("pre_003_kind_code_and_settings_are_consumable_from_crate_root"));
|
||||
assert!(public_api.contains("pre_004_start_handle_and_terminal_future_are_consumable_without_public_join_handle"));
|
||||
@@ -157,6 +159,7 @@ fn pre_010_external_hardening_suite_is_present_and_scoped() {
|
||||
assert!(public_api.contains("v0_3_13_pre_004_standard_block_runtime_resource_surface_is_typed_and_transport_owned"));
|
||||
assert!(public_api.contains("v0_3_13_pre_006_http_block_polling_runtime_resource_surface_is_bounded_and_transport_owned"));
|
||||
assert!(public_api.contains("v0_3_13_pre_007_source_inventory_and_logical_keys_remain_private"));
|
||||
assert!(public_api.contains("v0_3_13_pre_008_convergence_cache_registry_and_source_keys_remain_private"));
|
||||
assert!(public_api.contains("v0_3_12_pre_007_processing_frontier_snapshot_getters_are_public_and_processing_only"));
|
||||
assert!(public_api.contains("pre_008_snapshot_surface_and_common_projection_are_public_and_stable"));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user