0.3.15-pre.012-fix.001

This commit is contained in:
2026-09-16 17:02:28 +02:00
parent 1c28f3155f
commit 888ce3f35f
5 changed files with 155 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_contract.rs
// version: 11
// version: 12
//! Desktop scaffold contract canaries for Raw Transaction Ingest Desk.
@@ -308,3 +308,42 @@ fn pre_012_window_shutdown_and_start_stop_races_are_bounded_backend_owned() {
assert!(!app_state.contains("std::mem::drop(generation)"));
assert!(app_state.contains("self.route_runtime.ensure_start_admission_open()"));
}
#[test]
fn pre_012_fix_002_terminal_fault_logging_keeps_safe_route_identity_and_worker_cause_counters() {
let runtime = read_text(app_root().join("src/route_runtime.rs").as_path());
let start = runtime.find("pub(crate) async fn monitor(self)");
let start = match start {
std::option::Option::Some(value) => value,
std::option::Option::None => {
assert!(false, "missing RouteRuntimeLaunch::monitor");
return;
},
};
let remainder = &runtime[start..];
let end = remainder.find("/// Starts one exact route Worker");
let end = match end {
std::option::Option::Some(value) => value,
std::option::Option::None => {
assert!(false, "missing route runtime monitor end marker");
return;
},
};
let monitor = &remainder[..end];
for required in [
"worker_health = worker.health().code()",
"fault_domain = snapshot_fault_domain",
"fault_code = snapshot_fault_code",
"source_failure_total = snapshot.source_failure_total()",
"store_failure_total = snapshot.store_failure_total()",
"content_conflict_total = snapshot.content_conflict_total()",
"open_gap_count = snapshot.open_gap_count()",
"future_target_coverage = snapshot.future_target_coverage()",
"failed_source_losses_reconciled = snapshot.failed_source_losses_reconciled()",
] {
assert!(monitor.contains(required), "missing pre.012-fix.002 terminal diagnostic marker {required}");
}
for forbidden in ["endpoint_url", "connection_uri", "api_key", "source_key", "worker_id", "signature", "canonical_bytes", "wire_bytes"] {
assert!(!monitor.contains(forbidden), "terminal diagnostic surface exposes forbidden marker {forbidden}");
}
}