Turn async accessor methods to sync properties for provider attributes#256
Turn async accessor methods to sync properties for provider attributes#256gvanrossum-ms wants to merge 3 commits intomicrosoft:mainfrom
Conversation
|
Hey Guido, would you mind splitting the AGENTS.md changes into a separate PR? Keeps the sync properties refactor easy to review on its own. |
KRRT7
left a comment
There was a problem hiding this comment.
Sync properties refactor looks good — none of the old async getters were doing actual async work, so @property is more honest and Pythonic.
Two things worth noting in the PR description:
-
The sqlite provider's old
get_conversation_threads()was creating a newConversationThreadsinstance on every call (with a lazy import). Now it creates one in__init__and returns the same instance. That's a behavioral change / bug fix — you'd lose thread state between calls before. -
term_to_semantic_ref_indexwas renamed tosemantic_ref_indexon the sqlite provider to match the interface. Minor but worth calling out.
Just ignore AGENTS.md.
It's a bugfix, but it doesn't actually change behavior -- there's only one non-test call site, in ConversationSecondaryIndexes.create(), which sets self.threads and then that attribute is used elsewhere. (It's a bug, because the memory provider doesn't create a new one -- and that provider is the original one.) On top of that, I don't think the actual ingest and query algorithms even uses the threads attribute. At least the new version is consistent. :-)
It's a bit awkward: the class is I don't believe any action is necessary, but I'll wait for approval from @bmerkle so I don't have to cheat to merge it myself. |
|
hey, great work. LGTM. no additional feedback from my side. |
Plus some changes to AGENTS.md -- I want to start using worktrees (so we can do multiple projects in parallel), but the agent got confused and was looking in all the wrong places (so we added more hints to AGENTS.md).