Skip to content

fix(indexing): keep gateway responsive during blocking indexing phases - #1763

Open
Shashankss1205 wants to merge 2 commits into
fix/parser-initialization-failures-1746from
fix/gateway-indexing-liveness
Open

Shashankss1205 wants to merge 2 commits into
fix/parser-initialization-failures-1746from
fix/gateway-indexing-liveness

Conversation

@Shashankss1205

@Shashankss1205 Shashankss1205 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Indexing currently blocks gateway health/status requests during discovery, grammar loading, import pre-scans, resolution and synchronous graph writes. Move the Tree-sitter phases to workers while keeping writes sequential. Run the blocking SCIP pipeline, including its CLI and thread-local parser augmentation, in one worker; cancellation checkpoints stop subsequent phases after the current blocking call returns.

Before loading an uncached language, use language-pack prefetch. In the pinned v1.20.0 binding, prefetch releases the GIL while get_language does not, so merely moving get_language to a thread is insufficient. Keep alias mapping and language caching; surface prefetch failures through #1761's initialization errors. Document offline cache preparation and the limitation that in-flight native calls/writes cannot be interrupted or rolled back (#829 remains open).

Validation: 14 new regressions exercise the real /health route while Tree-sitter discovery/pre-scan/resolution/writes and SCIP CLI/supplement/writes are blocked, cold-cache failure without per-file retries, cancellation before subsequent writes, and alias/cache behavior. The parser/utils/API/indexing regression run passes 520 tests. Graph-write/resilience/convergence coverage passes 64 tests with 1 skip. After adding the failed-write cancellation guard, the final focused liveness/SCIP run passes 22 tests. Ruff and git diff --check pass. The published Git tree matches the tested local tree.

Stacked on #1761, targeting its branch to keep the review diff focused. Retarget to main after #1761 merges and require the main-target CI workflows before merge. Current repository rules still require an independent approving review.

Refs #1745. This PR does not resolve the Ladybug CONTAINS defect in #1730.

Upstream binding reference: https://github.com/xberg-io/tree-sitter-language-pack/blob/v1.20.0/crates/ts-pack-core-py/src/lib.rs .

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
code-graph-context-pack Ready Ready Preview Oct 9, 2026 4:58pm UTC

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Code Graph Analysis

fix(indexing): keep gateway responsive during blocking indexing phases (#1763)

📊 Interactive Visualization

View the blast radius graph: PR Reviewer Dashboard

📦 Artifacts

The graph JSON has been uploaded as a build artifact: pr-code-graph-1763


Generated by CodeGraphContext using FalkorDB Lite

This branch was successfully deployed

1 active deployment
Preview — d5e384fe Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog tasks

Development

Successfully merging this pull request may close these issues.

1 participant