diff --git a/backend/src/services/deploy.ts b/backend/src/services/deploy.ts index 6017c5fc..dce8f566 100644 --- a/backend/src/services/deploy.ts +++ b/backend/src/services/deploy.ts @@ -13,7 +13,7 @@ import { deleteKeyPairAws, deleteSecurityGroupAws, } from "./ec2"; -import { connectSsh, waitForBootstrap, type SshSession } from "./ssh"; +import { connectSsh, type SshSession } from "./ssh"; import { buildPrCommentBody, postComment, @@ -232,8 +232,10 @@ async function firstDeploy( activeSshSessions.set(previewId, sshSession); try { - await appendLog(previewId, `[PP] SSH connected. Waiting for bootstrap to complete...\n`); - await waitForBootstrap(sshSession, 900_000); + // Root SSH is enabled as the final bootstrap step, after the completion + // marker is written. A successful root connection is therefore the + // readiness signal; polling the same long-lived SSH connection can leave + // a completed instance stuck when its exec channel goes stale. await appendLog(previewId, `[PP] Bootstrap complete. Starting setup...\n`); if (repoConfig.aptPackages.length > 0) {