Skip to content

fix(query): give budget guidance that works on document graphs - #5628

Closed
azizur100389 wants to merge 2 commits into
Graphify-Labs:v8from
azizur100389:codex/query-budget-narrowing-hint
Closed

azizur100389 wants to merge 2 commits into
Graphify-Labs:v8from
azizur100389:codex/query-budget-narrowing-hint

Conversation

@azizur100389

@azizur100389 azizur100389 commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Addresses the budget-warning request in #2530. Adaptive budget sizing remains open.

On a graph containing only document references, the budget notice suggested context_filter=['call'], which cannot select those edges. The notice now suggests reducing traversal depth or looking up a specific node. It preserves the configured token budget, completeness guarantees and seed ordering. The hint requires no additional graph scan.

Verification

Reproduced on clean v8 with a document-only graph. The regression covers both truncated output and a complete result that exceeds the requested budget. The MCP and CLI query suites reported 281 passed and one skipped locally. Ruff and pre-commit passed.

Full upstream CI passed all seven jobs at 7637ed4, including the parallel and serial suites on Python 3.11 through 3.14.

@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @azizur100389. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic.

@github-actions github-actions Bot added the contributor Pull request from a returning community contributor label Nov 29, 2026

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify review View in Graphify

Looks safe to merge · Merge confidence 5/5

No issues reported · High impact

Code graph · 1053 functions depend on this change
  • 1 function became more coupled. _subgraph_to_text() (29 callers).
  • 31 of 658 test files are affected by this change.
  • Gate, test list and every flagged function: in the Graphify check.

Reviewed 7637ed4 · 5 earlier findings not re-checked

safishamsi added a commit that referenced this pull request Nov 30, 2026
Extractor accuracy (Swift #5641, Apex #5627, Python #5647, TypeScript
#5604/#5614/#5612, Bash caller-var #5602), GitHub Actions run-step
extraction (#5603), incremental correctness (#5634/#5638/#5636), symlink
and semantic-cache fixes (#5617/#5618), export/report hardening and perf
(#5643/#5644/#5645/#5646/#5619/#5620/#5621), and CLI/docs/skill/install
work (#5629/#5628/#5626/#5624/#5623/#5625/#5642/#5583). AST cache schema
59 to 60; Swift/Apex/Python/Bash/GHA inputs re-extract on first build.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@safishamsi

Copy link
Copy Markdown
Member

Landed in v0.9.124 (just released to PyPI), cherry-picked with your authorship preserved so it shows under your name in the history. Thanks @azizur100389 for query over-budget guidance that works on document graphs — verified green in the full suite and, where applicable, smoke-tested against the published package. 🙏

@safishamsi safishamsi closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor Pull request from a returning community contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants