Skip to content

docs: add Cursor Cloud dev environment setup notes to AGENTS.md - #103

Merged
jaredwray merged 1 commit into
mainfrom
cursor/setup-dev-environment-75cf
Aug 14, 2026
Merged

docs: add Cursor Cloud dev environment setup notes to AGENTS.md#103
jaredwray merged 1 commit into
mainfrom
cursor/setup-dev-environment-75cf

Conversation

@jaredwray

Copy link
Copy Markdown
Owner

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce?

Docs update. This adds a ## Cursor Cloud specific instructions section to AGENTS.md documenting how to set up and run the development environment in a Cursor Cloud agent VM. No source code is changed.

Notes captured for future agents:

  • Node >=22.19.0 is required; the system /exec-daemon/node is too old, so ~/.bashrc prioritizes nvm's Node 24 (pnpm via corepack).
  • Docker must be started manually per session before integration tests (sudo dockerd &, chmod 666 the socket), then pnpm test:services:start brings up memcached on 11211-11213 plus SASL on 11215.
  • Docker 29 in this VM uses the fuse-overlayfs storage driver with containerd-snapshotter disabled.
  • Two should handle connection timeout tests fail only in this sandbox because outbound TCP to reserved 192.0.2.0 connects instantly instead of timing out; they pass on GitHub CI. All other 610 tests pass.

Verification

  • pnpm build — succeeds (ESM + CJS + type declarations)
  • pnpm lint — clean (Biome)
  • pnpm test — 610/612 pass (2 env-only network-timeout failures described above)
  • Hello-world smoke test against local memcached: connectsetgetincrdelete all succeed.
Open in Web Open in Cursor 

Co-authored-by: Jared Wray <me@jaredwray.com>
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6496388) to head (fddc21e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #103   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines         1399      1399           
  Branches       303       303           
=========================================
  Hits          1399      1399           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
jaredwray marked this pull request as ready for review August 14, 2026 15:44
@jaredwray
jaredwray merged commit 4a0c891 into main Aug 14, 2026
14 checks passed
@jaredwray
jaredwray deleted the cursor/setup-dev-environment-75cf branch August 14, 2026 15:45

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

Copy link
Copy Markdown

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: fddc21eac1

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AGENTS.md
- `sudo chmod 666 /var/run/docker.sock`
- Then `pnpm test:services:start` (docker compose) brings up memcached on ports `11211`, `11212`, `11213` and a SASL server on `11215`. `pnpm test` / `pnpm test:ci` need these running or most suites fail.
- Docker note: the daemon is configured with the `fuse-overlayfs` storage driver and `containerd-snapshotter` disabled (required for Docker 29 in this VM). This is already set in `/etc/docker/daemon.json`.
- Known environment-only test failures: the two `should handle connection timeout` tests (`test/index.test.ts`, `test/node.test.ts`) fail here because outbound TCP to the reserved TEST-NET-1 address `192.0.2.0` connects instantly in this sandbox instead of timing out. This is a network-environment quirk, not a code bug; these pass on GitHub CI. All other tests (610) pass.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep Cursor runs subject to the required test gate

On Cursor Cloud, this note normalizes a 610/612 result even though the repository's mandatory gate requires pnpm test to succeed with 100% coverage. Future agents following these instructions can therefore commit changes with a red suite and potentially misclassify a real timeout regression as the documented environment quirk; the environment-specific failures should be resolved or handled deterministically rather than treated as acceptable.

AGENTS.md reference: AGENTS.md:L7-L8

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
Comment on lines +44 to +45
- `sudo dockerd > /tmp/dockerd.log 2>&1 &`
- `sudo chmod 666 /var/run/docker.sock`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wait for Docker to create its socket

On a fresh VM where /var/run/docker.sock does not exist, backgrounding dockerd returns control before the daemon has necessarily created the socket, so the immediately following chmod can fail with ENOENT. Because the socket is then created with its default restricted permissions, the non-sudo pnpm test:services:start step can still be unable to connect; wait until the socket exists before changing its permissions.

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
- Node version: the repo requires Node `>=22.19.0`. The system node at `/exec-daemon/node` is too old; `~/.bashrc` is configured to prioritize nvm's default Node 24 and `pnpm` comes from corepack. Login shells (the default) already resolve the correct `node`/`pnpm`, so no manual `nvm use` is needed.
- Docker is required for tests but the daemon does NOT auto-start. Before running integration tests, start it once per session and make the socket usable by the repo's non-sudo scripts:
- `sudo dockerd > /tmp/dockerd.log 2>&1 &`
- `sudo chmod 666 /var/run/docker.sock`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid making the Docker socket world-writable

When the Cursor VM contains another unprivileged user or service, changing the Docker socket to mode 0666 lets that account control the root-owned daemon, including launching privileged containers or mounting host files, which effectively provides host root access. Grant access only to the intended agent user or a restricted group instead of giving every local account write access.

Useful? React with 👍 / 👎.

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