Skip to content

fix(bundles): tombstone the broken legacy ZepChatMemory build method#13580

Merged
erichare merged 1 commit into
bundles/review-fixesfrom
bundles/zep-tombstone
Jun 10, 2026
Merged

fix(bundles): tombstone the broken legacy ZepChatMemory build method#13580
erichare merged 1 commit into
bundles/review-fixesfrom
bundles/zep-tombstone

Conversation

@erichare

@erichare erichare commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

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's zep extra pins zep-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 to pip install zep-python, which is already installed. (This predates the bundle move: identical code ships at src/lfx/src/lfx/components/zep/zep.py on release-1.11.0.)

The component is already legacy=True with replacement=["helpers.Memory"], so rather than hand-write a new integration against the 2.x SDK (the zep_python.langchain module no longer exists, and langchain-community's classic Zep history class also requires the removed v1 client), this tombstones it following the PythonCodeStructuredTool non-functional-stub precedent:

  • build_message_history now raises a clear RuntimeError pointing at the Message History component (the designated replacement) instead of the misleading install hint. Deliberately not an ImportError, so nothing can misread it as a missing-dependency condition.
  • Flow identity preserved: class/component name, display_name, description, inputs, the memory output wiring, and the -> Memory annotation (drives frontend output typing) are byte-identical — saved flows keep loading, i18n locale keys are unchanged, and migration_table.json needs no edits (append-only contract).
  • Deterministic failure mode: the stub imports no zep_python at all, so behavior doesn't depend on which SDK version happens to be installed.
  • New bundle tests pin the stub contract (src/bundles/lfx-bundles/tests/test_zep_component.py): frontend identity + output wiring, the actionable error (matches "no longer functions", names Message History, asserts no pip install hint and not an ImportError), and an AST check that no zep_python import 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 (like glean/tavily) via consolidate_bundles.py in a follow-up.

Base bundles/review-fixes (#13579) — stacks on top of the Phase A chain.

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).
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release-.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ffcd3add-ec7a-4a04-99e9-e6fc6f1823b3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bundles/zep-tombstone

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the bug Something isn't working label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 43%
43.28% (57619/133123) 69.21% (7828/11310) 41.49% (1291/3111)

Unit Test Results

Tests Skipped Failures Errors Time
4940 0 💤 0 ❌ 0 🔥 11m 26s ⏱️

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (bundles/review-fixes@44c0bc9). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             bundles/review-fixes   #13580   +/-   ##
=======================================================
  Coverage                        ?   58.34%           
=======================================================
  Files                           ?     2290           
  Lines                           ?   219837           
  Branches                        ?    34181           
=======================================================
  Hits                            ?   128260           
  Misses                          ?    90119           
  Partials                        ?     1458           
Flag Coverage Δ
frontend 57.61% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erichare erichare merged commit e0b20c6 into bundles/review-fixes Jun 10, 2026
101 of 117 checks passed
@erichare erichare deleted the bundles/zep-tombstone branch June 10, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant