v0.3.14-pre.006
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/release_completeness.rs
|
||||
// version: 24
|
||||
// version: 25
|
||||
|
||||
//! Release-completeness canaries through the `v0.3.14-pre.005` redundant-coverage proof tranche.
|
||||
//! Release-completeness canaries through the `v0.3.14-pre.006` bounded HTTP continuity-discovery tranche.
|
||||
|
||||
#[test]
|
||||
fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
|
||||
@@ -282,3 +282,23 @@ fn v0_3_14_pre_005_redundant_coverage_canaries_are_present_without_public_surfac
|
||||
assert!(!root.contains("pub use self::continuity::RawTransactionIngestCoverageRelation"));
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_14_pre_006_bounded_http_discovery_canaries_are_present_without_backfill_or_public_surface_growth() {
|
||||
let hardening = include_str!("hardening.rs");
|
||||
let resource_tests = include_str!("../unit_tests/runtime_resources.rs");
|
||||
let root = include_str!("../src/lib.rs");
|
||||
for required in [
|
||||
"v0_3_14_pre_006_http_scan_capabilities_prefer_closed_range_and_require_safe_fallback",
|
||||
"v0_3_14_pre_006_http_scan_capability_detection_is_role_local_and_io_free",
|
||||
"v0_3_14_pre_006_http_discovery_window_is_inclusive_bounded_and_overflow_safe",
|
||||
"v0_3_14_pre_006_closed_range_discovery_proves_skipped_slots_only_inside_exact_window",
|
||||
"v0_3_14_pre_006_with_limit_discovery_never_uses_tip_alone_as_tail_coverage_proof",
|
||||
] {
|
||||
assert!(resource_tests.contains(required), "required pre.006 HTTP discovery canary missing: {required}");
|
||||
}
|
||||
assert!(hardening.contains("v0_3_14_pre_006_http_discovery_is_bounded_prefers_closed_range_and_never_uses_tip_alone_as_coverage"));
|
||||
assert!(!root.contains("pub use self::runtime_resources::RawTransactionIngestHttpDiscovery"));
|
||||
assert!(!root.contains("backfill"));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user