Add Cloud Agent development environment - #32
Draft
djbclark wants to merge 3 commits into
Draft
Conversation
Co-authored-by: Daniel JB Clark <djbclark@users.noreply.github.com>
… bash (pass repo semgrep gate) Co-authored-by: Daniel JB Clark <djbclark@users.noreply.github.com>
…fresh builds Co-authored-by: Daniel JB Clark <djbclark@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Cloud Agent development environment so a fresh agent can build, test, lint, and run
aiusein one hop..cursor/environment.json— default base image + idempotentinstall(repository-managed, highest-precedence config)..cursor/install.sh— installs the CI toolchain (uv,just,bun), syncs Python dev deps (uv sync --extra dev, Python pinned to 3.11 to match the CI matrix +pyprojecttarget), installs docs tooling (bun install --frozen-lockfile), and pre-fetches the pre-commit hook environments sojust ciis fast on first use.The install command mirrors the GitHub
testworkflow exactly, so a Cloud Agent runs the same gate CI runs.Design choices
start/terminals:aiuseis a CLI, not a long-running service, so an idempotentinstallis all that's needed.install(not a Dockerfile):uv/just/buninstall in seconds via their official installers and are captured in the environment snapshot; keeping the default base image avoids a custom Docker build.bash: thecurl | bashidiom is rejected by this repo's own semgrep gate, so the script uses download-then-run to keep the gate green.bun/bunxsymlinked into~/.local/bin: the bun installer only appends~/.bun/binto~/.bashrc, which non-interactive Cloud Agent shells don't source.~/.local/binis reliably on PATH (uv/justlive there), so the docs-lint hooks (prettier,markdownlint) resolvebunxon a freshly booted build.Validation
Local VM and a fresh Cloud Agent booted from the tested build
bld-20260908-2598f84a-896f-419a-bc87-74425f6cd54a:uv run pytest— 640 passeduv run pre-commit run --all-files— exit 0, all hooks pass (ruff, mypy, typos, prettier, markdownlint, yamllint, bandit, semgrep, gitleaks)just --fmt --check— exit 0install.shre-run — idempotent, no lockfile churndocs/generate-readme-demo.pyrenders the ranked clock matrix via the real analysis +render_clock_matrixcode pathbunxresolves on PATHThe five external data-source tools (
cswap,codexbar,caut,openusage,tokscale) are intentionally not installed: perAGENTS.mdthey are operator-installed and require real authenticated subscriptions, soaiuse doctorreporting them missing is expected in a clean environment.Activating
This environment is defined by the committed
.cursor/environment.json, so merging this PR makes it the active, versioned, branch-following config for future Cloud Agents — no dashboard configuration required. (The draft builds used for validation were built from this branch and are non-promotable by design; a promotable build follows automatically once the config lands onmain.)