Skip to content

Add SessionStart hook installing the pinned dev tools for web sessions - #12

Merged
Deep-Sixed merged 1 commit into
mainfrom
claude/eager-clarke-gqqdd4
Sep 25, 2026
Merged

Deep-Sixed merged 1 commit into
mainfrom
claude/eager-clarke-gqqdd4

Conversation

@Deep-Sixed

Copy link
Copy Markdown
Owner

Summary

Adds .claude/hooks/session-start.sh and registers it in .claude/settings.json, so Claude Code on the web sessions can run the lint and test gates without manual setup.

The hook:

  • installs pytest and ruff from pyproject.toml's dev dependency group. It reads the pins from there rather than repeating them, so it can't drift from the gate;
  • installs uv 0.11.29, the version CI pins, and warms uv's cache so the uv run --with <pin> gate commands in verification.toml need no download mid-session;
  • puts pip's scripts directory first on PATH for the session (via $CLAUDE_ENV_FILE). The web image preinstalls uv 0.8.17 and ruff 0.15.8 earlier on PATH, and without this they would shadow the pinned versions;
  • does nothing outside the web (CLAUDE_CODE_REMOTE != true), and is safe to re-run.

It runs synchronously, so tools are ready before the session starts.

Validation

  • The hook exits 0 on first run, on a re-run, and as a no-op outside the web. It takes about 5s once packages are cached.
  • After the hook: uv 0.11.29, ruff 0.16.8, pytest 9.1.1 resolve first on PATH.
  • uv run --with ruff==0.16.8 ruff check .: all checks passed.
  • uv run --with pytest==9.1.1 python -m pytest -q tests/test_input_boundaries.py: 20 passed.
  • Before this change, with pytest installed by hand: the full suite gave 417 passed and 1 skipped offline; the 3 network tests also passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TjcFBXJq1YJterj78bETMh


Generated by Claude Code

Installs pytest and ruff from pyproject.toml's `dev` dependency group, and
uv 0.11.29 as pinned in CI, then warms uv's cache for the gate commands in
verification.toml. The image preinstalls older uv and ruff earlier on PATH,
so the hook puts pip's scripts directory first for the session. It is a
no-op outside Claude Code on the web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjcFBXJq1YJterj78bETMh
@Deep-Sixed
Deep-Sixed marked this pull request as ready for review September 25, 2026 23:21
@Deep-Sixed
Deep-Sixed merged commit 3120337 into main Sep 25, 2026
2 checks passed
@Deep-Sixed
Deep-Sixed deleted the claude/eager-clarke-gqqdd4 branch September 25, 2026 23:22
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.

2 participants