Skip to content

Make Cursor Cloud agents boot ready to work, and stop lint autofix from breaking e2e DB checks - #105

Merged
kody-bot merged 2 commits into
mainfrom
cursor/fix-agent-setup-friction-1d47
Oct 5, 2026
Merged

kody-bot merged 2 commits into
mainfrom
cursor/fix-agent-setup-friction-1d47

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Fixes the agent papercuts filed while shipping #101.

Closes #102
Closes #103
Closes #104

Cloud Agent environment (#102). Every recurring build of the dashboard environment failed with bash: line 1: bun: command not found (exit 127). Bun and Node 24 were only on PATH through ~/.bashrc, which non-interactive login shells never load. Agents fell back to a bare image with Node 22, no Bun, no dependencies, and no database. This adds a repo-managed .cursor/environment.json that runs .cursor/install.sh. The script:

  • installs Node 24 with nvm and installs Bun
  • puts both first on the login-shell PATH via /etc/profile.d/gratitext-toolchain.sh. The VM's PATH lists /exec-daemon and an older nvm Node before /usr/local/bin, so a symlink alone isn't enough.
  • runs bun install --frozen-lockfile and bun run setup:env, and seeds a fresh database (never re-seeds an existing one)
  • installs Playwright Chromium, with a timeout and fallback for the known --with-deps stall

The committed file takes precedence over the personal dashboard environment for every agent on this repo.

Lint autofix (#103). playwright/prefer-to-have-count treats any .count() as a Locator, so bun run lint -- --fix rewrote expect(await prisma.message.count({ where })).toBe(0) into expect(prisma.message).toHaveCount(0). That fails typecheck and drops the where clause. The rule is now off for tests/e2e/**.

AGENTS.md (#104). It is now Prettier-clean, so bun run format doesn't leave a stray diff. The Cloud section points at the install script instead of a hard-coded v24.16.0 path that doesn't exist on the VM.

Test Plan

  • Ran a draft Cloud Agent environment build of this branch (bld-20261005-20be607f-b48e-4306-8dd1-e7aec0808f11): SUCCEEDED. The log shows Now using node v24.21.0, Bun installed, Prisma client generated, Database has been seeded, Playwright Chromium downloaded, install Exit code: 0, and Snapshot ready. The previous recurring builds all failed with bun: command not found.
  • I ran .cursor/install.sh through env -i … bash -lc with the VM's default login PATH, and it exited 0. In a fresh login shell, node -v is v24.21.0, and bun/bunx resolve.
  • I ran eslint --fix on a probe e2e file containing expect(await prisma.message.count({ where })).toBe(0). It now leaves the line unchanged; before, it reported playwright/prefer-to-have-count and rewrote it.
  • bunx prettier --check AGENTS.md passes. bun run lint and bun run typecheck pass, and CI is green.

Checklist

  • Tests updated
  • Docs updated
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 5, 2026 21:18
Builds of the dashboard environment failed every time with
'bun: command not found' because Bun and Node 24 were only on PATH via
~/.bashrc. The committed install script installs both, exposes them on
the login-shell PATH, and sets up deps, the database, and Playwright.

AGENTS.md now points at it instead of a hard-coded Node patch path and is
Prettier-clean.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
playwright/prefer-to-have-count treats any .count() call as a Locator.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kody-bot
kody-bot marked this pull request as ready for review October 5, 2026 21:19
@kody-bot
kody-bot merged commit 57e4d48 into main Oct 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants