Skip to content

Fix Knowledge Graph query-service response unwrapping#321

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-43b1
Draft

Fix Knowledge Graph query-service response unwrapping#321
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-43b1

Conversation

@cursor

@cursor cursor Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a Knowledge Graph response-shape regression where query-service endpoints that return { data: ... } or { result: ... } envelopes were only unwrapped for HQL run. The same wrapped shape caused queryable type discovery to return an empty list, grammar fetches to leak the envelope instead of returning text, and HQL validation to drop is_valid.

Root cause: hqlRunExtract handled query-service envelopes, but kg_queryable_type_summary, kg_grammar, and HQL validate read only top-level fields.

Fix: add a shared query-service envelope unwrap helper and use it across all Knowledge Graph query-service extractors. Added registry-level regression tests for wrapped discovery, grammar, and validation responses.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • Tests pass
  • Typecheck passes

Verification:

  • pnpm build
  • pnpm docs:generate
  • pnpm typecheck
  • pnpm test
Open in Web View Automation 

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants