Bug
.claude/hooks/post-git-ops.sh (PostToolUse hook for Bash git operations like rebase/merge/pull, triggers a full codegraph rebuild) has the same broken fallback build path as update-graph.sh (issue #1836):
if command -v codegraph &>/dev/null; then
codegraph build "$PROJECT_DIR" -d "$DB_PATH" --no-incremental 2>/dev/null && BUILD_OK=1 || true
else
node "${CLAUDE_PROJECT_DIR:-$PROJECT_DIR}/src/cli.js" build "$PROJECT_DIR" -d "$DB_PATH" --no-incremental 2>/dev/null && BUILD_OK=1 || true
fi
src/cli.js has never existed in this repo — the CLI entry point is TypeScript at src/cli.ts, compiled to dist/cli.js (see package.json "bin": { "codegraph": "./dist/cli.js" }). The else branch (hit when the codegraph binary isn't on PATH) silently fails (stderr redirected to /dev/null), so BUILD_OK stays 0 and the full rebuild after a rebase/merge/pull never happens for contributors without a global codegraph install.
Suggested fix
Change src/cli.js to dist/cli.js in the fallback branch, mirroring the fix for #1836.
Found while working on
Issue #1836 (update-graph.sh fallback build path) — noticed the identical bug pattern duplicated in this second hook while fixing the first; out of scope for that issue so filing separately per repo scope-discipline convention.
Bug
.claude/hooks/post-git-ops.sh(PostToolUse hook for Bash git operations like rebase/merge/pull, triggers a full codegraph rebuild) has the same broken fallback build path asupdate-graph.sh(issue #1836):src/cli.jshas never existed in this repo — the CLI entry point is TypeScript atsrc/cli.ts, compiled todist/cli.js(seepackage.json"bin": { "codegraph": "./dist/cli.js" }). Theelsebranch (hit when thecodegraphbinary isn't onPATH) silently fails (stderr redirected to/dev/null), soBUILD_OKstays0and the full rebuild after a rebase/merge/pull never happens for contributors without a globalcodegraphinstall.Suggested fix
Change
src/cli.jstodist/cli.jsin the fallback branch, mirroring the fix for #1836.Found while working on
Issue #1836 (update-graph.sh fallback build path) — noticed the identical bug pattern duplicated in this second hook while fixing the first; out of scope for that issue so filing separately per repo scope-discipline convention.