Repository navigation
Add SessionStart hook installing the pinned dev tools for web sessions - #12
Merged
Merged
Conversation
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
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.
Summary
Adds
.claude/hooks/session-start.shand 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:
pyproject.toml'sdevdependency group. It reads the pins from there rather than repeating them, so it can't drift from the gate;uv run --with <pin>gate commands inverification.tomlneed no download mid-session;$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;CLAUDE_CODE_REMOTE != true), and is safe to re-run.It runs synchronously, so tools are ready before the session starts.
Validation
uv 0.11.29,ruff 0.16.8,pytest 9.1.1resolve 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.networktests also passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01TjcFBXJq1YJterj78bETMh
Generated by Claude Code