Skip to content

Add Cloud Agent development environment - #8

Draft
t04dJ14n9 wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-2d21
Draft

t04dJ14n9 wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-2d21

Conversation

@t04dJ14n9

Copy link
Copy Markdown
Owner

Summary

Sets up a reproducible Cloud Agent development environment for this repository. The base image already ships go1.23.1 (the pinned toolchain), so no custom Dockerfile is needed — only a repo-managed .cursor/environment.json plus an idempotent install script.

Changes

  • .cursor/environment.json — repo-managed environment using the default image and an install command.
  • scripts/cloud-agent-install.sh — idempotent bootstrap that:
    • runs go mod download for every module (root, cmd/gig, examples/simple, examples/custom, benchmarks);
    • installs the CI-pinned lint/security tools golangci-lint v2.4.0 and gosec v2.27.1, exposing them on PATH.

Validation

All checks ran on the VM and again on a fresh Cloud Agent booted from a prebuilt environment build (bld-20260813-24f18900-0b3b-4ab1-80ee-e6d9f0c5fdf9).

Check Result
go build ./... (root, cmd/gig, examples/simple, benchmarks) Pass
go test -race ./... (root) Pass
go test -race ./... (cmd/gig) Pass
examples/simple interpreter run Sum of 1..10 = 55, Hello, WORLD! …
gig CLI init → gen → build → run (third-party gjson binding) Interpreted result: ALICE
golangci-lint run (root + CLI) 0 issues
gosec (root + CLI) 0 issues
Install idempotence Passed twice

Note on examples/custom

The committed examples/custom/mydep/packages/bytes.go references Go 1.24+ stdlib symbols (bytes.FieldsSeq, bytes.Lines, …), so that module does not build under the repo's pinned go1.23.1. This is a pre-existing repository inconsistency (per CLAUDE.md, bindings must be generated with go1.23.1), not an environment issue — regenerating with go1.23.1 produces buildable code. The install script still downloads its dependencies; only the go build of that one example is affected.

Open in Web Open in Cursor 

- .cursor/environment.json: repo-managed environment using the default image
  and an idempotent install command.
- scripts/cloud-agent-install.sh: downloads Go module deps for every module
  and installs the CI lint/security tools (golangci-lint v2.4.0, gosec v2.27.1).

Co-authored-by: t04dJ14n9 <t04dJ14n9@users.noreply.github.com>
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