Skip to content

Session setup hook: install the pinned call-graph toolchain for Claude Code on the web #3778

Closed

Description

@squid-protocol

Part of #3772.

Why

In the TypeScript round, each fresh cloud session hit the same missing tools one at a time:

  • pytest and pytest-xdist weren't in the interpreter (the one on PATH was a separate uv tool);
  • numpy, pandas and xgboost were missing, so test_security_auditor.py failed;
  • ruff was 0.15.8, while CI pins 0.16.0;
  • pyan3==2.8.1 and tree-sitter-language-pack weren't installed;
  • a global typescript 6.0.2 happened to be present, but 7.x (no JS compiler API) is npm's latest;
  • language-crucible and the import-graph corpus weren't fetched.

What

A SessionStart hook under .claude/ that is idempotent and quiet when everything is present. It:

  • installs the editable package plus the test, ML and graph extras at CI's pinned versions;
  • installs ruff==0.16.0;
  • installs a pinned [email protected] with npm, and exports NODE_PATH;
  • fetches language-crucible at its pinned tag, and the import-graph corpus (import_graph_accuracy.py --fetch-only), as siblings of the checkout;
  • reports what it couldn't do. For example, when tiktoken's openaipublic.blob.core.windows.net is blocked, it says so and names the environment network setting to change, so full-precision crucible runs are known to be unavailable before a PR, not during one.

Done when

  • A fresh session runs callgraph_check.py with no manual installs.
  • A second session start takes a few seconds, not minutes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtesting

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions