Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Eliminates blocking filesystem operations in the runtime layer and removes unnecessary path-finding complexity.

Changes

Removed sync fs operations:

  • Replaced fs.existsSync() + fs.mkdirSync() with fsPromises.access() + fsPromises.mkdir() in LocalRuntime.ts
  • All filesystem operations in runtime are now async, preventing main thread blocking

Removed path-finding module:

  • Deleted executablePaths.ts (57 lines) that was checking hardcoded paths for bash and nice
  • Updated LocalRuntime.ts and SSHRuntime.ts to rely on system PATH
  • Simplifies codebase by 74 lines total

Verification

  • ✅ TypeScript compilation passes
  • ✅ All unit tests pass (same results as before)
  • ✅ No sync fs operations remain in runtime files

Generated with cmux

- Replace all sync fs operations (existsSync, mkdirSync) with async equivalents
- Remove executablePaths.ts module entirely
- Rely on system PATH for bash and nice executables
- Simplifies codebase by 74 lines

This ensures the runtime never blocks the main thread during file I/O.
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.

ℹ️ 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".

@ammario ammario enabled auto-merge October 27, 2025 03:08
@ammario ammario disabled auto-merge October 27, 2025 03:09
@ammar-agent
Copy link
Collaborator Author

All CI tests pass including integration and E2E tests, confirming that relying on system PATH works correctly in our actual runtime environments (CI, Electron, etc.). The path-finding code was unnecessary complexity.

@ammario ammario added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit a1edaef Oct 27, 2025
13 checks passed
@ammario ammario deleted the rt-sync branch October 27, 2025 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants