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;
}