Skip to content

chore(cli): add Cloud Agent environment config - #1468

Draft
Jaden Lemmon (jadenlemmon) wants to merge 1 commit into
mainfrom
cursor/add-cloud-agent-environment-b216
Draft

chore(cli): add Cloud Agent environment config#1468
Jaden Lemmon (jadenlemmon) wants to merge 1 commit into
mainfrom
cursor/add-cloud-agent-environment-b216

Conversation

@jadenlemmon

Copy link
Copy Markdown
Contributor

Overview of Changes

Adds a .cursor/environment.json so QA Wolf Cloud Agents get a working, reproducible dev environment out of the box. The repo needs Bun (pinned via packageManager), which is not present in the default image, so the install phase installs the pinned Bun (bun-v1.3.13) when it is missing and then runs bun install --frozen-lockfile. The command is idempotent and needs no start/terminals because the CLI has no long-running services.

Testing

Validated end to end on a fresh VM: Bun install, dependency install (twice, for idempotence), the full quality suite, a build, and a real product action (running the web example flow, which launches Chromium and passes).

bun run typecheck
bun run lint
bun run format:check
bun run knip
bun run test
bun run build
bun run dev -- doctor
bun run dev -- flows run examples/example.flow.ts --junit /tmp/junit.xml

Checklist

  • Changes follow the code style of this project
  • Self-review completed
  • Tests added/updated (or not applicable)
  • No breaking changes (or described below)
Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Added .cursor/environment.json for @qawolf/cli. The configuration installs Bun version 1.3.13 when Bun is unavailable, sets Bun environment variables and PATH, and runs bun install --frozen-lockfile.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits and clearly describes adding the Cloud Agent environment configuration.
Description check ✅ Passed The description includes the required overview, testing steps, checklist, and verification details for the environment configuration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/add-cloud-agent-environment-b216

Comment @coderabbitai help to get the list of available commands.

@jadenlemmon
Jaden Lemmon (jadenlemmon) marked this pull request as ready for review August 12, 2026 14:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @.cursor/environment.json:
- Line 3: Update the install command in the environment configuration so the Bun
installation no longer pipes the mutable bun.sh/install response directly into
bash. Use a version-pinned, checksum-verified installer or download and verify
the Bun v1.3.13 release binary before extraction, while preserving the existing
BUN_INSTALL, PATH, and frozen dependency installation behavior.
- Line 3: Update the install command in the environment configuration to
validate bun --version equals 1.3.13, and run the Bun installer when Bun is
missing or has any other version. Preserve the existing BUN_INSTALL and PATH
setup, then run bun install --frozen-lockfile using the validated version.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: be753cdb-b540-4e9f-b44d-8ed72bb81b04

📥 Commits

Reviewing files that changed from the base of the PR and between 77b000a and decd75f.

📒 Files selected for processing (1)
  • .cursor/environment.json

Comment thread .cursor/environment.json
@@ -0,0 +1,4 @@
{
"name": "@qawolf/cli",
"install": "command -v bun >/dev/null 2>&1 || curl -fsSL https://bun.sh/install | bash -s \"bun-v1.3.13\"; export BUN_INSTALL=\"$HOME/.bun\"; export PATH=\"$BUN_INSTALL/bin:$PATH\"; bun install --frozen-lockfile"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- .cursor/environment.json ---'
cat -n .cursor/environment.json
printf '%s\n' '--- package.json Bun declarations ---'
rg -n -C 2 '"bun"|packageManager' package.json bun.lockb bun.lock 2>/dev/null || true
printf '%s\n' '--- installer references ---'
rg -n 'bun\.sh/install|bun-v1\.3\.13|BUN_INSTALL|bun install' . --glob '!node_modules' --glob '!dist' --glob '!build' | head -100

Repository: qawolf/cli

Length of output: 2507


🌐 Web query:

Bun install script versioned URL checksum verification bun.sh/install bun-v1.3.13

💡 Result:

The official Bun install script provided at https://bun.sh/install does not natively implement or prompt for checksum verification of the installation script itself when piped to shell [1][2]. The standard, recommended installation method—curl -fsSL https://bun.sh/install | bash—executes the script directly from the remote URL without an integrated checksum check [3][4][5]. If you require security hardening, such as preventing man-in-the-middle attacks or ensuring the integrity of the downloaded script, you must perform the verification manually or via third-party tools. Manual Verification and Hardening Strategies: 1. Use Third-Party Verification Tools: Projects such as checksum.sh provide a wrapper to download, inspect, and verify scripts against a known checksum before piping them to a shell [6][7]. Note that you must independently obtain and trust the checksum for the specific script version you intend to execute [6][7]. 2. Download and Verify the Binary Directly: For production environments or CI/CD pipelines, it is standard security practice to bypass the install script entirely [8]. You can download the specific Bun release binary (e.g., bun-v1.3.13) directly from the official GitHub releases page [4]. The GitHub release for v1.3.13 includes a SHASUMS256.txt file, which allows you to cryptographically verify the downloaded zip archive before extracting it [4]. Example of verifying a direct download: BUN_VERSION="1.3.13" # Download the specific binary curl -LO "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" # Verify using the checksum file provided in the release # (Ensure you verify the SHASUMS256.txt file itself from a trusted source) sha256sum -c SHASUMS256.txt --ignore-missing The official documentation does not provide a specific checksum for the install.sh script itself for each release, as the install script is generally maintained to fetch the latest or requested version dynamically [1][3]. Consequently, hardening efforts typically focus on version pinning and verifying the final binary assets provided in official GitHub releases rather than the install script itself [8].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
import json, urllib.request

urls = {
    "installer": "https://bun.sh/install",
    "release_checksums": "https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/SHASUMS256.txt",
}
for name, url in urls.items():
    print(f"--- {name}: {url} ---")
    with urllib.request.urlopen(url, timeout=20) as response:
        data = response.read()
        print("status:", response.status)
        print("content_type:", response.headers.get("content-type"))
        print("bytes:", len(data))
        if name == "installer":
            text = data.decode("utf-8", "replace")
            print("contains requested release:", "bun-v1.3.13" in text)
            print("version-related lines:")
            for line in text.splitlines():
                if "BUN_VERSION" in line or "version" in line.lower() or "bun-" in line:
                    print(line[:240])
        else:
            print(data.decode("utf-8", "replace")[:1000])
PY

Repository: qawolf/cli

Length of output: 2476


Pin or verify the Bun installer script.

At .cursor/environment.json:3, curl ... | bash executes the mutable https://bun.sh/install response. bun-v1.3.13 selects the Bun release but does not pin the installer contents. Use a version-pinned, checksum-verified installer, or verify the Bun release binary checksum before extraction.

🤖 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 @.cursor/environment.json at line 3, Update the install command in the
environment configuration so the Bun installation no longer pipes the mutable
bun.sh/install response directly into bash. Use a version-pinned,
checksum-verified installer or download and verify the Bun v1.3.13 release
binary before extraction, while preserving the existing BUN_INSTALL, PATH, and
frozen dependency installation behavior.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- .cursor/environment.json ---'
cat -n .cursor/environment.json
printf '%s\n' '--- package manifests and Bun references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' '"packageManager"|"bun"|bun-v|bun install|environment' package.json bun.lockb bun.lock .cursor 2>/dev/null || true
printf '%s\n' '--- relevant tracked files ---'
git ls-files .cursor package.json bun.lock bun.lockb

Repository: qawolf/cli

Length of output: 867


🏁 Script executed:

#!/bin/bash
python3 - <<'PY'
import json, re
from pathlib import Path

env = json.loads(Path(".cursor/environment.json").read_text())
pkg = json.loads(Path("package.json").read_text())
command = env["install"]
required = pkg["packageManager"].split("@", 1)[1]

print("required_version:", required)
print("has_presence_check:", "command -v bun" in command)
print("has_version_check:", "bun --version" in command)
print("installer_argument:", re.search(r'bash -s \\"([^"]+)\\"', command).group(1))
PY

printf '%s\n' '--- shell branch with an existing mismatched Bun ---'
bash -c '
  bun() {
    if [ "$1" = "--version" ]; then
      printf "%s\n" "1.2.0"
    else
      printf "bun invocation: %s\n" "$*"
    fi
  }
  command -v bun >/dev/null 2>&1 || printf "%s\n" "installer would run"
  printf "%s\n" "existing bun version: $(bun --version)"
  bun install --frozen-lockfile
'

printf '%s\n' '--- Bun installer documentation references ---'
curl -L --max-time 15 -s https://bun.sh/docs/installation | rg -n -i -C 2 'version|bun-v|install' | head -80 || true

Repository: qawolf/cli

Length of output: 50367


🏁 Script executed:

#!/bin/bash
python3 - <<'PY'
import json
from pathlib import Path

env = json.loads(Path(".cursor/environment.json").read_text())
pkg = json.loads(Path("package.json").read_text())
command = env["install"]
required = pkg["packageManager"].split("@", 1)[1]

print("required_version:", required)
print("has_presence_check:", "command -v bun" in command)
print("has_version_check:", "bun --version" in command)
print("contains_requested_installer_version:", f'bun-v{required}' in command)
PY

printf '%s\n' '--- plain-text Bun installation documentation ---'
for url in \
  https://bun.com/docs/installation.md \
  https://bun.sh/docs/installation.md
do
  printf 'URL: %s\n' "$url"
  curl -L --max-time 15 -sS "$url" |
    rg -n -i -C 3 --max-count 8 'bun-v|bash -s|version' || true
done

Repository: qawolf/cli

Length of output: 4647


Enforce Bun 1.3.13 before installing dependencies. At .cursor/environment.json:3, check bun --version and run the installer when the version is not 1.3.13; command -v bun alone accepts incompatible versions.

🤖 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 @.cursor/environment.json at line 3, Update the install command in the
environment configuration to validate bun --version equals 1.3.13, and run the
Bun installer when Bun is missing or has any other version. Preserve the
existing BUN_INSTALL and PATH setup, then run bun install --frozen-lockfile
using the validated version.

@jadenlemmon
Jaden Lemmon (jadenlemmon) marked this pull request as draft August 12, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants