Skip to content

feat(extension): manifest-less lfx.bundles discovery + precedence tier#13563

Draft
erichare wants to merge 2 commits into
release-1.11.0from
bundles/foundation-discovery
Draft

feat(extension): manifest-less lfx.bundles discovery + precedence tier#13563
erichare wants to merge 2 commits into
release-1.11.0from
bundles/foundation-discovery

Conversation

@erichare

@erichare erichare commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Bundle Separation Phase A — PR 1: foundation

Part of Bundle Separation Phase A — metapackage split (1.11) (follow-on to LE-905). lfx becomes engine-only; the ~78-provider long tail collapses into one manifest-less lfx-bundles metapackage discovered via a new lfx.bundles entry-point; ~5 partners graduate to standalone lfx-<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.bundles discovery path + a new precedence tier, extending the existing extension/bundle discovery (not rewriting it).

  • New src/lfx/src/lfx/extension/loader/_bundles_root.py::load_lfx_bundles_extensions — iterates the lfx.bundles setuptools entry-point group, resolves each declared package via find_spec, folder-walks its immediate subdirectories, and registers each as a bundle at the @official slot with no extension.json (the langchain-community model). Mirrors the existing discover_inline_bundles manifest-less walk and reuses _load_bundle_directory.
  • Discovery precedence is now installed > seed > lfx_bundles > dev > inline (_DISCOVERY_PRECEDENCE in interface/components.py). Manifest always wins, so a manifest-shipping lfx-<provider> shadows the same-named provider in the metapackage with a typed bundle-shadowed warning — this is what lets a provider graduate with no lockstep release.
  • New bundle-discovery-malformed error 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.

Test plan

  • 10 new unit tests in test_load_lfx_bundles.py (discovery + @official registration, invalid-name + malformed-declaration warnings, manifest-shadows-manifestless via _resolve_bundle_shadowing)
  • Full extension unit suite green (449 passed) — incl. test_components_cache_integration which exercises the rewired import_extension_components
  • ruff + ruff format clean; mypy clean on the new module

Stack (merge bottom-up)

  1. bundles/foundation-discoveryfeat/bundle-metapackage-split ← this PR
  2. bundles/create-lfx-bundlesbundles/foundation-discovery (skeleton)
  3. bundles/lfx-engine-onlybundles/create-lfx-bundles (engine-only)

Merges into the integration branch feat/bundle-metapackage-split; the tracking/meta PR to release-1.10.0 opens once the stack lands. Draft until QA signs off on this ticket.

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

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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: abbadb89-ef15-49f3-a352-49eccd5dff38

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/foundation-discovery

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 enhancement New feature or request and removed enhancement New feature or request labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant