feat(extension): manifest-less lfx.bundles discovery + precedence tier#13563
Draft
erichare wants to merge 2 commits into
Draft
feat(extension): manifest-less lfx.bundles discovery + precedence tier#13563erichare wants to merge 2 commits into
erichare wants to merge 2 commits into
Conversation
… tier Foundation for the bundle metapackage split (1.11). Adds a third @official-slot discovery source: a distribution declaring the [project.entry-points."lfx.bundles"] group ships a package whose immediate subdirectories are each a manifest-less bundle, folder-walked and registered at @official with no extension.json (the langchain-community model). - new loader/_bundles_root.py::load_lfx_bundles_extensions, mirroring discover_inline_bundles but sourcing roots from the lfx.bundles entry-point group via find_spec and reusing _load_bundle_directory - discovery precedence becomes installed > seed > lfx_bundles > dev > inline so a manifest-shipping lfx-<provider> always shadows the same-named provider in the metapackage (lets a provider graduate with no lockstep release), emitting the existing bundle-shadowed warning - new bundle-discovery-malformed warning code, emitted on warnings (never flips ok / aborts startup) for unresolvable declarations and invalid provider folder names - exported via loader/__init__ and the lfx.extension PEP-562 lazy surface 10 new tests in test_load_lfx_bundles.py; full extension unit suite (449) passes; ruff + format clean; mypy clean on the new module.
Contributor
|
Important Review skippedDraft detected. 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 |
This was referenced Jun 9, 2026
…ndation-discovery
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.
Bundle Separation Phase A — PR 1: foundation
Part of Bundle Separation Phase A — metapackage split (1.11) (follow-on to LE-905).
lfxbecomes engine-only; the ~78-provider long tail collapses into one manifest-lesslfx-bundlesmetapackage discovered via a newlfx.bundlesentry-point; ~5 partners graduate to standalonelfx-<provider>. Zero user-facing change. This PR is the foundation the rest of the stack builds on.What this does
Adds a manifest-less
lfx.bundlesdiscovery path + a new precedence tier, extending the existing extension/bundle discovery (not rewriting it).src/lfx/src/lfx/extension/loader/_bundles_root.py::load_lfx_bundles_extensions— iterates thelfx.bundlessetuptools entry-point group, resolves each declared package viafind_spec, folder-walks its immediate subdirectories, and registers each as a bundle at the@officialslot with noextension.json(the langchain-community model). Mirrors the existingdiscover_inline_bundlesmanifest-less walk and reuses_load_bundle_directory.installed > seed > lfx_bundles > dev > inline(_DISCOVERY_PRECEDENCEininterface/components.py). Manifest always wins, so a manifest-shippinglfx-<provider>shadows the same-named provider in the metapackage with a typedbundle-shadowedwarning — this is what lets a provider graduate with no lockstep release.bundle-discovery-malformederror code, emitted onwarnings(never flipsok/ aborts startup) for unresolvable declarations and invalid provider folder names.loader/__init__and thelfx.extensionPEP-562 lazy surface.Test plan
test_load_lfx_bundles.py(discovery +@officialregistration, invalid-name + malformed-declaration warnings, manifest-shadows-manifestless via_resolve_bundle_shadowing)test_components_cache_integrationwhich exercises the rewiredimport_extension_componentsStack (merge bottom-up)
bundles/foundation-discovery→feat/bundle-metapackage-split← this PRbundles/create-lfx-bundles→bundles/foundation-discovery(skeleton)bundles/lfx-engine-only→bundles/create-lfx-bundles(engine-only)Merges into the integration branch
feat/bundle-metapackage-split; the tracking/meta PR torelease-1.10.0opens once the stack lands. Draft until QA signs off on this ticket.