fix(pipeline): fall back to PATH lookup for cocoindex binary#261
Merged
Conversation
When installed via `pip install --user`, scripts land in ~/Library/Python/X.Y/bin/ while sys.executable points to the framework Python elsewhere. The new fallback uses shutil.which() to find cocoindex on PATH when it's not next to the interpreter. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Owner
Author
Review: fix(pipeline): fall back to PATH lookup for cocoindex binaryClean, well-scoped fix. The fallback chain is sensible — venv-relative first (fast, no PATH search), then One suggestion (non-blocking)Both call sites that consume After this change, the binary might come from PATH (e.g. at lines 120 and 182. Minor polish — safe to merge as-is. |
"next to Python" is misleading when the binary comes from PATH via shutil.which(). Updated error and matching test assertion. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
HumanBean17
added a commit
that referenced
this pull request
Jun 6, 2026
…work, and deps cleanup Restores tree to 2a3e4be (last pre-June-6) plus: - 4c7ae7b fix(pipeline): fall back to PATH lookup for cocoindex binary (#261) - 584db63 rework skill and agent to combine RAG graph navigation with file-system search (#269) - f512e87 remove requirements.txt, declare all deps in pyproject.toml (#271) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HumanBean17
added a commit
that referenced
this pull request
Jun 6, 2026
…work, and deps cleanup (#274) Restores tree to 2a3e4be (last pre-June-6) plus: - 4c7ae7b fix(pipeline): fall back to PATH lookup for cocoindex binary (#261) - 584db63 rework skill and agent to combine RAG graph navigation with file-system search (#269) - f512e87 remove requirements.txt, declare all deps in pyproject.toml (#271) Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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
cocoindex_bin()usedPath(sys.executable).parent / "cocoindex", which assumes a venv layout wherecocoindexsits next to the Python interpreterpip install --user, scripts land in~/Library/Python/X.Y/bin/whilesys.executablepoints to the framework Python elsewhere (e.g./Library/Frameworks/Python.framework/...), causing "cocoindex not found next to Python" errorsshutil.which("cocoindex")as a fallback after the originalsys.executable-relative checkTest plan
620 passed, 9 skipped— existing test suite unchangedpip install --useron macOS, confirmjava-codebase-rag initfinds cocoindex via PATH🤖 Generated with Claude Code