Home

giogio / openez-graph

public
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: gracefully handle graph build failures in MCP and web endpoints

3 months ago

64ac478
Authored
asta-nguyen8/11/2026, 1:47:58 PM
- Wrap `ensureGraphReady` calls in try-catch to log errors instead of crashing MCP server
- Add `ensureGraphReadySafely` helper for `code_query` tool to prevent graph failures from blocking retrieval
- Use `Promise.allSettled` in `code_context` and `graph_neighbors` tools to continue with successful workspaces when some fail
- Return 500 error response from `/api/workspaces/:id/graph` endpoint on graph build failure instead of throwing
- Release graph build lease on CAS failure or error to prevent stale ownership locks

Parent9798d54

18 files changed
  • apps/mcp/src/mcp-core.ts+43−5
  • apps/web/src/server/index.ts+64−54
  • docs/superpowers/plans/2026-08-09-rag-flow-correctness-remediation.md+4−2
  • packages/db/src/sqlite/fts-repository.ts+1−5
  • packages/db/src/sqlite/graph-traversal-ops.ts+6−0
  • packages/db/src/sqlite/registry-db.ts+19−11
  • packages/indexer/src/graph-service.ts+6−1
  • packages/indexer/src/index-workspace.ts+3−2
  • packages/indexer/src/parsers/oxc-parser.ts+18−5
  • tests/e2e-search.test.ts+15−0
  • tests/fts-retrieval.test.ts+9−1
  • tests/index-workspace.test.ts+1−1
  • tests/oxc-parser.test.ts+24−0
  • tests/parsed-documents-cache.test.ts+8−6
  • tests/registry.test.ts+6−2
  • tests/tokenizer-concurrency.test.ts+3−0
  • tests/vector-search.test.ts+60−14
  • tests/workspace-db.test.ts+15−0