v0.3.14-pre.011

This commit is contained in:
2026-09-12 19:05:43 +02:00
parent c99cb048bf
commit 4e39ddd5d0
13 changed files with 1174 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
// version: 34
// version: 35
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.010`.
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.011`.
fn network(value: &'static str) -> std::option::Option<ksp_store_lib::RawNetworkId> {
let result = ksp_store_lib::RawNetworkId::new(value);
@@ -1263,3 +1263,53 @@ fn v0_3_14_pre_010_repair_fairness_shares_existing_bounds_without_second_pipelin
assert!(!root.contains("RawTransactionIngestFairTurnGate"));
return;
}
#[test]
fn v0_3_14_pre_011_gap_observability_is_bounded_checked_and_redacted() {
let continuity = include_str!("../src/continuity.rs");
let snapshot = include_str!("../src/snapshot.rs");
let root = include_str!("../src/lib.rs");
for required in [
"pub struct RawTransactionIngestGapId",
"pub enum RawTransactionIngestGapState",
"pub enum RawTransactionIngestGapReason",
"pub enum RawTransactionIngestRepairMethod",
"pub struct RawTransactionIngestGapSnapshot",
"open_gap_count",
"repairing_gap_count",
"repaired_gap_total",
"unresolved_gap_total",
"replay_repair_total",
"redundant_coverage_repair_total",
"http_scan_repair_total",
"repair_block_fetch_total",
"repair_transaction_hydration_total",
"oldest_open_gap_start_slot",
] {
assert!(snapshot.contains(required), "required pre.011 snapshot observability guard missing: {required}");
}
for required in [
"MAX_RAW_TRANSACTION_INGEST_OPEN_REPAIR_GAPS: usize = 64",
"std::vec::Vec::with_capacity(MAX_RAW_TRANSACTION_INGEST_OPEN_REPAIR_GAPS)",
"gaps.len() == MAX_RAW_TRANSACTION_INGEST_OPEN_REPAIR_GAPS",
"counter_exhausted_error(\"continuity.repaired_gap_total\")",
"counter_exhausted_error(\"continuity.unresolved_gap_total\")",
"gap.last_method = std::option::Option::Some(crate::RawTransactionIngestRepairMethod::RedundantCoverage)",
] {
assert!(continuity.contains(required), "required pre.011 bounded/checked continuity guard missing: {required}");
}
for required in [
"RawTransactionIngestGapId",
"RawTransactionIngestGapReason",
"RawTransactionIngestGapSnapshot",
"RawTransactionIngestGapState",
"RawTransactionIngestRepairMethod",
] {
assert!(root.contains(required), "required pre.011 public source-neutral type missing: {required}");
}
for forbidden in ["source_key:", "endpoint_url:", "signature:", "payload:", "provider_error:"] {
assert!(!snapshot.contains(forbidden), "pre.011 snapshot leaked sensitive/source-specific field: {forbidden}");
}
assert!(!root.contains("source_key"));
return;
}

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/public_api.rs
// version: 22
// version: 23
//! External public-surface proofs for the RAW transaction ingest Worker foundation.
@@ -428,3 +428,54 @@ fn v0_3_13_pre_012_completeness_closure_adds_no_public_implementation_surface()
assert!(cross_layer.contains("v0_3_13_pre_012_legacy_v0_v1_is_proven_from_transport_through_worker_common_raw_to_store"));
return;
}
#[test]
fn v0_3_14_pre_011_gap_observability_is_public_bounded_and_source_neutral() {
let _gap_id_value: fn(ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapId) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapId::value;
let _gap_id: fn(
&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot,
) -> ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapId = ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot::gap_id;
let _start_slot: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot::start_slot;
let _end_slot: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot::end_slot;
let _state: fn(
&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot,
) -> ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapState = ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot::state;
let _reason: fn(
&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot,
) -> ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapReason = ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot::reason;
let _last_method: fn(
&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot,
) -> std::option::Option<ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRepairMethod> =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot::last_method;
let _gaps: fn(
&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot,
) -> &[ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestGapSnapshot] = ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::gaps;
let _open_gap_count: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> usize =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::open_gap_count;
let _repairing_gap_count: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> usize =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::repairing_gap_count;
let _repaired_gap_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::repaired_gap_total;
let _unresolved_gap_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::unresolved_gap_total;
let _replay_repair_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::replay_repair_total;
let _redundant_coverage_repair_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::redundant_coverage_repair_total;
let _http_scan_repair_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::http_scan_repair_total;
let _repair_block_fetch_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::repair_block_fetch_total;
let _repair_transaction_hydration_total: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> u64 =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::repair_transaction_hydration_total;
let _oldest_open_gap_start_slot: fn(&ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot) -> std::option::Option<u64> =
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSnapshot::oldest_open_gap_start_slot;
let root = include_str!("../src/lib.rs");
for forbidden in ["SourceGapByKey", "provider_gap", "endpoint_gap", "signature_gap", "payload_gap", "source_key"] {
assert!(!root.contains(forbidden), "pre.011 public root leaked source-specific gap material: {forbidden}");
}
return;
}

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/release_completeness.rs
// version: 29
// version: 30
//! Release-completeness canaries through the `v0.3.14-pre.010` repair backpressure/fairness tranche.
//! Release-completeness canaries through the `v0.3.14-pre.011` gap observability tranche.
#[test]
fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
@@ -51,7 +51,7 @@ fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
}
#[test]
fn pre_010_public_root_export_inventory_is_exact() {
fn v0_3_14_pre_011_public_root_export_inventory_is_exact() {
let root = include_str!("../src/lib.rs");
let mut exports = std::vec::Vec::new();
for line in root.lines() {
@@ -94,9 +94,14 @@ fn pre_010_public_root_export_inventory_is_exact() {
"MIN_RAW_TRANSACTION_INGEST_PERSISTENCE_CONCURRENCY",
"MIN_RAW_TRANSACTION_INGEST_SHUTDOWN_DRAIN_TIMEOUT",
"RAW_TRANSACTION_INGEST_WORKER_KIND_CODE",
"RawTransactionIngestGapId",
"RawTransactionIngestGapReason",
"RawTransactionIngestGapSnapshot",
"RawTransactionIngestGapState",
"RawTransactionIngestHandle",
"RawTransactionIngestHeliusTransactionSource",
"RawTransactionIngestHttpBlockPollingSource",
"RawTransactionIngestRepairMethod",
"RawTransactionIngestRuntimeResources",
"RawTransactionIngestSettings",
"RawTransactionIngestSnapshot",
@@ -386,3 +391,34 @@ fn v0_3_14_pre_010_repair_fairness_canaries_are_present_without_public_or_pipeli
assert!(!root.contains("RawTransactionIngestFairTurnGate"));
return;
}
#[test]
fn v0_3_14_pre_011_gap_observability_canaries_are_present_without_source_identity_growth() {
let continuity_tests = include_str!("../unit_tests/continuity.rs");
let hardening = include_str!("hardening.rs");
let public_api = include_str!("public_api.rs");
let snapshot_tests = include_str!("../unit_tests/snapshot.rs");
let root = include_str!("../src/lib.rs");
for required in [
"pre_011_gap_observability_projects_open_and_recent_repaired_entries",
"v0_3_14_pre_011_snapshot_carries_checked_gap_observability",
"v0_3_14_pre_011_gap_observability_is_public_bounded_and_source_neutral",
] {
assert!(
continuity_tests.contains(required) || snapshot_tests.contains(required) || public_api.contains(required),
"required pre.011 observability canary missing: {required}"
);
}
assert!(hardening.contains("v0_3_14_pre_011_gap_observability_is_bounded_checked_and_redacted"));
for required in [
"RawTransactionIngestGapId",
"RawTransactionIngestGapReason",
"RawTransactionIngestGapSnapshot",
"RawTransactionIngestGapState",
"RawTransactionIngestRepairMethod",
] {
assert!(root.contains(required), "required pre.011 public type missing: {required}");
}
assert!(!root.contains("source_key"));
return;
}