fix cluster stubs: deterministic fallback, payload forwarding, and handler guards
CI / build (pull_request) Successful in 40s

- Replace non-deterministic map range fallback with sorted node selection in PlaceActor and RebalanceShards
- Add Body field to MessagePayload to preserve message data during cross-node routing
- Forward actual message body in route_message handler instead of discarding it
- Add self-message guard to route_message handler to prevent loops
- Add nil guard for shardMap in handleRebalanceRequest
- Add self-message guard to handleRebalanceRequest in DistributedVM
This commit is contained in:
2026-07-30 18:23:48 +02:00
parent 70eddbc533
commit 443425d6e3
3 changed files with 32 additions and 12 deletions
+4 -3
View File
@@ -197,9 +197,10 @@ const MaxRouteHops = 10
// MessagePayload is a concrete type for JSON-unmarshaling RuntimeMessage payloads.
// Use this when receiving message data over the network.
type MessagePayload struct {
TargetActorID string `json:"targetActorId"`
Type string `json:"type"`
Hops int `json:"hops,omitempty"`
TargetActorID string `json:"targetActorId"`
Type string `json:"type"`
Hops int `json:"hops,omitempty"`
Body map[string]interface{} `json:"body,omitempty"`
}
// GetTargetActorID implements RuntimeMessage