Skip to content

Harden cloud env setup script against the web setup-script contract#66

Merged
jssblck merged 2 commits into
mainfrom
claude/setup-env-robust
Jun 24, 2026
Merged

Harden cloud env setup script against the web setup-script contract#66
jssblck merged 2 commits into
mainfrom
claude/setup-env-robust

Conversation

@jssblck

@jssblck jssblck commented Jun 23, 2026

Copy link
Copy Markdown
Member

Follow-up to #64. Hardens scripts/setup-claude-env.sh against the verified Claude Code on the web setup-script contract:

  • Never blocks session start. A non-zero exit makes the session fail to start, so every step is now non-fatal and the script ends exit 0.
  • Uses pre-installed runtimes. Rust/cargo and git are already in the base image, so the redundant apt-get install is gone (less to fail under restricted networking).
  • Persists PATH via $CLAUDE_ENV_FILE when rustup installs to a fresh location.
  • Stays within the ~5 minute environment-cache budget.

🤖 Generated with Claude Code

…ract

Verified against https://code.claude.com/docs/en/claude-code-on-the-web:
- never block session start: steps are non-fatal and the script exits 0
  (a non-zero exit makes the session fail to start)
- rely on pre-installed runtimes (Rust/Node/Bun/Docker); drop redundant apt
- persist PATH for the session via $CLAUDE_ENV_FILE
- keep runtime within the ~5 minute environment-cache budget

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@attune-tuna

attune-tuna Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review finding:

  • Likely bug — native build prerequisites were removed (scripts/setup-claude-env.sh:45-50)
    The new script assumes Rust/git are enough, but this workspace still has native build dependencies in Cargo.lock (ring, onig_sys, multiple tree-sitter-* crates via cc). On a fresh Ubuntu/Claude web image without a C compiler/toolchain, cargo build --all-targets will fail and the in-session build will fail for the same reason. I’d keep a best-effort root apt-get install --no-install-recommends build-essential pkg-config ca-certificates curl before cargo fetch/build, while still making it non-fatal to preserve the setup-script contract.

No other material issues found in the diff.

@jssblck jssblck force-pushed the claude/setup-env-robust branch from 88b99cc to ec3aa09 Compare June 24, 2026 17:37
@jssblck jssblck merged commit e23ec28 into main Jun 24, 2026
14 checks passed
@jssblck jssblck deleted the claude/setup-env-robust branch June 24, 2026 17:44
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.

1 participant