fix(bundles): stack-review fixes — symlink containment, idempotency, docs accuracy#13579
Draft
erichare wants to merge 10 commits into
Draft
fix(bundles): stack-review fixes — symlink containment, idempotency, docs accuracy#13579erichare wants to merge 10 commits into
erichare wants to merge 10 commits into
Conversation
…ccuracy Fixes from the multi-agent stack review (kept as a separate PR so the reviewed PRs' diffs stay frozen for QA's independent pass): - _bundles_root.py: directory-level symlink containment — a provider dir that resolves outside the bundle root is skipped with a typed bundle-discovery-malformed warning, mirroring the seed-directory walk's is_within rule (+ regression test). Anchors the trust boundary to the installed package tree. - consolidate_bundles.py: migration-append idempotency guard — entries are deduped on full content so a partially-failed earlier run cannot duplicate rows on re-run (table stays append-only). - langflow-base pyproject: documented WHY the aws extra is deliberately retained after the lfx-amazon graduation (boto3 also backs the server's own S3 storage backend and lfx's S3 ingestion — review suggested removing it; that would regress S3 storage support). - extensions-overview.mdx: note that `lfx extension list` shows manifest-shipping extensions only; manifest-less packages load at startup but are not listed. 93 loader+migration tests pass (incl. the new symlink test); ruff clean.
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 comment has been minimized.
This comment has been minimized.
The lazy-import helper that bundle packages call from their __getattr__-based __init__.py files lived at lfx.components._importing -- an internal path with no stability contract, imported by 35 separately-installed bundle __init__ files (30 lfx-bundles providers + the 5 graduated partners). - canonical home is now lfx.utils.lazy_import.import_mod (code unchanged); lfx.components._importing re-exports it so in-tree callers and any external code on the old path keep working - all 35 bundle-side imports rewritten to the stable path - BUNDLE_API.md: surface table entry + changelog (additive) - contract tests: re-export identity, both call forms, the AttributeError conversion Verified: identity holds across both paths; lazy __init__ loads work through the new path for both bundle families; 110 tests pass; ruff clean.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…13580) 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).
This comment has been minimized.
This comment has been minimized.
Risk-2 of the metapackage split: the generated `all` extra and the per-provider extras must never drift by hand-edit, or `pip install langflow` silently loses a provider's deps. Guard the four invariants: extras <-> provider dirs (PEP 685-normalized), `all` == the exact self-ref set, normalized keys collision-free, and the metapackage provider set disjoint from the graduated partner distributions.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
# Conflicts: # BUNDLE_API.md
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…tching the documented contract The lfx.bundles provider containment check (stack-review symlink fix) emitted bundle-discovery-malformed, whose template and hint describe a broken entry-point declaration. The changelog's path-safety entry already documents symlink escapes as path-escape on every other discovery path; use the same code here. Also resolves the semantic merge conflict with the per-mode code split (the removed _malformed_error location kwarg).
Contributor
|
Build successful! ✅ |
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 — review fixes
Fixes accepted from the internal multi-agent review of the 10-PR stack, kept as a separate PR so the reviewed PRs' diffs stay frozen for QA's independent pass.
_bundles_root.pysymlink containment (review: MEDIUM/security): a provider directory symlinked outside the bundle root is now skipped with a typedbundle-discovery-malformedwarning, mirroring the seed-directory walk'sis_withinrule. + regression test.consolidate_bundles.pyidempotency guard (review: MEDIUM): migration appends dedupe on full entry content, so a partially-failed run can't duplicate rows on re-run.langflow-baseawsextra documented as deliberately retained (review suggested removing it for consistency with openai/anthropic/cohere — verification showed that would regress the server's own S3 storage backend, which also uses boto3).lfx extension listshows manifest-shipping extensions only; manifest-less packages load at startup but aren't listed.Sibling review fixes landed directly on their leaf branches: cross-bundle smoke extras-tolerance + schedule grid + concurrency (
bundles/ci-matrix→ #13566), freeze-gate__init__.pyrequirement (bundles/freeze-gate→ #13567).93 loader+migration tests pass (incl. the new symlink test); ruff clean. Base
bundles/docs(PR 10) — the stack's final link.Follow-up commits (post-review, user-requested)
release-1.11.0base merged through the entire stack (all 11 branches): the component index now carries version 1.11.0 (regenerated at each index-bearing branch: 285 comps on bulk-move, 265 on graduate-partners and up),uv.lockregenerated at every lock-bearing branch (PR 3's anticipated merge conflict is resolved), and all 10 bundlelfxfloors re-synced to>=1.11.0,<2.0.0to match the base's pilot re-floor.sync_bundle_lfx_pin.pybug fix (found during the re-floor): the whole-text first-match rewrite hit the lfx-pin example inside a comment that theport_bundle.pytemplate places above the deps block — updating the comment and leaving the real dep stale. Now line-aware (skips comments); verified idempotent across all 10 bundles.import_modstabilized as a public BUNDLE_API utility: canonical homelfx.utils.lazy_import(BUNDLE_API.md surface + changelog entry);lfx.components._importingre-exports for back-compat; all 35 bundle-side imports rewritten; contract tests added.Tip battery: index v1.11.0/265 comps sha-valid; 45 metapackage bundles + 5 partners disjoint, no errors; shims + both import paths verified; 561 extension/shim/lazy-import tests pass;
lfx=langflow=1.11.0.