Description
Provide a repository-owned setup script for Codex cloud tasks so agents receive the pinned project runtimes, validation tools, and Backlog.md CLI instead of relying on automatic environment setup.
Acceptance Criteria
- #1 The script installs Backlog.md at the repository-compatible pinned version and makes the backlog command available during the agent phase
- #2 The script provisions the Go, Python, Helm, and lint tooling required by the repository’s documented local and CI validation commands
- #3 The script is safe to rerun in a cached Codex cloud environment and validates that required tools are available
- #4 The setup entry point is
scripts/cloud-environment-setup.shand begins with a warning telling non-cloud agents not to execute it - #5 The script is usable as a Bash setup script in both Codex cloud and Claude Code cloud environments
Definition of Done
- #1 make lint
- #2 make test
- #3 make check-public-ips
- #4 make docs-check
- #5 make grafana-check
Implementation Plan
-
Derive exact tool versions and validation needs from go.mod, Makefile, and CI workflows.
-
Add an idempotent Codex cloud setup script that persists PATH changes and installs Backlog.md plus project validation tools.
-
Exercise the setup script, run repository checks, record results, and commit the implementation.
-
Move the entry point to the requested scripts path, add the local-agent warning, and align persistence and runtime behavior with both vendors’ cloud setup semantics.
Implementation Notes
Added .codex/setup.sh with pinned Go 1.26.4, golangci-lint 2.12.2, Helm 3.19.0, Backlog.md 1.50.1, the pinned Python validation dependencies, bootstrap OS tooling, checksum verification, persistent shell configuration, and cache-safe idempotent checks.
Validation passed for setup execution and rerun, shell syntax, make lint, make test, make check-public-ips, make docs-check, and make grafana-check. The optional deployment contract could not run in this agent container because no Docker command/daemon was preinstalled; the setup script now includes docker.io among conditional bootstrap packages for Codex cloud.
Follow-up review: moved the setup entry point to scripts/cloud-environment-setup.sh, added the required local-agent do-not-run warning at the start, and documented compatibility with both Codex cloud’s separate-shell setup model and Claude Code cloud’s cached setup-script model.
Follow-up validation passed: bash -n scripts/cloud-environment-setup.sh, make test, make docs-check, and make check-public-ips. Per the new header, the setup script itself was not executed by this non-cloud agent.
Final Summary
Added and exercised an idempotent Codex cloud manual setup script that persists a pinned Go toolchain, golangci-lint, Helm, Python validation dependencies, Docker/bootstrap utilities, and Backlog.md for future agent shells. Verified the script twice plus the repository lint, test, public-IP, generated-doc, and Grafana gates.
Follow-up review moved the executable to scripts/cloud-environment-setup.sh and added an explicit opening warning that non-cloud agents must not run it. The Bash setup remains compatible with Codex cloud and Claude Code cloud environment setup fields, with durable filesystem installs and shell-path persistence.