From ba67b6e7123f50b6a7e93fa7948673ede39f2eb8 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 16 May 2026 13:27:10 +0300 Subject: [PATCH] Report VPN pressure score in smoke --- agents/rap-node-agent/cmd/mesh-live-smoke/main.go | 7 +++++-- docs/architecture/DISTRIBUTED_FABRIC_NODE_PROTOCOL_PLAN.md | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/agents/rap-node-agent/cmd/mesh-live-smoke/main.go b/agents/rap-node-agent/cmd/mesh-live-smoke/main.go index a91d832..c8cf593 100644 --- a/agents/rap-node-agent/cmd/mesh-live-smoke/main.go +++ b/agents/rap-node-agent/cmd/mesh-live-smoke/main.go @@ -49,6 +49,7 @@ type smokeReport struct { FabricVPNBulkWindow int `json:"fabric_vpn_bulk_parallel_window"` FabricVPNInteractiveWin int `json:"fabric_vpn_interactive_parallel_window"` FabricVPNPressureLevel string `json:"fabric_vpn_pressure_level"` + FabricVPNPressureScore int `json:"fabric_vpn_pressure_score"` FabricVPNPressureReason []string `json:"fabric_vpn_pressure_reasons"` FabricVPNRouteRecovered bool `json:"fabric_vpn_route_recovered"` FabricVPNRouteSwitches uint64 `json:"fabric_vpn_route_switch_count"` @@ -159,7 +160,7 @@ func run(ctx context.Context) (smokeReport, error) { if err != nil { return smokeReport{}, fmt.Errorf("fabric vpn packet session smoke: %w", err) } - fabricVPNBulkPressure, fabricVPNBulkChannels, fabricVPNInteractiveChannels, fabricVPNBulkWindow, fabricVPNInteractiveWindow, fabricVPNPressureLevel, fabricVPNPressureReasons := smokeVPNFlowSchedulerBulkPressure() + fabricVPNBulkPressure, fabricVPNBulkChannels, fabricVPNInteractiveChannels, fabricVPNBulkWindow, fabricVPNInteractiveWindow, fabricVPNPressureLevel, fabricVPNPressureScore, fabricVPNPressureReasons := smokeVPNFlowSchedulerBulkPressure() fabricVPNRouteRecovered, fabricVPNRouteSwitches, fabricVPNRecoveryMS, fabricVPNRecoveryMaxMS, fabricVPNRecoveryAvgMS, fabricVPNRecoveryReason := smokeVPNFlowSchedulerRouteRecovery() fabricQUICAccepted, fabricQUICEndpoint, fabricQUICPressure, err := smokeQUICFabricSession(ctx) if err != nil { @@ -187,6 +188,7 @@ func run(ctx context.Context) (smokeReport, error) { FabricVPNBulkWindow: fabricVPNBulkWindow, FabricVPNInteractiveWin: fabricVPNInteractiveWindow, FabricVPNPressureLevel: fabricVPNPressureLevel, + FabricVPNPressureScore: fabricVPNPressureScore, FabricVPNPressureReason: fabricVPNPressureReasons, FabricVPNRouteRecovered: fabricVPNRouteRecovered, FabricVPNRouteSwitches: fabricVPNRouteSwitches, @@ -207,7 +209,7 @@ func run(ctx context.Context) (smokeReport, error) { }, nil } -func smokeVPNFlowSchedulerBulkPressure() (bool, int, int, int, int, string, []string) { +func smokeVPNFlowSchedulerBulkPressure() (bool, int, int, int, int, string, int, []string) { scheduler := vpnruntime.NewFabricFlowScheduler(32, 16) bulkPacket := []byte("bulk") interactivePacket := []byte("interactive-rdp-like") @@ -230,6 +232,7 @@ func smokeVPNFlowSchedulerBulkPressure() (bool, int, int, int, int, string, []st snapshot.RecommendedParallelWindows[vpnruntime.FabricTrafficClassBulk], snapshot.RecommendedParallelWindows[vpnruntime.FabricTrafficClassInteractive], snapshot.PressureLevel, + snapshot.PressureScore, snapshot.PressureReasons } diff --git a/docs/architecture/DISTRIBUTED_FABRIC_NODE_PROTOCOL_PLAN.md b/docs/architecture/DISTRIBUTED_FABRIC_NODE_PROTOCOL_PLAN.md index 5cef969..1c51a6a 100644 --- a/docs/architecture/DISTRIBUTED_FABRIC_NODE_PROTOCOL_PLAN.md +++ b/docs/architecture/DISTRIBUTED_FABRIC_NODE_PROTOCOL_PLAN.md @@ -467,7 +467,8 @@ route failures, route recovery, slow channels, bulk pressure, and adaptive backpressure. The same pressure classification includes a bounded 0-100 score for automated route, endpoint, and node comparisons. -`mesh-live-smoke` reports the mixed-load scheduler pressure level and reasons. +`mesh-live-smoke` reports the mixed-load scheduler pressure level, score, and +reasons. Endpoint ranking treats `capacity_limited` observations as a soft pressure penalty instead of a hard recent failure, enabling load spreading without marking the carrier unhealthy.