fix: wait for agent_case LanceDB visibility before skill extraction#286
Open
rendigua2025-gif wants to merge 1 commit into
Open
fix: wait for agent_case LanceDB visibility before skill extraction#286rendigua2025-gif wants to merge 1 commit into
rendigua2025-gif wants to merge 1 commit into
Conversation
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
Addresses #275.
SkillClusterUpdatedcan arrive before the correspondingagent_caseis visible through LanceDB. Previously,extract_agent_skillchecked LanceDB once, raised_CaseNotYetIndexedError, and could quickly consume OME retry budget during normal cascade/indexer lag.This PR adds a short bounded visibility wait inside
_load_target_casebefore raising the existing retry-class error.Scope
agent_case_repo.find_by_owner_entry(...)for a small bounded window._CaseNotYetIndexedErrorpath when the case is still not visible after the window.This is a low-risk mitigation, not a full architectural fix. If LanceDB visibility lag exceeds the short wait window, OME retry still handles the delayed dependency. A deeper fix could emit
SkillClusterUpdatedonly after confirmed case index visibility, carry enough case data in the event payload, or model dependency-not-ready as delayed scheduling.Tests
tests/unit/test_memory/test_strategies/test_extract_agent_skill.pytests/integration/test_ome_strategies_integration.py -k test_skill_chain_e2eNote: I verified locally on Windows with a test-process-only
fcntlstub because the current repository still imports POSIXfcntlduring test collection on Windows.