fix(graph): preserve matched nodes when source exceeds output budget - #239
Merged
theyashasvipandey merged 2 commits intoSep 24, 2026
Merged
Conversation
…nto the retry When several ids exceed the budget, admit every omitted node's fact before any source prefix spends the budget, so later nodes are not silently dropped. The suggested retry budget is sized for the current --max-source-lines, so a non-default cap is now included in the suggested command.
Collaborator
|
Thanks @iveteamorim! I pushed a small follow-up commit (every oversized id now keeps its fact, and the retry suggestion keeps --max-source-lines). Merging. |
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.
What
Fixes
mex graph get <id>when a matched node's full source does not fit within the output budget.Instead of dropping the node and reporting
no-match,graph getnow:status: "partial"withtruncated: true--max-output-tokensvalue calculated to retrieve the full sourceSuccessful source-backed
graph getresponses are unchanged.Why
Fixes #230.
Previously, a node could exist and be matched while its source record exceeded the output budget. The source would be omitted,
returnedNodeswould fall to zero, and the summary would incorrectly reportstatus: "no-match".That makes a budget limitation indistinguishable from a missing node.
Type of change
Testing
partial, notno-matchprotocol-v3-golden.test.ts: 4/4 passednpm run typecheck: passednpm run build: passedgit diff --check: passedExisting successful
graph getprotocol goldens remain unchanged.