docs: add Cursor Cloud dev environment setup notes - #926
Conversation
Co-authored-by: Christopher Speller <crspeller@users.noreply.github.com>
🤖 LLM Evaluation ResultsOpenAI
❌ Failed EvaluationsShow 7 failuresOPENAI1. TestReactEval/[openai]_react_cat_message
2. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
3. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
4. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
5. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
6. TestConversationMentionHandling/[openai]_conversation_from_attribution_long_thread.json
7. TestDirectMessageConversations/[openai]_bot_dm_tool_introspection
Anthropic
❌ Failed EvaluationsShow 7 failuresANTHROPIC1. TestReactEval/[anthropic]_react_cat_message
2. TestConversationMentionHandling/[anthropic]_conversation_from_attribution_long_thread.json
3. TestConversationMentionHandling/[anthropic]_conversation_from_attribution_long_thread.json
4. TestConversationMentionHandling/[anthropic]_conversation_from_attribution_long_thread.json
5. TestConversationMentionHandling/[anthropic]_conversation_from_attribution_long_thread.json
6. TestConversationMentionHandling/[anthropic]_conversation_from_attribution_long_thread.json
7. TestDirectMessageConversations/[anthropic]_bot_dm_tool_introspection
This comment was automatically generated by the eval CI pipeline. |
📝 WalkthroughWalkthroughAGENTS.md adds Cursor Cloud-specific instructions covering pinned toolchains, Docker prerequisites, a reduced ChangesCursor Cloud setup
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 104: Update the “Fast dist build” documentation to use
`MM_SERVICESETTINGS_ENABLEDEVELOPER=1 make dist-ci`, referencing the Makefile’s
`dist-ci` target for the Linux amd64-only build instead of `make dist`.
- Line 103: Update the Docker setup guidance in AGENTS.md to remove chmod 666 as
the default socket workaround. Prefer rootless Docker or adding the user to the
Docker group, and mention chmod 666 only as a temporary, explicitly
security-sensitive fallback.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: df88a758-cbfa-4544-a92e-66abb51dbc20
📒 Files selected for processing (1)
AGENTS.md
|
|
||
| - **Go toolchain pin is required for lint.** The base `go` is 1.22.2 (auto-upgrades to 1.26.4 per `go.mod`). Without `GOTOOLCHAIN=go1.26.4`, `make install-go-tools` builds the pinned `golangci-lint` (v2.0.2) with go1.25.12, which then refuses this go 1.26.4 module (`the Go language version used to build golangci-lint is lower than the targeted Go version`). This is the `golangci-lint` analogue of the `mattermost-govet` gotcha above. The pin is set persistently via `go env -w`; if lint ever fails with that message, re-run `go env -w GOTOOLCHAIN=go1.26.4`. `make test`/`go test` are unaffected (they only shell out through gotestsum). | ||
| - **Node is fixed at v22.14 / npm 10.9.7.** `/exec-daemon/node` is forced to the front of `PATH`, so `nvm use` cannot override it despite AGENTS listing Node 24.11. Build, jest, and e2e all work on it. Use `npm ci` (not `npm install`): npm 10 rewrites `package-lock.json` cosmetically (drops `"peer": true`) vs the committed lockfiles generated by npm 11, which would trip `make check-locks`. `npm ci` installs from the lockfile without rewriting it. | ||
| - **Docker is required for `postgres/` unit tests and all e2e** (both use testcontainers). The daemon is installed but not auto-started on a fresh boot: run `sudo service docker start`, and if the socket denies access run `sudo chmod 666 /var/run/docker.sock`. Tests pull public images (`mattermostdevelopment/mattermost-enterprise-edition:release-11.9`, `pgvector/pgvector:pg15`, `ghcr.io/copilotkit/aimock`, `testcontainers/ryuk`). |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not document a world-writable Docker socket as the default workaround.
sudo chmod 666 /var/run/docker.sock grants every local user access to Docker, which is effectively host-root control. Prefer rootless Docker or a narrowly scoped Docker-group setup, and describe this command only as a temporary, security-sensitive fallback.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~103-~103: Possible missing comma found.
Context: ...docker start, and if the socket denies access run sudo chmod 666 /var/run/docker.soc...
(AI_HYDRA_LEO_MISSING_COMMA)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` at line 103, Update the Docker setup guidance in AGENTS.md to
remove chmod 666 as the default socket workaround. Prefer rootless Docker or
adding the user to the Docker group, and mention chmod 666 only as a temporary,
explicitly security-sensitive fallback.
| - **Go toolchain pin is required for lint.** The base `go` is 1.22.2 (auto-upgrades to 1.26.4 per `go.mod`). Without `GOTOOLCHAIN=go1.26.4`, `make install-go-tools` builds the pinned `golangci-lint` (v2.0.2) with go1.25.12, which then refuses this go 1.26.4 module (`the Go language version used to build golangci-lint is lower than the targeted Go version`). This is the `golangci-lint` analogue of the `mattermost-govet` gotcha above. The pin is set persistently via `go env -w`; if lint ever fails with that message, re-run `go env -w GOTOOLCHAIN=go1.26.4`. `make test`/`go test` are unaffected (they only shell out through gotestsum). | ||
| - **Node is fixed at v22.14 / npm 10.9.7.** `/exec-daemon/node` is forced to the front of `PATH`, so `nvm use` cannot override it despite AGENTS listing Node 24.11. Build, jest, and e2e all work on it. Use `npm ci` (not `npm install`): npm 10 rewrites `package-lock.json` cosmetically (drops `"peer": true`) vs the committed lockfiles generated by npm 11, which would trip `make check-locks`. `npm ci` installs from the lockfile without rewriting it. | ||
| - **Docker is required for `postgres/` unit tests and all e2e** (both use testcontainers). The daemon is installed but not auto-started on a fresh boot: run `sudo service docker start`, and if the socket denies access run `sudo chmod 666 /var/run/docker.sock`. Tests pull public images (`mattermostdevelopment/mattermost-enterprise-edition:release-11.9`, `pgvector/pgvector:pg15`, `ghcr.io/copilotkit/aimock`, `testcontainers/ryuk`). | ||
| - **Fast dist build:** `MM_SERVICESETTINGS_ENABLEDEVELOPER=1 make dist` builds only linux-amd64 (the arch the e2e Mattermost container needs) instead of all five arches. |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
Use the amd64-only build target for the fast path.
The supplied Makefile defines dist as the regular multi-stage build and dist-ci as the target that invokes server-ci for Linux amd64 only. Document MM_SERVICESETTINGS_ENABLEDEVELOPER=1 make dist-ci here; the current command does not guarantee the reduced-architecture build it claims to provide.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` at line 104, Update the “Fast dist build” documentation to use
`MM_SERVICESETTINGS_ENABLEDEVELOPER=1 make dist-ci`, referencing the Makefile’s
`dist-ci` target for the Linux amd64-only build instead of `make dist`.
Summary
Sets up and verifies the full development environment for this repo in Cursor Cloud and records the non-obvious, durable caveats in
AGENTS.mdunder a new## Cursor Cloud specific instructionssection. No application/source code is changed.What was verified end-to-end in the environment (all green):
make check-stylemake testMM_SERVICESETTINGS_ENABLEDEVELOPER=1 make distdist/mattermost-ai-*.tar.gzcd e2e && npx playwright test --config=playwright.aimock-smoke.config.tsThe "hello world" run boots a real Mattermost 11.9 + pgvector + a deterministic mock-LLM sidecar (aimock) via testcontainers, deploys the freshly built plugin bundle, and confirms an agent replies in the Agents RHS panel — no LLM API keys needed.
Key setup learnings captured in
AGENTS.md:go1.26.4(go env -w GOTOOLCHAIN=go1.26.4) or the pinnedgolangci-lintv2.0.2 builds with go1.25.12 and refuses the go 1.26.4 module — thegolangci-lintanalogue of the existingmattermost-govetgotcha./exec-daemon/nodeoverridesnvm); usenpm cito avoid cosmeticpackage-lock.jsondrift that would tripmake check-locks.postgres/unit tests and all e2e; start it withsudo service docker start.mattermost_agents_live_demo.mp4
Ticket Link
NONE
Release Note
To show artifacts inline, enable in settings.
Summary by CodeRabbit