Skip to content

Avoid blocking graph queries after clean pulls - #109

Merged
Kashkovsky merged 1 commit into
mainfrom
codex/fix-graph-query-latency
Aug 4, 2026
Merged

Avoid blocking graph queries after clean pulls#109
Kashkovsky merged 1 commit into
mainfrom
codex/fix-graph-query-latency

Conversation

@Kashkovsky

Copy link
Copy Markdown
Owner

What changed

  • Return the latest ready code-graph snapshot immediately for ordinary query, node, and explain reads after a clean commit switch.
  • Preserve synchronous freshness for dirty worktree overlays and strict path/impact reads.
  • Skip semantic vector search when lexical search already fills the query seed budget.
  • Add CLI and unit regressions for both latency paths.

Why

A graph query immediately after pulling a new commit synchronously rebuilt a large stale graph before returning any evidence. On a warm graph, strong lexical matches still waited for the exact semantic vector scan to hit its 10-second budget.

The CLI always requested refresh even for non-strict operations, unlike the existing MCP stale-snapshot policy. Traversal also invoked semantic search even when lexical search had already supplied every seed it could use.

Impact

Large-monorepo queries after a clean pull can return the previous ready snapshot immediately, explicitly marked freshness: "stale". Dirty local edits remain visible through the existing refresh behavior, and strict operations remain current. Lexically complete queries avoid unnecessary semantic latency.

Validation

  • Full suite: 186 test files, 1,777 tests passed before rebase.
  • Rebased onto current origin/main.
  • Post-rebase focused query and CLI integration regressions passed.
  • Post-rebase typecheck, lint, and Prettier checks passed.
  • Globally installed exact-HEAD build was dogfooded against a simulated pull; the query returned 12 lexical matches in 0.33 seconds without rebuilding.

@Kashkovsky
Kashkovsky marked this pull request as ready for review August 4, 2026 09:31
@Kashkovsky
Kashkovsky merged commit e55a5ef into main Aug 4, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant