From 6ecccb041bf056f36a5d9b4b48a8761b8c9fc5a7 Mon Sep 17 00:00:00 2001 From: SaladDay <1203511142@qq.com> Date: Thu, 8 Oct 2026 08:05:08 +0000 Subject: [PATCH] Fail initialization typed on a host without the Harness --- .../core/internal/execution/runtime_initialization.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/core/internal/execution/runtime_initialization.go b/services/core/internal/execution/runtime_initialization.go index 8d836c44d..644380552 100644 --- a/services/core/internal/execution/runtime_initialization.go +++ b/services/core/internal/execution/runtime_initialization.go @@ -67,14 +67,15 @@ func (w *Worker) runEnvironmentInitializations(ctx context.Context) error { // Placement binds an agent host once the Environment serves; // a later scan claims the preparation on it. if _, err := w.place(ctx, owner.TenantID, owner.SessionID, owner.EnvironmentID, func(id string) bool { - // The Turn path's predicate: the host advertises the - // Harness as available. + // A host that knows the kind is ready even when its + // Harness is unavailable, so the initialization fails + // typed below instead of waiting for another host. peer, err := w.dispatcher.authorizedPeer(ctx, id) if err != nil { return false } - _, err = runtimeDeclaration(peer, owner.Engine) - return err == nil + _, _, known := peer.AgentKindStatus(owner.Engine) + return known }); err != nil && !errors.Is(err, sessions.ErrNotFound) && !errors.Is(err, sessions.ErrDeviceBindingConflict) { return err }