@@ -553,7 +553,7 @@ impl AhpHookExecutor {
553553 context: heartbeat_executor. build_context( ) ,
554554 metadata: None ,
555555 } ;
556- if let Err ( e) = heartbeat_executor. client. send_event_full_value ( & event) . await {
556+ if let Err ( e) = heartbeat_executor. client. send_event_full ( & event) . await {
557557 warn!( "Heartbeat failed: {}" , e) ;
558558 }
559559 }
@@ -586,29 +586,16 @@ impl AhpHookExecutor {
586586 metadata: None ,
587587 } ;
588588 // Wait for idle decision (blocking)
589- match idle_executor. client. send_event_full_value( & event) . await {
590- Ok ( decision_payload) => {
591- debug!( "Idle decision: {:?}" , decision_payload) ;
592- // Try to parse as IdleDecision first, then fall back to generic Decision
593- if let Ok ( idle_decision) = serde_json:: from_value:: <a3s_ahp:: IdleDecision >( decision_payload. clone( ) ) {
594- match idle_decision {
595- a3s_ahp:: IdleDecision :: Defer { .. } => {
596- // Increase threshold temporarily
597- }
598- _ => {
599- // Reset idle detection
600- idle_executor. update_activity( ) ;
601- }
589+ match idle_executor. client. send_event_full( & event) . await {
590+ Ok ( decision) => {
591+ debug!( "Idle decision: {:?}" , decision) ;
592+ match decision {
593+ a3s_ahp:: Decision :: Defer { .. } => {
594+ // Increase threshold temporarily
602595 }
603- } else if let Ok ( decision) = serde_json:: from_value:: <a3s_ahp:: Decision >( decision_payload) {
604- match decision {
605- a3s_ahp:: Decision :: Defer { .. } => {
606- // Increase threshold temporarily
607- }
608- _ => {
609- // Reset idle detection
610- idle_executor. update_activity( ) ;
611- }
596+ _ => {
597+ // Reset idle detection
598+ idle_executor. update_activity( ) ;
612599 }
613600 }
614601 }
@@ -1179,8 +1166,9 @@ impl HookExecutor for AhpHookExecutor {
11791166 }
11801167
11811168 // Send event and wait for decision
1182- match self . client . send_event_full_value ( & ahp_event) . await {
1183- Ok ( decision_payload) => {
1169+ match self . client . send_event_full ( & ahp_event) . await {
1170+ Ok ( decision) => {
1171+ let decision_payload = serde_json:: to_value ( decision) . unwrap_or_default ( ) ;
11841172 debug ! (
11851173 "AHP decision for {:?}: {:?}" ,
11861174 ahp_event. event_type, decision_payload
@@ -1201,7 +1189,7 @@ impl HookExecutor for AhpHookExecutor {
12011189 let client = self . client . clone ( ) ;
12021190 let event = ahp_event;
12031191 tokio:: spawn ( async move {
1204- if let Err ( e) = client. send_event_full_value ( & event) . await {
1192+ if let Err ( e) = client. send_event_full ( & event) . await {
12051193 warn ! ( "AHP fire-and-forget error: {}" , e) ;
12061194 }
12071195 } ) ;
0 commit comments