Commit 0288818
Add Claude Code on the web SessionStart hook (Rust + Elixir) (#155)
## What
Adds a cloud-only `SessionStart` hook so [Claude Code on the
web](https://code.claude.com/docs/en/claude-code-on-the-web) sessions
start with VeriSimDB's toolchain ready. Cloud images ship `cargo` but
**not** Erlang/Elixir (which `elixir-orchestration` needs), so the hook
installs them and warms the workspace.
## Changes (`.claude/`)
`.claude/hooks/session-start.sh` — cloud-only (`CLAUDE_CODE_REMOTE`),
idempotent, best-effort:
- **Installs Erlang** (apt, OTP 25) + **Elixir 1.17** (precompiled from
GitHub, built for OTP 25) — satisfies `elixir-orchestration`'s `elixir:
"~> 1.17"`.
- **Warms Rust** with `cargo fetch` (the ~20-crate workspace compiles on
first use — too heavy to build synchronously every session).
- **Best-effort `mix deps.get`** for the Elixir deps.
Plus `.claude/settings.json` (registers the hook on `startup|resume`)
and a `REUSE.toml` annotation covering `.claude/**`.
## Scope notes
- **ReScript playground intentionally excluded** — per current policy
ReScript is banned (the estate frontend is moving to AffineScript), so
the hook only sets up the active toolchains (Rust + Elixir). *(Note:
this repo's `CLAUDE.md` still lists ReScript as allowed — worth
reconciling.)*
- Every step is best-effort so a blocked registry never aborts session
startup.
## Network caveat (important)
`mix deps.get` needs the **Hex registry** (`repo.hex.pm` /
`builds.hex.pm`). On a restrictive **Trusted** network allowlist those
are blocked (HTTP 403) and skipped cleanly; on **Full** network access
they complete. `cargo` works on Trusted (crates.io is allowlisted). For
faster startup, the install step is a good candidate to move to a cached
**Setup Script** (environment config).
## Validation (in a cloud session)
- ✅ Hook exits 0; installs Erlang + Elixir (`mix 1.17.3`) and runs
`cargo fetch`
- ✅ Local-skip is a no-op when `CLAUDE_CODE_REMOTE` is unset
- 1 parent bbfd48c commit 0288818
3 files changed
Lines changed: 97 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
| |||
0 commit comments