Home

giogio / openez-graph

public
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: resolve all review blockers in RAG flow remediation

3 months ago

72d2d5d
Authored
asta-nguyen8/9/2026, 10:20:48 AM
High 1: Legacy embedding migration no longer deadlocks. The migration
recreates the embeddings table as BLOB (dropping unconvertible TEXT rows)
instead of throwing, so `openez reindex` can actually open the DB and
rebuild.

High 2: Old workspaces with completed graphs are invalidated on registry
migration (graph_generation set to -1), forcing a rebuild that picks up
parser behavior changes. Parser version bumped from ts-morph-v1 to
oxc-v2 to invalidate stale parse caches.

High 3: codeQuery() now accepts an optional ensureGraph callback so direct
consumers of @openez-graph/core get lazy graph building without the
core→indexer circular dependency. MCP passes ensureGraphReady through.

High 4: Cross-process graph lock uses atomic SQLite compare-and-set
(tryClaimGraphBuild) instead of a process-local Map. Web/MCP/CLI in
separate processes can no longer duplicate graph builds.

Medium 5: parserVersionFor() now returns fallback-v1 for tree-sitter and
regex parsers (not just the fallback parser), so native-unavailable cache
rows match the expected version and are reused.

Medium 6: Oxc parser discovers nested arrow functions
(`const inner = () => {}`) as graph symbols. Duplicate nested names are
qualified with the parent (e.g. `outer.helper`) to avoid graph node
collisions.

Medium 7: Root tsc --noEmit passes. Added @types/bun to devDeps and
included "bun" in tsconfig types. Fixed test type errors.

All gates: 174 pass/1 skip/0 fail, turbo typecheck 8/8, root tsc pass,
format check pass, web+cli build pass, MCP smoke test pass.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Parent4b078a9

19 files changed
  • apps/mcp/src/mcp-core.ts+2−2
  • package.json+1−0
  • packages/core/src/retrieval.ts+12−2
  • packages/db/src/sqlite/registry-db.ts+14−0
  • packages/db/src/sqlite/registry-repository.ts+13−0
  • packages/db/src/sqlite/types.ts+8−0
  • packages/db/src/sqlite/workspace-db.ts+23−4
  • packages/indexer/src/graph-service.ts+20
−1
  • packages/indexer/src/index-workspace.ts+10−7
  • packages/indexer/src/parsers/oxc-parser.ts+45−26
  • pnpm-lock.yaml+21−3
  • tests/embedding-migration.test.ts+16−5
  • tests/graph-lifecycle.test.ts+28−3
  • tests/oxc-parser.test.ts+58−0
  • tests/parsed-documents-cache.test.ts+5−5
  • tests/parser-registry.test.ts+1−2
  • tests/registry.test.ts+3−1
  • tests/vector-search.test.ts+4−3
  • tsconfig.json+1−1