Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Jan 29, 2026

Summary

  • Ensure ensureReady surfaces missing repository setups as runtime_not_ready across runtimes.
  • Fix SSH/Coder repo preflight to accept .git files (worktree support).
  • Allow non-git local projects to pass ensureReady (preserves documented local-only workflow).

Background

  • Setup/provisioning failures were being masked by background init; ensureReady is now the single readiness gate.
  • SSH/Coder preflight used test -d .git which fails for git worktrees (where .git is a file).
  • LocalRuntime was blocking non-git projects even though they are explicitly supported for local runtime.

Implementation

  • Added repo preflight checks in Local/Worktree/SSH/Devcontainer ensureReady paths.
  • SSH/Coder flows now use a two-step remote check (test -d || test -f then git rev-parse) to distinguish missing repo vs connection/command failures and support worktrees.
  • Coder stop/cancel polling path now validates the repo before returning ready.
  • LocalRuntime.ensureReady no longer gates on .git presence, allowing non-git directories to be ready.

Validation

  • make static-check
  • bun test src/node/runtime/SSHRuntime.test.ts
  • bun test src/node/runtime/LocalRuntime.test.ts

Risks

  • Low: additional preflight checks could mark a workspace not ready if the repo is removed or inaccessible; behavior is intentional for setup failures.

Generated with mux • Model: openai:gpt-5.2-codex • Thinking: high • Cost: $21.57

@github-actions github-actions bot added the bug label Jan 29, 2026
@ethanndickson ethanndickson force-pushed the fix/repo-preflight-ensure-ready branch from 57e6c63 to 2f122ac Compare January 29, 2026 06:06
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57e6c63f6f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ethanndickson
Copy link
Member Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09bfe4b6da

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ethanndickson ethanndickson force-pushed the fix/repo-preflight-ensure-ready branch from a63da29 to 0c3cf20 Compare January 29, 2026 15:43
@ethanndickson
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

SSH/Coder ensureReady() now accepts .git as file or directory, fixing
false runtime_not_ready classification for valid git worktrees.

- Update checkWorkspaceRepo() preflight: test -d || test -f
- Add tests for worktree file, missing repo, and missing git scenarios
@ethanndickson ethanndickson force-pushed the fix/repo-preflight-ensure-ready branch from 466473e to c6257c2 Compare January 30, 2026 03:40
@ethanndickson ethanndickson changed the title 🤖 fix: detect missing repo in ensureReady fix: improve ensureReady repo checks for SSH worktrees and non-git local projects Jan 30, 2026
@ethanndickson ethanndickson changed the title fix: improve ensureReady repo checks for SSH worktrees and non-git local projects fix: detect missing repo in ensureReady Jan 30, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Jan 30, 2026
Merged via the queue into main with commit 4e49f7b Jan 30, 2026
23 checks passed
@ethanndickson ethanndickson deleted the fix/repo-preflight-ensure-ready branch January 30, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant