Skip to content

fix(query): improve agent-facing graph answers - #323

Open
forhappy wants to merge 3 commits into
mainfrom
codex/agent-query-correctness
Open

forhappy wants to merge 3 commits into
mainfrom
codex/agent-query-correctness

Conversation

@forhappy

@forhappy forhappy commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expand direct incoming usage recall across callers, impact, and affected results to include source-backed references, imports, exports, and aliases while preserving exact relationship kinds.
  • Keep compact Agent Orientation output bounded without deleting retained hub, suggested-query, and learned-question evidence from the full graph report.
  • Expose live node degree through CompassQL direct property access and properties(n), including ORDER BY over pre-projection bindings.
  • Neutralize configured Git checkout filters during isolated historical materialization instead of failing after history capability discovery succeeds.
  • Add an executable compass path SOURCE TARGET next action when a directed node trail finds only a reverse/undirected connection.

Real-repository verification

Validated against the existing Zod graph (43,670 nodes and 79,097 edges):

  • callers returned 24 source-anchored incoming usages for the selected ZodError class, including references and exports.
  • CompassQL ranked real nodes by live degree (compile.test 3,117; schemas 2,320; schemas 1,581).
  • A one-hop reverse-only node trail returned no_path, a typed direction_mismatch, and the runnable compass path fallback.
  • A regenerated report rendered hubs 10/10, suggested queries 16/306, and learned questions 9/9 instead of empty sections.

Compatibility

  • Raw query schemas and discovery cursor semantics are unchanged.
  • callers and default impact/affected results are additively broader; exact edge kinds and bounds remain visible.
  • degree is a derived, snapshot-local node property. No persisted graph schema changes.
  • Historical filter neutralization preserves offline/no-hook/no-network checkout guarantees.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --lib --bins --locked -- -D warnings
  • cargo test --workspace --lib --bins --locked
  • Full compass-cypher, compass-query, compass-output, and compass-history crate tests
  • Focused CLI code-query, help, history, and product tests
  • 500-query reviewed relevance qualification corpus
  • CompassQL support corpus and product-boundary check
  • Root and standalone fuzz dependency-policy checks

An optional all-targets/all-features clippy probe reaches an existing expect_err lint in crates/compass-history/tests/roundtrip.rs; the required workspace lib/bin clippy baseline is clean.

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