Answer natural graph questions with ranked candidate selection - #342
Merged
Merged
Conversation
Retain owner-qualified lookup, calls-only trails, and fresh benchmark artifacts from main. Integrate dependency intent with the CLI operand contract and keep auto-picked Agent View answers explicitly ambiguous candidates.
Run the unchanged startup timing gates in a single-worker Chromium project after functional tests complete. Keep the focused performance command independent of project dependencies and document the qualification setup.
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
Natural-language graph questions now continue with a disclosed, deterministically ranked symbol and execute the matching typed query. For example,
what does FieldSectionMutationService depend on?includes calls made by its owned methods and imports; ambiguous names return an auto-picked answer plus alternatives. Fuzzy discovery retains useful traversal results with approximate labels and coverage caveats.Motivation
Implements Workstream 1 of the supplied Compass improvement plan: loose questions previously stopped at ambiguity or returned expensive non-answers despite useful graph evidence. Selection remains local, bounded, deterministic, and explicitly labelled. Workstreams 2–6 remain outside this PR, including attribute-chain extraction and broader impact relationship coverage.
Verification
Cargo checks used a dedicated target directory on the mounted workspace volume. Language-extraction and CompassQL qualification gates were not rerun locally; those runtime surfaces are unchanged.
Before integration with the Compass 0.4.0 main branch, ran the agent query harness with
suite_natural.toml, identical questions and 800-token first pages, and no follow-ups. Compass 0.3.29 (candidate debug binary SHA-256 prefixcb7c4fa20d4013a4) versus Graphify 0.9.67:One broad Cobra question still omits a required anchor from the first page. Compass remains slower. Token estimates are UTF-8 output bytes divided by four; anchor recall is a focused proxy, not an independent precision oracle or a population-wide accuracy claim. This run does not qualify cold/warm latency, RSS, or production performance. A separate five-question loose-versus-exact-neighborhood check averaged 782 versus 788 estimated tokens at the same 800-token budget.
Reproduce with the documented harness, supplying the pinned source checkouts and binaries:
Merged main at
8a17f7c8(Compass 0.4.0) and resolved the textual and semantic conflicts. Retained main's fresh-artifact benchmark policy, owner-qualified lookup rules, calls-only trails, and strict answer validation. Added coverage for dependency CLI operands and valid auto-picked candidate answers. The benchmark figures above describe the pre-merge binary; the full real-repository benchmark was not rerun for this conflict-resolution update.Browser CI qualification follow-up
The startup timing test ran alongside another functional browser test on CI and exceeded the unchanged three-second limit on all three attempts (3,148 / 3,069 / 3,190 ms). Run browser performance qualification in a dedicated single-worker project after functional Chromium tests finish. Keep the original limits, fixtures, and assertions. The focused performance script uses
--no-depsso it still runs only the timing checks.Validation:
npm ciandnpm run typecheck:js: passed.npm run test:js: 473 unit tests passed; its initial six-worker browser run hit an unrelated transient history-status assertion.CI=true npm run test -w @compass/viewer-tests -- --workers=2: all 120 browser tests passed, with both timing tests scheduled last in their own worker.npm run test:performance -w @compass/viewer-tests -- --repeat-each=3: all six runs passed.node scripts/check_viewer_assets.mjsandgit diff --check: passed.No viewer runtime or generated assets changed. VS Code integration/packaging and platform checks remain covered by CI.
Compatibility and documentation
Natural selection uses
query-planner/2; explicit callers/callees/impact/node/search matching remains strict. Raw graph and query schema majors remain unchanged. Compact discovery text cursors advance to version 3, explicitly rejecting older cursors; restart the query to continue. The default text page budget changes from 8,000 to 800, with--text-budgetand--cursorretaining caller control. No graph rebuild is needed. Auto-picked typed answers retaincandidates/ambiguousAgent View status; owner-qualified selection preserves suffix validation and rejects missing owners or incomplete leaf postings.Updated
COMPATIBILITY.md,MIGRATION.md,CHANGELOG.md,PERFORMANCE.md, the query-engine documentation, and benchmark documentation. No runtime Graphify, Python, embedding, credential, or network dependency is introduced.Checklist
MIT OR Apache-2.0