install: link the shared hook folders into every tool - #772
EdbertChan wants to merge 1 commit into
Conversation
Hooks moved onto the shared runtime (diu-stop, demo-freeze, llm-judge and the eval_dictionary tools) reach engine/hooks/_sdk through their installed path, but install.sh never linked _sdk, and linked _markers only for Claude. After #731 and #732 merged, the diu-stop and demo-freeze hooks crashed with ModuleNotFoundError on every run. The new test installs into a fake HOME and runs every installed hook script, failing on any import error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Change-Id: Ie4ec0204ee5b8e82ff15138ad823fdcecf060ac3
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 86b6691. Configure here.
| capture_output=True, | ||
| text=True, | ||
| timeout=5, | ||
| ) |
There was a problem hiding this comment.
Test runs live judge scripts
Medium Severity
The new import check runs every installed hook *.py except install_*, test_*, detect.py, and state.py. That still includes eval_dictionary.py, whose __main__ path calls judge.ask and can start real model runners in a new session. The 5s timeout then kills only the parent, so those children can keep running.
Reviewed by Cursor Bugbot for commit 86b6691. Configure here.
|
Tick the box to add this pull request to the merge queue (same as
|
|
Mergify repair stopped: unresolved human review thread PRRT_kwDOT3uYWs6jT6ED |


Summary
Small checker scripts run before and after each reply. Some of them share one folder of helper code.
The installer does not link that shared folder next to the checkers, so two of them crash on every reply.
The installer now links the shared folder for all three tools. A new test installs into a throwaway folder and runs every checker to catch a missing piece.
Review Claim
Once set up, every checker script on the machine can load the shared helper code it needs, for all three tools.
Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
The installer only adds links to folders already in this repo; it removes or changes nothing else.
Slice Rationale
One fix and its test. On main,
install.shlinks_markersonly for Claude and_sdkfor no tool, whilediu-stop,demo-freeze,llm-judgeand foureval_dictionary.pytools add<hooks>/_sdk(and_markers) to their import path from their installed location.demo-freezeanddiu-stopimport from that path at load time, so on an installed machine they crash:Non-goals
Test Plan
Test Plan
python3 -m unittest tests.test_install.TestInstalledHookScriptsImportwithinstall.shfrom main: fails, listing 17 scripts (for example.claude/hooks/diu-stop/claude_stop_check.py: ModuleNotFoundError: No module named 'finding'); with this change:checked=239 import-fail=0 unchecked=6(the 6 areeval_dictionary.pycommand-line tools that ran past their imports and hit the 20s probe limit)echo '{}' | python3 ~/.claude/hooks/diu-stop/claude_stop_check.py→exit=0shellcheck install.sh→ exit 0python3 engine/skills/make-pr/scripts/preflight.py --base origin/main→unit engine-runtime, gates okRevert Plan
Revert Plan
git revert <sha>./install.sh🤖 Generated with Claude Code