fix: surface summarize/retrieve failures instead of masking them#160
Open
fancyboi999 wants to merge 1 commit intoagentscope-ai:mainfrom
Open
fix: surface summarize/retrieve failures instead of masking them#160fancyboi999 wants to merge 1 commit intoagentscope-ai:mainfrom
fancyboi999 wants to merge 1 commit intoagentscope-ai:mainfrom
Conversation
|
|
Member
|
@fancyboi999 |
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
summarize_memory()andretrieve_memory()fail loudly instead of masking inner errors with a secondaryTypeErrorRoot cause
BaseOp.call()returns a stringified error on the final retry whenraise_exception=False.Both
summarize_memory()andretrieve_memory()then assumed the result was always a dict and accessedresult["answer"]unconditionally.That created two problems:
TypeError: string indices must be integers, not 'str'return_dict=Truewas not a reliable workaround because the failure path could still return a stringWhat changed
ReMeto validate memory API results before unwrapping themRuntimeErrorif these APIs are called beforeawait reme.start()raise_exception=Truefor the agents and tools created inside the summarize/retrieve flows so inner failures surface directlyValidation
python3 -m py_compile reme/reme.pysummarize_memory()/retrieve_memory()beforestart()now raises a clearRuntimeErrorReMeSummarizer/ReMeRetrievernow surface as the originalRuntimeErrorinstead of being re-wrapped asTypeErrorCloses #156