v0.3.14-pre.009
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
|
||||
// version: 32
|
||||
// version: 33
|
||||
|
||||
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.008`.
|
||||
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.009`.
|
||||
|
||||
fn network(value: &'static str) -> std::option::Option<ksp_store_lib::RawNetworkId> {
|
||||
let result = ksp_store_lib::RawNetworkId::new(value);
|
||||
@@ -1185,3 +1185,52 @@ fn v0_3_14_pre_008_reconciliation_and_source_loss_are_target_coverage_gated_with
|
||||
assert!(!root.contains("repair"), "pre.008 leaked lower-case repair responsibility through crate root");
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_14_pre_009_health_policy_is_present_future_coverage_gated_and_source_neutral() {
|
||||
let continuity = include_str!("../src/continuity.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
let snapshot = include_str!("../src/snapshot.rs");
|
||||
let root = include_str!("../src/lib.rs");
|
||||
for required in [
|
||||
"health_projection",
|
||||
"future_target_coverage",
|
||||
"continuity_frontier",
|
||||
"has_open_gaps",
|
||||
"is_covered_by_active_sources",
|
||||
"source_failures_reconciled",
|
||||
"failed_source_losses_reconciled",
|
||||
] {
|
||||
assert!(continuity.contains(required) || snapshot.contains(required), "required pre.009 coverage-health guard missing: {required}");
|
||||
}
|
||||
for required in [
|
||||
"continuity_policy_observed",
|
||||
"continuity_has_open_gaps",
|
||||
"snapshot.continuity_frontier_slot != snapshot.processing_frontier_slot",
|
||||
"!snapshot.future_target_coverage",
|
||||
"snapshot.source_reconnecting > 0",
|
||||
"snapshot.source_active == snapshot.source_total",
|
||||
"ksp_worker_api::WorkerHealth::Healthy",
|
||||
"ksp_worker_api::WorkerHealth::Degraded",
|
||||
"ksp_worker_api::WorkerHealth::Unhealthy",
|
||||
"ksp_worker_api::WorkerState::Faulted",
|
||||
] {
|
||||
assert!(snapshot.contains(required), "required pre.009 health projection guard missing: {required}");
|
||||
}
|
||||
for required in [
|
||||
"continuity_contracts",
|
||||
"contracts.health_projection",
|
||||
"inventory.active_source_keys()",
|
||||
"inventory.failed_source_keys()",
|
||||
"aggregate.with_continuity_health",
|
||||
"with_failed_source_losses_reconciled",
|
||||
] {
|
||||
assert!(resources.contains(required), "required pre.009 inventory-health bridge missing: {required}");
|
||||
}
|
||||
assert!(!root.contains("SourceHealthByKey"));
|
||||
assert!(!root.contains("provider_health"));
|
||||
assert!(!root.contains("endpoint_health"));
|
||||
assert!(!root.contains("pub use self::continuity::RawTransactionIngestTargetCoverage"));
|
||||
assert!(!snapshot.contains("WorkerHealth::Faulted"), "Faulted must remain a Worker lifecycle state rather than a new health enum variant");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user