Repository navigation
Cloud sessions: a cloud-only SessionStart hook installs pwsh and Python 3.14 and sets the git identity - #2433
Merged
Merged
Conversation
…on 3.14 and sets the git identity A Claude Code cloud VM ships no pwsh, so every repo hook fails to start and the shell guards are off. Its Python is 3.13, and its commits use an identity the required cla check refuses. Cloud environments are set per account in the claude.ai UI, but this repo's settings.json reaches every account. scripts/hooks/cloud-setup.sh is a no-op unless CLAUDE_CODE_REMOTE=true, gated inline as well. It installs pwsh, then Python 3.14 through uv. It commits as the pushing GitHub account's noreply (gh api user), never a fixed name. It re-runs the role card when pwsh is new, guesses no seat, and builds no venv. Every failure prints what is off; it exits 0. The settings contract now splits shell-form commands, scans .sh, and classifies .sh hooks, with a planted control. Probe: MEFORORG/MessageFoundry PR 2432.
Collaborator
Author
|
QA: code-review skill at level There were 14 findings and one repair round. Fixed (10):
Skipped (4), with reasons:
|
Collaborator
Author
|
Lander: enqueued at debb7d9, pinned. This is a priority, at the owner's request.
|
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
A cloud-only SessionStart hook,
scripts/hooks/cloud-setup.sh, wired in.claude/settings.json. Because the tracked settings file is what every cloud session clones, it covers all of the owner's accounts with no per-account cloud-environment setup.In a Claude Code cloud VM (
CLAUDE_CODE_REMOTE=true) the hook:uv, because the image ships 3.13;gh api user. The default cloud identity fails the requiredclacheck (wiki note 20261002T125230275Z-0glfkb, PR 1926). The address is never a fixed name;Locally, the inline gate exits before the script is read.
shell: bashruns it through Git Bash on Windows, andbashis not on the PATH there, so exec form would have failed to start in every local session.The settings contract test now splits shell-form commands, scans
.shreferences and classifies.shhook scripts. It has a planted control for the shell-form case.Evidence
A probe cloud session on 2026-10-19 (PR 2432, closed) measured these:
git add -Aunder pwsh;gh prreturns 403 (GraphQL);clapasses with an allowlisted identity.The evaluation is at
cloud-sessions-evaluation.mdin the Manager's shared notes folder.Not verified
gh api userworks through the cloud proxy. If it does not, the hook says so and leaves the identity, andclarefuses as before.ensure-venv.ps1does not run on Linux yet; a sibling session is fixing that. A full install can outrun a hook timeout, which would drop all of this output.Checks
bash -n: clean.test_cloud_setup_hook,test_claude_settings_contract,test_role_cards,test_tooling_partitionandtest_shell_guard_dispatch, with Git Bash on PATH so the bash tests ran rather than skipped.