fix(bundles): tombstone the broken legacy ZepChatMemory build method#13580
Conversation
build_message_history targeted the zep-python v1 SDK (ZepClient + zep_python.langchain.ZepChatMessageHistory); both were removed in zep-python 2.x and the zep extra pins 2.0.2, so the method has been unable to run for as long as the pin has existed -- its ImportError guard misleadingly told users to 'pip install zep-python' (already installed). The component is legacy=True with helpers.Memory as its designated replacement, so rather than hand-write a new integration against the 2.x SDK, the method now raises a clear RuntimeError pointing at the Message History component. Flow identity is preserved: class/component name, display_name, description, inputs and the memory output are byte-identical, so saved flows keep loading, i18n locale keys are unchanged, and migration_table.json needs no edits. New bundle tests pin the stub contract (identity, actionable error, no zep_python import).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## bundles/review-fixes #13580 +/- ##
=======================================================
Coverage ? 58.34%
=======================================================
Files ? 2290
Lines ? 219837
Branches ? 34181
=======================================================
Hits ? 128260
Misses ? 90119
Partials ? 1458
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Bundle Separation Phase A — follow-up: tombstone the broken legacy Zep component
ZepChatMemory.build_message_history(the component's only action method) lazily imports the zep-python v1 API —ZepClient+zep_python.langchain.ZepChatMessageHistory. Both symbols were removed in zep-python 2.x, and the bundle'szepextra pinszep-python==2.0.2, so the method has been broken at runtime for as long as the pin has existed — and its ImportError guard misleadingly told users topip install zep-python, which is already installed. (This predates the bundle move: identical code ships atsrc/lfx/src/lfx/components/zep/zep.pyon release-1.11.0.)The component is already
legacy=Truewithreplacement=["helpers.Memory"], so rather than hand-write a new integration against the 2.x SDK (thezep_python.langchainmodule no longer exists, and langchain-community's classic Zep history class also requires the removed v1 client), this tombstones it following thePythonCodeStructuredToolnon-functional-stub precedent:build_message_historynow raises a clearRuntimeErrorpointing at the Message History component (the designated replacement) instead of the misleading install hint. Deliberately not anImportError, so nothing can misread it as a missing-dependency condition.display_name,description, inputs, thememoryoutput wiring, and the-> Memoryannotation (drives frontend output typing) are byte-identical — saved flows keep loading, i18n locale keys are unchanged, andmigration_table.jsonneeds no edits (append-only contract).zep_pythonat all, so behavior doesn't depend on which SDK version happens to be installed.src/bundles/lfx-bundles/tests/test_zep_component.py): frontend identity + output wiring, the actionable error (matches "no longer functions", names Message History, asserts nopip installhint and not an ImportError), and an AST check that nozep_pythonimport sneaks back in.3 new tests pass; the 117 shim/loader contract tests pass in the isolated lfx env; ruff clean. The now-vestigial
zep = ["zep-python==2.0.2"]extra is left in place — removing a published extra is a metadata-breaking change; it can be emptied (likeglean/tavily) viaconsolidate_bundles.pyin a follow-up.Base
bundles/review-fixes(#13579) — stacks on top of the Phase A chain.