fix(reprocess): build graph on graph-only installs (macOS Intel)#401
Merged
Conversation
server.run_refresh_pipeline (the default `reprocess` path) hard-failed on graph-only installs — macOS Intel, where cocoindex[lancedb]/lancedb/ sentence-transformers are gated off by PEP 508 markers — with a cryptic "cocoindex not found next to Python" message and exit 2, never building the graph. init/increment already skip vectors and build the graph there; reprocess now does the same, so the Intel Mac experience is consistent across commands. - Detect graph-only via pipeline.vector_stack_installed(); skip the vectors phase, run the graph builder, and return success with a clear message (the renderer's vectors task stays invisible — its "never spawned" invariant). - Extract the graph-build block into _run_graph_phase(), shared by the normal vectors->graph path and the new graph-only path (no duplication). - Centralize the operator-facing skip line as VECTORS_SKIPPED_GRAPH_ONLY in pipeline.py — single source for cli.py (init/increment) and server.py (reprocess). - Tests: regression test for graph-only reprocess in test_graph_only_boot.py; patch vector_stack_installed in the existing vectors-path baseline test. Co-Authored-By: Claude <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.
Problem
On Intel Macs (
darwin+x86_64),cocoindex[lancedb]/lancedb/sentence-transformersare intentionally gated off by PEP 508 markers inpyproject.toml(torch/lancedb dropped macOS x86_64 wheels), so the install is graph-only by design.The default
java-codebase-rag reprocesswent throughserver.run_refresh_pipeline, which only checked for thecocoindexbinary and hard-failed:It never built the graph — inconsistent with
init/increment, which already skip vectors and build the graph on graph-only installs.Fix
run_refresh_pipelinenow detects graph-only installs viapipeline.vector_stack_installed()and skips the vectors phase, builds the graph, and returns success with a clear message — mirroringinit/increment._run_graph_phase()helper (no duplication between the normal vectors→graph path and the new graph-only path). Normal-path semantics are preserved exactly (phases_run, success, exit-code mapping).VECTORS_SKIPPED_GRAPH_ONLYinpipeline.py(single source of truth;cli.pynow imports it as an alias).Before → after (Intel Mac)
cocoindex not found next to Python: …vectors skipped — … (graph-only mode)+reprocess completed (graph-only; …)Verification
test_refresh_pipeline_skips_vectors_and_builds_graph_on_graph_onlyintests/test_graph_only_boot.py(the cross-platform graph-only home; themacos-13CI leg is temporarily disabled, so this in-process coverage is what guards the path on the gate).vector_stack_installedin the existing vectors-path baseline test (test_refresh_pipeline_quiet_stderr_baseline) since it fakes a full install.tables/increment-Lance-message) — they requirelancedb/cocoindex, absent on Intel Mac by design; none touch the code changed here, and they pass on the Ubuntu CI gate where the vector stack is installed.Out of scope
reprocess --vectors-onlystill surfaces"cocoindex not found"on graph-only (different sync code path incli.py). Since--vectors-onlyis an explicit opt-in where vectors are genuinely impossible, failing there is honest — left as-is here; can extend the clear messaging in a follow-up if desired.🤖 Generated with Claude Code