feat(query): improve recall, intent routing, ranking, and performance - #198
Open
forhappy wants to merge 11 commits into
Open
feat(query): improve recall, intent routing, ranking, and performance#198forhappy wants to merge 11 commits into
forhappy wants to merge 11 commits into
Conversation
# Conflicts: # CHANGELOG.md
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.
Summary
query-ranker/2; v1 exists only as a frozen differential test.maxCandidatesas the total recall-pool bound instead of inflating it tomaxNodes; emit explicit truncation diagnostics.query-planner/1routing for search, callers, callees, impact, and node trails.Production wiring
compass ask "..."CodeQueryEngine::query_naturaland returnscompass.query/1.compass query "..."query_graphcompass search/ MCPsearch_symbolsAll paths remain native, local-first, credential-free, deterministic, and bounded. Ambiguous symbols remain explicit; the planner never invents call direction.
Accuracy and recall evidence
query_naturalrequests for search, callers, callees, impact, path, paraphrase, typo, Unicode, ambiguity, domain, and no-answer cases.Performance and bounds
maxCandidatesnow controls the total recall pool (20 by default, hard cap 256);maxNodesindependently bounds returned nodes.Corpus feedback loop
COMPASS_QUERY_LOG=<path>opt-in logging writes bounded localcompass.query-log/1JSONL and stops at 16 MiB.scripts/prepare_query_relevance_review.pyvalidates, redacts, deduplicates, and produces a deterministiccompass.query-review-candidates/1review queue. It never uploads telemetry or generates judgments automatically. Real production samples still require privacy review and two-reviewer, graph-digest-pinned approval before entering the executable corpus.Validation
cargo fmt --all -- --checkcargo clippy --workspace --lib --bins --locked -- -D warningscargo test --workspace --lib --bins --lockedcargo clippy -p compass-query --all-targets --all-features --locked -- -D warningscargo test -p compass-query --lockedcargo test -p compass-query --test code_query_scale --lockedcargo test -p compass-cli --test code_query_cli --lockedcargo test -p compass-mcp --test code_query_tools --lockedpython3 scripts/qualify_query_relevance.pycargo test -p compass-cli --test compass_product --lockedsh scripts/check_product_boundary.shThe prior architecture failures were reproduced locally and fixed on this branch. Universal framework facts now retain the pipeline-provided repository-relative source identity, restoring Route/Event/Message/Topic/Queue/Job publication; the Windows watcher test uses an independent bounded rebuild deadline. The current head is rerunning every GitHub check.
Additional validation for the CI repair:
cargo test -p compass-languages --lockedcargo test -p compass-core --test code_graph_v1_determinism --locked(13 passed)cargo test -p compass-core watch::tests::watch_rebuilds_code_and_flags_semantic_changes --lockedcargo clippy -p compass-languages --all-targets --all-features --locked -- -D warningscargo clippy -p compass-core --all-targets --all-features --locked -- -D warnings./scripts/qualify_code_graph_v1.sh --fixtures-onlyAll Cargo verification used this worktree's dedicated target under
/Volumes/Workspace/crabbuild-target.