Skip to content

fix(setup): wait for the shell before sending project setup commands #486

Closed

Description

@lastobelus

Project setup can send its command before the interactive shell is ready to read commands. A startup program waiting for input can consume that text, leaving setup completion unresolved.

At the 3655 source c909106a31be7aa452a31fce86bd32d47716fadb, apps/server/src/project/ProjectSetupScriptRunner.ts opens the terminal and writes immediately. Opening a terminal process does not establish line-editor readiness. Upstream addresses this in commit 5d5b6e025ca4a4d8c9e15ec69d525c1f749fea40.

Reproduce deterministically with a terminal stub that remains in its startup prompt: start setup, assert no setup command is sent until readiness, then signal line-editor readiness and assert one write and one completion. The existing source sends too early. This is source-confirmed with upstream regression evidence; no installed-app reproduction is claimed.

The repair must preserve LastCode terminal link profiles, completion cleanup, and update-drain admission. If drain activates while readiness is pending, setup must not start outside the admission boundary.

Related: #473 tracks managed-preview startup diagnostics, a different entry point with potentially related terminal behavior. Keep its investigation intact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions