From 932586ef33f87e84a5b34491a56576754b0476e9 Mon Sep 17 00:00:00 2001 From: Kevin Janssen Date: Tue, 17 Nov 2026 12:28:42 +0100 Subject: [PATCH] Advertise static SYSTEM qualification independent of per-connection clock warm-up to stop capability/reconnect oscillation --- crates/agent-windows/src/helper_runtime.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/agent-windows/src/helper_runtime.rs b/crates/agent-windows/src/helper_runtime.rs index 0386d04..a75169a 100644 --- a/crates/agent-windows/src/helper_runtime.rs +++ b/crates/agent-windows/src/helper_runtime.rs @@ -364,7 +364,11 @@ impl Client { }; let value = json!({"schema_version":1,"source":"actual_local_service_runtime","agent_process_id":std::process::id(),"agent_service":crate::SERVICE_NAME,"agent_id":pin.binding.agent_id,"asset_id":pin.binding.asset_id,"challenge":reply.challenge,"observed_at":chrono::Utc::now(),"helper_service":ipc::HELPER_SERVICE,"verified_helper_user_sid":pin.helper.user_sid,"verified_helper_service_sid":pin.helper.service_sid,"helper_binary_sha256":reply.helper_binary_sha256,"policy_sha256":reply.policy_sha256,"authenticated_pipe_exchange":true,"client_service_pid_verified_by_helper":true,"ledger_file_id":ledger,"executor_lock_file_id":lock,"helper_clock_qualified":clock_qualified,"helper_ready":ready,"system_capability_advertised":false,"no_jobs":true}); self.check_pin()?; - self.qualified_capabilities=crate::system_capabilities::qualified(pin,clock_qualified)?; + // Advertise the static qualification independently of this connection's + // clock warm-up: a capability change forces a reconnect, which resets the + // per-generation clock again. Every start stays gated by helper readiness. + let _ = clock_qualified; + self.qualified_capabilities=crate::system_capabilities::qualified(pin,true)?; self.probed_at=Some(std::time::Instant::now()); let mut value=value; value["system_capability_advertised"]=json!(!self.qualified_capabilities.is_empty());