v0.3.14-pre.006

This commit is contained in:
2026-09-11 23:48:53 +02:00
parent a3df8f6ef5
commit ae712eae64
8 changed files with 722 additions and 58 deletions

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
// version: 29
// version: 30
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.005`.
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.006`.
fn network(value: &'static str) -> std::option::Option<ksp_store_lib::RawNetworkId> {
let result = ksp_store_lib::RawNetworkId::new(value);
@@ -1090,3 +1090,29 @@ fn v0_3_14_pre_005_redundant_coverage_requires_exact_or_superset_proof_over_full
}
return;
}
#[test]
fn v0_3_14_pre_006_http_discovery_is_bounded_prefers_closed_range_and_never_uses_tip_alone_as_coverage() {
let resources = include_str!("../src/runtime_resources.rs");
let root = include_str!("../src/lib.rs");
for required in [
"RawTransactionIngestHttpDiscoveryStrategy",
"RawTransactionIngestHttpDiscoveryWindow",
"RawTransactionIngestHttpScanCapabilities",
"ClosedRange",
"WithLimitBoundary",
"MAX_RAW_TRANSACTION_INGEST_CONTINUITY_DISCOVERY_WINDOW_SLOTS",
"pool.get_blocks(role, start_slot, std::option::Option::Some(end_slot)",
"pool.get_blocks_with_limit(role, start_slot, slot_count",
"self.http_pool.get_block_observed",
"discovered.last().copied().map(|slot| return slot.min(end_slot))",
] {
assert!(resources.contains(required), "required pre.006 bounded HTTP discovery guard missing: {required}");
}
assert!(resources.contains("http_role_scan_capabilities"));
assert!(resources.contains("http_role_supports_repair_scan"));
assert!(!resources.contains("ksp_job_backfill_lib::"));
assert!(!resources.contains("get_blocks_with_limit(role, start_slot, u64::MAX"));
assert!(!root.contains("repair"), "pre.006 leaked lower-case repair responsibility through crate root");
return;
}