feat: execute durable client commands through supervisor

This commit is contained in:
2026-09-06 12:18:15 +00:00
parent 3f84d3b2f1
commit 56b15c7f4f
41 changed files with 4272 additions and 66 deletions
@@ -238,6 +238,25 @@ func dialAndHello(t *testing.T, server *httptest.Server, clientID, instanceID st
connection.CloseNow()
t.Fatalf("welcome payload = %T", welcome.Payload)
}
// Reconnecting agents receive an advisory target list immediately after
// welcome. Consume it here so callers that exercise fencing or malformed
// frames observe the next read from the actual session boundary.
readContext, cancel = context.WithTimeout(context.Background(), time.Second)
defer cancel()
messageType, advisoryBytes, err := connection.Read(readContext)
if err != nil {
connection.CloseNow()
t.Fatal(err)
}
if messageType != websocket.MessageBinary {
connection.CloseNow()
t.Fatalf("reconciliation message type = %v", messageType)
}
var advisory rvboxv1.AgentEnvelope
if err := proto.Unmarshal(advisoryBytes, &advisory); err != nil || advisory.GetReconcileRequest() == nil {
connection.CloseNow()
t.Fatalf("reconciliation advisory = %+v, %v", advisory.Payload, err)
}
return connection, &welcome
}