v0.3.14-pre.009

This commit is contained in:
2026-09-12 11:22:53 +02:00
parent bf394e0e4b
commit 4bcd942928
10 changed files with 853 additions and 58 deletions

View File

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

View File

@@ -1,7 +1,7 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/release_completeness.rs
// version: 27
// version: 28
//! Release-completeness canaries through the `v0.3.14-pre.008` continuity reconciliation tranche.
//! Release-completeness canaries through the `v0.3.14-pre.009` multi-source health-policy tranche.
#[test]
fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
@@ -343,3 +343,27 @@ fn v0_3_14_pre_008_reconciliation_canaries_are_present_without_public_surface_or
assert!(!root.contains("pub use self::continuity::RawTransactionIngestSourceLossDecision"));
return;
}
#[test]
fn v0_3_14_pre_009_health_policy_canaries_are_present_without_public_source_identity_growth() {
let continuity_tests = include_str!("../unit_tests/continuity.rs");
let hardening = include_str!("hardening.rs");
let resource_tests = include_str!("../unit_tests/runtime_resources.rs");
let snapshot_tests = include_str!("../unit_tests/snapshot.rs");
let root = include_str!("../src/lib.rs");
for required in [
"pre_009_health_projection_distinguishes_future_coverage_from_open_gap_reconciliation",
"pre_009_health_projection_rejects_duplicate_and_unknown_active_sources",
"v0_3_14_pre_009_inventory_health_projection_tracks_reconciled_coverage",
"v0_3_14_pre_009_health_requires_present_and_future_coverage_before_healthy",
] {
assert!(
continuity_tests.contains(required) || resource_tests.contains(required) || snapshot_tests.contains(required),
"required pre.009 health canary missing: {required}"
);
}
assert!(hardening.contains("v0_3_14_pre_009_health_policy_is_present_future_coverage_gated_and_source_neutral"));
assert!(!root.contains("SourceHealthByKey"));
assert!(!root.contains("pub use self::continuity::RawTransactionIngestTargetCoverage"));
return;
}