Skip to content

Conversation

@dexters1
Copy link
Collaborator

Description

Vector URL fix, MCP Fix

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Other (please specify):

Changes Made

Testing

Screenshots/Videos (if applicable)

Pre-submission Checklist

  • I have tested my changes thoroughly before submitting this PR
  • This PR contains minimal changes necessary to address the issue/feature
  • My code follows the project's coding standards and style guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if applicable)
  • All new and existing tests pass
  • I have searched existing PRs to ensure this change hasn't been submitted already
  • I have linked any relevant issues in the description
  • My commits have clear and descriptive messages

Related Issues

Additional Notes

DCO Affirmation

I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.

dexters1 and others added 5 commits September 12, 2025 12:39
<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
@pull-checklist
Copy link

Please make sure all the checkboxes are checked:

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have added end-to-end and unit tests (if applicable).
  • I have updated the documentation and README.md file (if necessary).
  • I have removed unnecessary code and debug statements.
  • PR title is clear and follows the convention.
  • I have tagged reviewers or team members for feedback.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Walkthrough

Multiple backend and frontend fixes: vector DB path validation now only defaults when URL is empty; SQLAlchemy AsyncEngine pool sizing increased for non-SQLite; several frontend UI async flows and Notebook API/behavior changes; assorted typing, async-loop, and retriever return-type adjustments.

Changes

Cohort / File(s) Change summary
Vector DB config path handling
cognee/infrastructure/databases/vector/config.py
validate_paths now assigns the default DB path only when vector_db_url is empty; if non-empty, existing local paths are converted to absolute while non-local URLs or non-existent paths are left unchanged. No other helpers changed.
SQLAlchemy pool sizing
cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py
For non-SQLite AsyncEngine, increased pool_size 5→20 and max_overflow 10→20; other pool options and SQLite handling unchanged.
Frontend — Add data & loading UI
cognee-frontend/src/app/dashboard/AddDataToCognee.tsx, cognee-frontend/src/ui/App/Loading/DefaultLoadingIndicator/LoadingIndicator.tsx, .../LoadingIndicator.module.css
Added LoadingIndicator usage and spinner in submit button; defer clearing selected files until cognifyDataset completes; LoadingIndicator accepts color prop and uses classNames; small CSS fix and increased border specificity.
Frontend — Notebook API & behavior
cognee-frontend/src/ui/elements/Notebook/Notebook.tsx, .../NotebookCellHeader.tsx, src/app/dashboard/Dashboard.tsx, src/app/dashboard/NotebooksAccordion.tsx, src/app/dashboard/InstanceDatasetsAccordion.tsx
Removed saveNotebook prop and beforeunload autosave behavior from Notebook; ensure first cell opens when created; dataset list rendering adjusted; Notebook removal and related state clearing moved into promise finalization chains (wait for async ops); cognee instance selection replaced by static cloud/local indicator; some effect dependency arrays simplified.
Frontend — Dashboard flow tweaks
cognee-frontend/src/app/dashboard/AddDataToCognee.tsx, cognee-frontend/src/app/dashboard/Dashboard.tsx
Defer state clearing until async ops resolve; Dashboard waits for notebook removal promise before clearing selection; Notebook saveNotebook prop removed from usage.
Async/Sync utilities & sandbox
cognee/infrastructure/utils/run_async.py, cognee/infrastructure/utils/run_sync.py, cognee/modules/notebooks/operations/run_in_local_sandbox.py
Unified loop handling and signature-aware run_async; run_sync adds optional running_loop parameter; run_in_local_sandbox gains optional loop param and exposes it to the executed environment, adjusting wrapper to set event loop before execution.
DB/session and query fixes
cognee/api/v1/notebooks/routers/get_notebooks_router.py, cognee/modules/notebooks/methods/get_notebook.py, cognee/modules/notebooks/methods/update_notebook.py
get_notebooks endpoint now opens an async session and passes it to operations (signature changed to accept session); get_notebook where clause uses SQLAlchemy and_ instead of Python and; removed unused typing imports in update_notebook.
Retrieval return-type normalizations
cognee/modules/retrieval/graph_completion_context_extension_retriever.py, .../graph_completion_cot_retriever.py, .../graph_completion_retriever.py, .../temporal_retriever.py
Several retriever get_completion annotations changed from str/Any to List[str] to match implementations that return single-element lists.
Search result handling
cognee/modules/search/utils/prepare_search_result.py
Treats the first element as results (a list) rather than a single result; returns a single item when length==1, otherwise returns the list; graph transformation adjusted accordingly.
Misc — imports/typing/cleanup
cognee/modules/retrieval/user_qa_feedback.py
Removed unused Any typing import.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as AddDataToCognee UI
  participant API as cognifyDataset API
  participant State as Frontend State

  User->>UI: Submit files
  UI->>State: setProcessing(true)
  UI->>API: cognifyDataset(payload)
  API-->>UI: success (dataset_id/name)
  UI->>State: then => setFilesForUpload(null)
  UI->>State: setProcessing(false)
Loading
sequenceDiagram
  autonumber
  actor User
  participant Dashboard
  participant NotebooksSvc as NotebookService (remove)
  participant UIState

  User->>Dashboard: removeNotebook(id)
  Dashboard->>NotebooksSvc: removeNotebook(id) (returns Promise)
  NotebooksSvc-->>Dashboard: resolves
  Dashboard->>UIState: .then => clear selection
  Dashboard->>UIState: .finally => clear notebookToRemove
Loading
sequenceDiagram
  autonumber
  actor Caller
  participant VC as VectorConfig.validate_paths
  participant FS as Filesystem

  Caller->>VC: validate_paths(values)
  alt values.vector_db_url is empty
    VC->>VC: set default path (system_root/databases/cognee.lancedb)
  else
    VC->>FS: stat/check path
    alt Path exists
      VC->>VC: convert to absolute path
    else
      VC->>VC: leave vector_db_url unchanged
    end
  end
  VC-->>Caller: return values
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • release: Dev #1389 — Changes to retriever implementations and get_completion return types appear similar (List[str] migration).
  • Merge main again #953 — Related edits touching vector DB config and context-aware vectordb handling.
  • fix: Dev #1372 — Prior adjustments to vector config path validation and defaulting logic.

Suggested reviewers

  • Vasilije1990

Pre-merge checks (2 warnings, 1 inconclusive)

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description currently only states "Vector URL fix, MCP Fix" and leaves the required template sections empty or unchecked (Changes Made, Testing, Type of Change, Pre-submission Checklist), so it lacks the human-written detail reviewers need to understand scope, intent, and verification steps. Populate the repository PR template with a clear, human-written Description that explains the intent and scope, mark the appropriate "Type of Change" checkbox, list the specific "Changes Made" (per-file or grouped by concern), describe how you tested the changes and include screenshots for UI edits if applicable, complete the Pre-submission Checklist, and link any related issues or PRs before requesting review.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.83% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The current title "Merge dev into main" is a generic merge label that does not describe the primary changes in this PR; the changeset contains targeted fixes (e.g., Vector DB URL/path handling, frontend Notebook and cognify flow changes, backend session/signature adjustments), so the title is too vague for reviewers scanning history. Replace the generic merge label with a concise, single-sentence title that highlights the most important change (for example: "Fix Vector DB URL handling and related notebook/cognify updates" or "Preserve provided vector_db_url; frontend MCP and Notebook API fixes"). Keep it short and focused on the primary intent of the PR so reviewers can quickly understand its purpose.

Poem

A hop, a tweak, a tidy trail,
Defaults wait where blanks prevail.
If a URL sings, we hear its tune,
If local, absolute by noon.
Carrots crunch—configs set sail! 🥕🐇

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cognee/infrastructure/databases/vector/config.py (1)

32-47: Broken Pydantic v2 validator signature: mode="after" must accept self and return self.

As written, this will raise a TypeError at model initialization and the logic won’t run. Update to an instance validator and adjust references.

Apply this diff:

-    @pydantic.model_validator(mode="after")
-    def validate_paths(cls, values):
+    @pydantic.model_validator(mode="after")
+    def validate_paths(self):
-        base_config = get_base_config()
+        base_config = get_base_config()
-        if values.vector_db_url and Path(values.vector_db_url).exists():
+        if self.vector_db_url and Path(self.vector_db_url).exists():
             # Relative path to absolute
-            values.vector_db_url = ensure_absolute_path(
-                values.vector_db_url,
-            )
-        elif not values.vector_db_url:
+            self.vector_db_url = ensure_absolute_path(
+                self.vector_db_url,
+            )
+        elif not self.vector_db_url:
             # Default path
             databases_directory_path = os.path.join(base_config.system_root_directory, "databases")
-            values.vector_db_url = os.path.join(databases_directory_path, "cognee.lancedb")
+            self.vector_db_url = os.path.join(databases_directory_path, "cognee.lancedb")
-
-        return values
+        return self
🧹 Nitpick comments (4)
cognee/infrastructure/databases/vector/config.py (4)

42-42: Treat whitespace-only values as empty.

Currently " " skips the default branch. Trim first.

-        elif not self.vector_db_url:
+        elif not (self.vector_db_url or "").strip():

36-41: Prefer URL-scheme detection over Path.exists() to classify URLs vs local paths.

exists() misses non-existent local paths you still want resolved absolute; schemes like http/https/sqlite/etc. should bypass resolution.

Diff within this block:

-        if self.vector_db_url and Path(self.vector_db_url).exists():
+        parsed = urlparse(self.vector_db_url) if self.vector_db_url else None
+        if self.vector_db_url and (parsed and parsed.scheme and parsed.scheme != "file"):
+            # URL provided; leave as-is
+            pass
+        elif self.vector_db_url:
             # Relative path to absolute
             self.vector_db_url = ensure_absolute_path(
                 self.vector_db_url,
             )

Add import (outside this hunk):

from urllib.parse import urlparse

49-63: Use model_dump() instead of maintaining a manual to_dict.

Reduces drift if fields change and supports exclude/aliases.

-    def to_dict(self) -> dict:
+    def to_dict(self) -> dict:
         """
         Convert the configuration settings to a dictionary.
         """
-        return {
-            "vector_db_url": self.vector_db_url,
-            "vector_db_port": self.vector_db_port,
-            "vector_db_key": self.vector_db_key,
-            "vector_db_provider": self.vector_db_provider,
-        }
+        return self.model_dump()

66-82: LRU-cached settings won’t reflect env changes at runtime.

If you expect dynamic env updates (tests, workers), consider documenting or exposing cache clearing.

Minimal option:

-@lru_cache
+@lru_cache(maxsize=1)
 def get_vectordb_config():

And expose a helper:

def clear_vectordb_config_cache():
    get_vectordb_config.cache_clear()
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c69f0b and 9cd739b.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !**/*.toml
📒 Files selected for processing (1)
  • cognee/infrastructure/databases/vector/config.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (547)
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Notebook Tests / Cognee Multimedia Notebook / test
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Vector DB Tests / PostgreSQL Tests
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on windows-latest
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Multimedia Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Notebook Tests / Cognee Multimedia Notebook / test
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Vector DB Tests / PostgreSQL Tests
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-13
  • GitHub Check: MCP Tests / Run MCP Test
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on windows-latest
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Multimedia Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Notebook Tests / Cognee Multimedia Notebook / test
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Vector DB Tests / PostgreSQL Tests
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-13
  • GitHub Check: MCP Tests / Run MCP Test
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on windows-latest
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Multimedia Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Notebook Tests / Cognee Multimedia Notebook / test
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Vector DB Tests / PostgreSQL Tests
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-13
  • GitHub Check: MCP Tests / Run MCP Test
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on windows-latest
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Multimedia Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Kuzu Tests
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Notebook Tests / Cognee Multimedia Notebook / test
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Vector DB Tests / PostgreSQL Tests
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-13
  • GitHub Check: MCP Tests / Run MCP Test
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on windows-latest
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Multimedia Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Kuzu Tests
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-15
  • GitHub Check: Notebook Tests / Cognee Multimedia Notebook / test
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Soft Delete test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Hard Delete test 3.10.x on ubuntu-22.04
  • GitHub Check: Vector DB Tests / PostgreSQL Tests
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-13
  • GitHub Check: MCP Tests / Run MCP Test
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Dynamic Steps Example
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Library test 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Library test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Build test 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on windows-latest
  • GitHub Check: Example Tests / Run Memify Example
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Build test 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Unit tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-13
  • GitHub Check: Operating System and Python Tests / Unit tests 3.10.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on windows-latest
  • GitHub Check: Operating System and Python Tests / Integration tests 3.12.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.11.x on ubuntu-22.04
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-13
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on macos-15
  • GitHub Check: Operating System and Python Tests / Integration tests 3.10.x on ubuntu-22.04
  • GitHub Check: Example Tests / Run Descriptive Metrics Example
  • GitHub Check: Example Tests / Run Multimedia Example
  • GitHub Check: Example Tests / Run Eval Example
  • GitHub Check: OpenRouter Tests / Run OpenRouter Test
  • GitHub Check: Gemini Tests / Run Gemini Test
  • GitHub Check: S3 File Storage Test / Run S3 File Storage Test
  • GitHub Check: Docker Compose Test / docker-compose-test
  • GitHub Check: Docker CI test / Build Cognee Backend Docker App Image
  • GitHub Check: Graph Database Tests / Kuzu Tests
  • GitHub Check: Graph Database Tests / Neo4j Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
🔇 Additional comments (2)
cognee/infrastructure/databases/vector/config.py (2)

42-46: Good fix: avoid clobbering provided non-empty vector_db_url.

This change prevents overriding valid URLs or intentional non-existent paths with the default, aligning with the PR goal.


84-90: Incorrect — ContextVar has default=None; no LookupError risk.

cognee/context_global_variables.py defines vector_db_config = ContextVar("vector_db_config", default=None), so vector_db_config.get() will return None rather than raise; no change required. Optional micro-refactor to avoid calling .get() twice:

-    if vector_db_config.get():
-        return vector_db_config.get()
+    value = vector_db_config.get(None)
+    if value:
+        return value

Likely an incorrect or invalid review comment.

<!-- .github/pull_request_template.md -->

## Description
Increase default postgres connection pool 

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py (1)

397-415: Fix SQL injection surface and broken IN-parameter binding in get_data

  • Table name is interpolated into text SQL without validation → injection risk.
  • For IN clauses, placeholders :key0,:key1... are created but the params dict isn’t built, so bindings will fail.

Apply:

-        async with self.engine.begin() as connection:
-            query = f'SELECT * FROM "{table_name}"'
-            if filters:
-                filter_conditions = " AND ".join(
-                    [
-                        f"{key} IN ({', '.join([f':{key}{i}' for i in range(len(value))])})"
-                        if isinstance(value, list)
-                        else f"{key} = :{key}"
-                        for key, value in filters.items()
-                    ]
-                )
-                query += f" WHERE {filter_conditions};"
-                query = text(query)
-                results = await connection.execute(query, filters)
-            else:
-                query += ";"
-                query = text(query)
-                results = await connection.execute(query)
-            return {result["data_id"]: result["status"] for result in results}
+        async with self.get_async_session() as session:
+            # Validate identifier and use SQLAlchemy Core to avoid injection
+            if not table_name.isidentifier():
+                raise ValueError("Invalid table name")
+            if self.engine.dialect.name == "sqlite":
+                table = await self.get_table(table_name)
+            else:
+                table = await self.get_table(table_name, "public")
+
+            stmt = select(table)
+            if filters:
+                conditions = []
+                for key, value in filters.items():
+                    if key not in table.c:
+                        raise ValueError(f"Invalid column: {key}")
+                    col = table.c[key]
+                    conditions.append(col.in_(value) if isinstance(value, list) else (col == value))
+                if conditions:
+                    stmt = stmt.where(*conditions)
+
+            result = await session.execute(stmt)
+            return {row["data_id"]: row["status"] for row in result.mappings()}
🧹 Nitpick comments (2)
cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py (2)

98-107: get_session is a generator, not a context manager — add @contextmanager

Without @contextmanager, callers can’t use with adapter.get_session(): safely.

Apply within this block:

-    def get_session(self):
+    @contextmanager
+    def get_session(self):
         """
         Provide a context manager for obtaining a database session.
         """
         session_maker = self.sessionmaker
         with session_maker() as session:
             try:
                 yield session
             finally:
                 session.close()  # Ensure the session is closed

Also update imports near the top:

from contextlib import asynccontextmanager, contextmanager

59-66: Make pool sizing configurable to avoid exhausting DB connections

Replace the hard-coded pool_size/max_overflow with env-configurable values (ensure import os exists). Apply:

             self.engine = create_async_engine(
                 connection_string,
-                pool_size=20,
-                max_overflow=20,
+                pool_size=int(os.getenv("SQLALCHEMY_POOL_SIZE", "20")),
+                max_overflow=int(os.getenv("SQLALCHEMY_MAX_OVERFLOW", "20")),
                 pool_recycle=280,
                 pool_pre_ping=True,
                 pool_timeout=280,
             )

Also found create_async_engine(self.db_uri) in cognee/infrastructure/databases/vector/pgvector/PGVectorAdapter.py — consider aligning that usage for consistency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9cd739b and e958ee8.

📒 Files selected for processing (1)
  • cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
  • GitHub Check: Basic Tests / Run Simple Examples BAML
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
  • GitHub Check: End-to-End Tests / S3 Bucket Test
  • GitHub Check: End-to-End Tests / Deduplication Test
  • GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
  • GitHub Check: End-to-End Tests / Server Start Test
  • GitHub Check: CLI Tests / CLI Functionality Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: Basic Tests / Run Simple Examples
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: Basic Tests / Run Simple Examples BAML
  • GitHub Check: End-to-End Tests / S3 Bucket Test
  • GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
  • GitHub Check: End-to-End Tests / Server Start Test
  • GitHub Check: End-to-End Tests / Deduplication Test
  • GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test

<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
@borisarzentar borisarzentar changed the title MCP script fix Merge dev into main Sep 12, 2025
@borisarzentar borisarzentar merged commit 288218b into main Sep 12, 2025
233 of 238 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
cognee/modules/retrieval/temporal_retriever.py (3)

113-127: Infinite recursion in get_context() fallback paths

self.get_context(query) calls itself in both fallback branches, causing unbounded recursion. Use the parent implementation to fetch triplets, then resolve to text.

-            triplets = await self.get_context(query)
+            triplets = await super().get_context(query)
             return await self.resolve_edges_to_text(triplets)
...
-            triplets = await self.get_context(query)
+            triplets = await super().get_context(query)
             return await self.resolve_edges_to_text(triplets)

85-96: Guard against empty relevant_events to avoid IndexError

relevant_events[0]["events"] will crash if relevant_events is empty or missing keys. Add a defensive check.

-        for event in relevant_events[0]["events"]:
+        if not relevant_events or "events" not in relevant_events[0]:
+            return []
+        for event in relevant_events[0]["events"]:

139-152: completion may be undefined; handle empty context early

If context resolves to an empty string, completion is never set, leading to an UnboundLocalError. Return [] when there’s no usable context.

-    async def get_completion(self, query: str, context: Optional[str] = None) -> List[str]:
+    async def get_completion(self, query: str, context: Optional[str] = None) -> List[str]:
         """Generates a response using the query and optional context."""
-        if not context:
-            context = await self.get_context(query=query)
-
-        if context:
-            completion = await generate_completion(
+        if not context:
+            context = await self.get_context(query=query)
+        if not context:
+            return []
+        completion = await generate_completion(
                 query=query,
                 context=context,
                 user_prompt_path=self.user_prompt_path,
                 system_prompt_path=self.system_prompt_path,
-            )
-
-        return [completion]
+            )
+        return [completion]
cognee/modules/retrieval/graph_completion_retriever.py (1)

138-175: Change BaseGraphRetriever.get_completion return type to Sequence[str] and align implementations/callers

BaseGraphRetriever currently annotates get_completion(...) -> str while multiple graph retrievers and tests return/List expect List[str]. Update the base interface to return Sequence[str] (or List[str]), update implementers, and verify all call sites handle a sequence.

  • Fix interface: cognee/modules/retrieval/base_graph_retriever.py (async def get_completion -> change return type from str to Sequence[str]/List[str]).
  • Implementers to align/verify: cognee/modules/retrieval/graph_completion_retriever.py, graph_completion_cot_retriever.py, graph_completion_context_extension_retriever.py, temporal_retriever.py, EntityCompletionRetriever.py.
  • Call sites/tests to verify behavior: evals/src/qa/qa_benchmark_cognee.py, cognee/eval_framework/answer_generation/answer_generation_executor.py, cognee/modules/search/methods/search.py (and no_access_control_search.py), and unit tests under cognee/tests/unit/modules/retrieval/* that assert list results.
🧹 Nitpick comments (16)
cognee/infrastructure/utils/run_sync.py (1)

14-15: Consider potential race condition with loop assignment.

The running_loop variable is modified within the thread (line 15) and then used immediately (line 17). While this works in the current implementation, if the running_loop parameter is passed from outside and shared across multiple threads, there could be subtle race conditions.

Consider using a local variable to avoid modifying the parameter:

-                if not running_loop:
-                    running_loop = asyncio.get_running_loop()
+                loop_to_use = running_loop or asyncio.get_running_loop()

-                result = asyncio.run_coroutine_threadsafe(coro, running_loop).result(timeout)
+                result = asyncio.run_coroutine_threadsafe(coro, loop_to_use).result(timeout)
cognee/modules/notebooks/operations/run_in_local_sandbox.py (2)

7-16: Verify the order of operations in async handler.

The generated code sets the event loop before importing run_sync. While this should work, it would be safer to import the module first to ensure all dependencies are loaded before manipulating the event loop.

Consider reordering the imports:

-        "import asyncio\n"
-        + "asyncio.set_event_loop(running_loop)\n\n"
-        + "from cognee.infrastructure.utils.run_sync import run_sync\n\n"
+        "import asyncio\n"
+        + "from cognee.infrastructure.utils.run_sync import run_sync\n\n"
+        + "asyncio.set_event_loop(running_loop)\n\n"

50-58: Test code should be updated to demonstrate the new loop parameter.

The test in __main__ doesn't utilize the new loop parameter. Consider updating it to demonstrate the new functionality or add a comment explaining why it's not needed.

Consider updating the test to show the new functionality:

 if __name__ == "__main__":
+    import asyncio
+    loop = asyncio.new_event_loop()
     run_in_local_sandbox("""
 import cognee
 
 await cognee.add("Test file with some random content 3.")
 
 a = "asd"
 
 b = {"c": "dfgh"}
-""")
+""", loop=loop)
cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx (2)

39-39: useEffect deps: remove unused setter to avoid unnecessary re-renders

The effect only uses setLocalCogneeConnected; setCloudCogneeConnected in the deps is unused and can cause gratuitous reruns.

-  }, [setCloudCogneeConnected, setLocalCogneeConnected]);
+  }, [setLocalCogneeConnected]);

117-124: Treat API key as a secret and avoid unsafe event.currentTarget access

  • Use type="password" and disable autocomplete.
  • Prefer FormData over property access to avoid TS indexing on currentTarget.
-              <Input name="apiKey" type="text" placeholder="cloud API key" required />
+              <Input
+                name="apiKey"
+                type="password"
+                autoComplete="off"
+                placeholder="cloud API key"
+                required
+              />

And in the handler:

-    const apiKeyValue = event.currentTarget.apiKey.value;
+    const apiKeyValue = new FormData(event.currentTarget).get("apiKey") as string;
cognee-frontend/src/ui/App/Loading/DefaultLoadingIndicator/LoadingIndicator.module.css (1)

6-8: LGTM; avoid overusing !important unless fighting utility classes

Fix looks good. If this is to override Tailwind utilities, consider a higher-specificity selector or CSS var to reduce reliance on !important.

cognee/modules/notebooks/methods/get_notebook.py (1)

18-21: Correct SQL composition; prefer scalar_one_or_none() for clarity

Good switch to select(...).where(and_(...)). To align with SQLAlchemy 2.x best practices and avoid subtle result-shape issues, return with scalar_one_or_none() (or scalars().first()).

-    return result.scalar()
+    return result.scalar_one_or_none()
cognee/modules/retrieval/graph_completion_retriever.py (2)

121-129: Docstring says str, but function returns List[Edge]

get_context docstring claims a string; actual return is a list of Edge. Update docstring to avoid confusion.


149-153: Docstring return type still mentions Any

Adjust to List[str] to match the new signature and implementation (return [completion]).

cognee/modules/retrieval/graph_completion_context_extension_retriever.py (1)

99-101: Potential TypeError from list(set(triplets))

If Edge isn’t hashable, this will raise. Consider a uniqueness key (e.g., tuple of node IDs) instead of set.

cognee/modules/retrieval/graph_completion_cot_retriever.py (1)

96-98: Same set(triplets) concern as context-extension retriever

Ensure Edge is hashable or dedupe via a stable key to avoid runtime errors.

cognee-frontend/src/ui/elements/Notebook/NotebookCellHeader.tsx (1)

53-61: Static environment display replaces interactive selector.

The change from an interactive Select component to a static display aligns with the automatic environment detection. However, consider whether users should still have the ability to override the environment choice in certain scenarios.

If environment override capability is needed, consider adding a toggle or keeping the Select but with the environment-based default:

-        {isCloudEnvironment() ? (
-          <div>
-            cloud cognee
-          </div>
-        ) : (
-          <div>
-            local cognee
-          </div>
-        )}
+        <Select 
+          name="cogneeInstance" 
+          value={runInstance}
+          onChange={(event) => setRunInstance(event.currentTarget.value)} 
+          className="!bg-transparent outline-none cursor-pointer !hover:bg-gray-50"
+        >
+          <option value="local">local cognee</option>
+          <option value="cloud">cloud cognee</option>
+        </Select>
cognee-frontend/src/ui/elements/Notebook/Notebook.tsx (1)

34-36: Automatic cell opening improves initial user experience.

Automatically opening the first cell when creating an empty notebook ensures users can immediately start typing without additional clicks. The dependency array should only include notebook.cells.length for better optimization.

Consider optimizing the useEffect dependency:

-  }, [notebook, updateNotebook]);
+  }, [notebook.cells.length, updateNotebook]);
cognee/modules/search/utils/prepare_search_result.py (1)

37-37: Clarify precedence in ternary-or expression

Parentheses improve readability and avoid misreads around or vs if/else.

-        "result": result_graph or results[0] if len(results) == 1 else results,
+        "result": result_graph or (results[0] if len(results) == 1 else results),
cognee-frontend/src/app/dashboard/NotebooksAccordion.tsx (1)

55-61: Guard null, collapse finally chain, and handle errors

Avoid the non-null assertion, ensure ordered cleanup, and surface failures. Also consider disabling the Delete button while loading to prevent duplicate requests.

   const handleNotebookRemoveConfirm = () => {
-    notebookLoading();
-    removeNotebook(notebookToRemove!.id)
-      .finally(notebookLoaded)
-      .finally(closeRemoveNotebookModal)
-      .finally(() => setNotebookToRemove(null));
+    if (!notebookToRemove) return;
+    notebookLoading();
+    removeNotebook(notebookToRemove.id)
+      .catch(() => { /* TODO: show toast/error UI */ })
+      .finally(() => {
+        notebookLoaded();
+        closeRemoveNotebookModal();
+        setNotebookToRemove(null);
+      });
   };

Outside this hunk, consider:

  • Disabling the Delete button while loading:
    delete
cognee-frontend/src/ui/App/Loading/DefaultLoadingIndicator/LoadingIndicator.tsx (1)

4-5: Avoid emitting an invalid class and add typing

When color is empty, !border- is emitted. Guard it, and type the prop.

-export default function LoadingIndicator({ color = "" }) {
-  return <div className={classNames(styles.loadingIndicator, `!border-${color}`)} />
+export default function LoadingIndicator({ color = "" }: { color?: string }) {
+  return <div className={classNames(styles.loadingIndicator, color && `!border-${color}`)} />
}

If Tailwind isn’t safelisting the dynamic border-* classes you intend to use, switch to inline styles or a CSS variable:

export default function LoadingIndicator({ color = "" }: { color?: string }) {
  return <div className={styles.loadingIndicator} style={color ? { borderColor: color } : undefined} />;
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e958ee8 and c8a7fea.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !**/*.toml
📒 Files selected for processing (20)
  • cognee-frontend/src/app/dashboard/AddDataToCognee.tsx (4 hunks)
  • cognee-frontend/src/app/dashboard/Dashboard.tsx (1 hunks)
  • cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx (1 hunks)
  • cognee-frontend/src/app/dashboard/NotebooksAccordion.tsx (1 hunks)
  • cognee-frontend/src/ui/App/Loading/DefaultLoadingIndicator/LoadingIndicator.module.css (1 hunks)
  • cognee-frontend/src/ui/App/Loading/DefaultLoadingIndicator/LoadingIndicator.tsx (1 hunks)
  • cognee-frontend/src/ui/elements/Notebook/Notebook.tsx (4 hunks)
  • cognee-frontend/src/ui/elements/Notebook/NotebookCellHeader.tsx (3 hunks)
  • cognee/api/v1/notebooks/routers/get_notebooks_router.py (1 hunks)
  • cognee/infrastructure/utils/run_async.py (1 hunks)
  • cognee/infrastructure/utils/run_sync.py (1 hunks)
  • cognee/modules/notebooks/methods/get_notebook.py (2 hunks)
  • cognee/modules/notebooks/methods/update_notebook.py (0 hunks)
  • cognee/modules/notebooks/operations/run_in_local_sandbox.py (2 hunks)
  • cognee/modules/retrieval/graph_completion_context_extension_retriever.py (1 hunks)
  • cognee/modules/retrieval/graph_completion_cot_retriever.py (1 hunks)
  • cognee/modules/retrieval/graph_completion_retriever.py (1 hunks)
  • cognee/modules/retrieval/temporal_retriever.py (1 hunks)
  • cognee/modules/retrieval/user_qa_feedback.py (1 hunks)
  • cognee/modules/search/utils/prepare_search_result.py (2 hunks)
💤 Files with no reviewable changes (1)
  • cognee/modules/notebooks/methods/update_notebook.py
✅ Files skipped from review due to trivial changes (1)
  • cognee/modules/retrieval/user_qa_feedback.py
🧰 Additional context used
🧬 Code graph analysis (4)
cognee/modules/retrieval/temporal_retriever.py (7)
cognee/modules/retrieval/graph_completion_context_extension_retriever.py (1)
  • get_completion (46-131)
cognee/modules/retrieval/graph_completion_cot_retriever.py (1)
  • get_completion (56-141)
cognee/modules/retrieval/graph_completion_retriever.py (1)
  • get_completion (134-174)
cognee/modules/retrieval/insights_retriever.py (1)
  • get_completion (112-133)
cognee/modules/retrieval/base_graph_retriever.py (1)
  • get_completion (16-18)
cognee/modules/retrieval/base_retriever.py (1)
  • get_completion (14-16)
cognee/modules/retrieval/completion_retriever.py (1)
  • get_completion (70-99)
cognee/api/v1/notebooks/routers/get_notebooks_router.py (1)
cognee/modules/notebooks/methods/get_notebooks.py (1)
  • get_notebooks (12-18)
cognee-frontend/src/ui/elements/Notebook/NotebookCellHeader.tsx (1)
cognee-frontend/src/utils/isCloudEnvironment.ts (1)
  • isCloudEnvironment (2-4)
cognee/modules/search/utils/prepare_search_result.py (1)
cognee/modules/search/utils/transform_context_to_graph.py (1)
  • transform_context_to_graph (6-38)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
  • GitHub Check: End-to-End Tests / Deduplication Test
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: CLI Tests / CLI Integration Tests
  • GitHub Check: CLI Tests / CLI Unit Tests
🔇 Additional comments (20)
cognee/infrastructure/utils/run_async.py (3)

3-3: LGTM! Good addition for function introspection.

The import of inspect is necessary for checking function signatures to determine if the target function accepts a loop parameter.


6-11: Improved loop handling with proper fallback.

The unified loop handling correctly attempts to get the running loop first, then falls back to getting the event loop if no loop is running. This is a more robust approach than the previous implementation.


13-16: Smart parameter injection based on function signature.

Excellent implementation that conditionally passes the loop parameter only when the target function accepts it. This maintains backward compatibility while enabling enhanced functionality for loop-aware functions.

cognee/infrastructure/utils/run_sync.py (2)

5-5: Good API enhancement for explicit loop control.

Adding the optional running_loop parameter allows callers to specify which event loop should execute the coroutine, providing better control in complex async scenarios.


26-29: Verify timeout behavior when running_loop is provided.

When running_loop is provided and asyncio.run_coroutine_threadsafe is used with a timeout (line 17), the timeout is handled by the .result(timeout) call. However, the thread join timeout (line 26) uses the same value. This could lead to a race where the thread times out just as the coroutine completes.

Consider adding a small buffer to the thread join timeout to avoid premature thread timeout:

-    thread.join(timeout)
+    thread.join(timeout * 1.1 if timeout else None)
cognee/modules/notebooks/operations/run_in_local_sandbox.py (1)

19-36: LGTM! Clean integration with the new loop parameter.

The function signature update and environment setup correctly propagate the loop parameter to the sandboxed code execution environment.

cognee/api/v1/notebooks/routers/get_notebooks_router.py (1)

34-35: Per-request session: good — verify all callers now pass session

No matches found from the ripgrep run; callers couldn't be verified. Run: rg -nP --type=py '\bget_notebooks\s*(' -C2 and ensure every call includes the session argument.

cognee/modules/retrieval/temporal_retriever.py (1)

131-136: Incorrect: limit=0 is handled as "return all" by our vector adapters. ChromaDBAdapter sets limit = await collection.count() when limit == 0; LanceDBAdapter sets limit = await collection.count_rows() (and only returns [] if the collection is empty); PGVectorAdapter applies .limit(limit) only when limit > 0 (so 0 means no limit). See cognee/infrastructure/databases/vector/chromadb/ChromaDBAdapter.py, lancedb/LanceDBAdapter.py, and pgvector/PGVectorAdapter.py — no change required here unless you intended to restrict results, in which case pass self.top_k.

Likely an incorrect or invalid review comment.

cognee/modules/retrieval/graph_completion_context_extension_retriever.py (1)

51-51: LGTM on unified return type

Signature now returns List[str], consistent with related retrievers.

cognee/modules/retrieval/graph_completion_cot_retriever.py (1)

61-61: LGTM on return-type standardization

Consistent List[str] across retrievers.

cognee-frontend/src/app/dashboard/Dashboard.tsx (2)

56-63: Improved async flow for notebook removal with proper state management.

The refactored handleNotebookRemove now returns a promise and updates the selected notebook state only after successful removal. This prevents UI inconsistencies where the selected notebook could be cleared before the removal operation completes.


159-165: Notebook component usage aligned with updated API.

The removal of the saveNotebook prop from the Notebook component usage is consistent with the API changes described in the summary. The component now relies on the throttled save mechanism in the Dashboard component instead of direct prop-based saving.

cognee-frontend/src/ui/elements/Notebook/NotebookCellHeader.tsx (1)

36-36: Environment-based initialization improves UX.

The automatic initialization of runInstance based on isCloudEnvironment() provides a better user experience by defaulting to the appropriate environment without requiring user selection.

cognee-frontend/src/app/dashboard/AddDataToCognee.tsx (3)

50-62: Improved async flow with proper file cleanup sequencing.

The refactored promise chain ensures that setFilesForUpload(null) only executes after the cognification process completes successfully. This prevents premature state clearing and provides better error handling.


115-117: Enhanced button UI with loading state and spinner.

The addition of the LoadingIndicator with white color provides clear visual feedback during processing, improving the user experience. The combination of spinner and text label is more informative than just changing the text.


86-86: Dynamic text based on environment context.

The conditional text {useCloud ? "cloud" : "local"} provides appropriate context to users about which type of dataset they're working with.

cognee-frontend/src/ui/elements/Notebook/Notebook.tsx (3)

21-21: API simplification by removing auto-save prop.

Removing the saveNotebook prop simplifies the component API and delegates save responsibility to the parent component, which is a cleaner separation of concerns.


280-284: Enhanced dataset display with proper aggregation.

The new logic correctly aggregates multiple datasets from the datasets object and displays them as a comma-separated list, providing better information to users when multiple datasets are involved in a query result.


299-299: Increased graph visualization height for better readability.

The increase from min-h-48 to min-h-80 provides more space for graph visualization, improving readability of complex relationship graphs.

cognee-frontend/src/ui/App/Loading/DefaultLoadingIndicator/LoadingIndicator.tsx (1)

1-2: Verify classnames dependency and tree-shaking

Ensure classnames is listed in package.json and not duplicated across workspaces to avoid bundle bloat.


async def prepare_search_result(search_result):
result, context, datasets = search_result
results, context, datasets = search_result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm upstream always passes a list as the first tuple element

The unpack now expects results to be a list. Please verify all retrievers/consumers conform to this shape to avoid runtime errors.

Run:


🏁 Script executed:

#!/bin/bash
# Verify call sites and producers of prepare_search_result payload shape.
rg -nC3 --type=py 'prepare_search_result\('
rg -nC3 --type=py 'return\s*\(\s*\[?.*?,\s*context' || true
# Spot uses that still treat the first element as a scalar "result"
rg -nC3 --type=py '\bresult[s]?\b\s*,\s*context\s*,\s*datasets\s*='

Length of output: 3915


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== prepare_search_result.py ==="
nl -ba cognee/modules/search/utils/prepare_search_result.py | sed -n '1,240p' || true

echo
echo "=== search.py (1..260) ==="
nl -ba cognee/modules/search/methods/search.py | sed -n '1,260p' || true

echo
echo "=== rg: where search_results are assigned ==="
rg -n --hidden --no-ignore-vcs -S "search_results\s*=" || true

echo
echo "=== rg: returns with tuple containing context and datasets ==="
rg -n --hidden --no-ignore-vcs -S "return\s*\(\s*\[?.*?,\s*context" || true

echo
echo "=== rg: places that unpack into result, context, datasets ==="
rg -n --hidden --no-ignore-vcs -S "\bresult[s]?\b\s*,\s*context\s*,\s*datasets\s*=" || true

echo
echo "=== rg: prepare_search_result calls ==="
rg -n --hidden --no-ignore-vcs -S "prepare_search_result\(" || true

echo
echo "Done"

Length of output: 7416


Critical: ensure the first tuple element is always a list

prepare_search_result unpacks (results, context, datasets) expecting results to be a list. Call sites are inconsistent — either pass a singular result or a results list. Fix callers or make prepare_search_result accept both shapes.

  • cognee/modules/search/utils/prepare_search_result.py:9 — results, context, datasets = search_result
  • cognee/modules/search/methods/search.py:101,106,114 — prepare_search_result(...) calls (one uses search_results[0] if isinstance(search_results, list) else search_results)
  • cognee/modules/search/methods/search.py:139,151 — unpack as result, context, datasets = search_result (singular)
🤖 Prompt for AI Agents
In cognee/modules/search/utils/prepare_search_result.py around line 9, the
function assumes search_result unpacks to (results, context, datasets) with
results always a list; callers sometimes pass a single result item. Change
prepare_search_result to normalize the incoming shape: after unpacking, if
results is not a list (or tuple), wrap it into a single-element list before
further processing; keep context and datasets handling unchanged so all existing
callers (both singular and list forms) work without modification.

Comment on lines +33 to +34
if isinstance(results, List) and len(results) > 0 and isinstance(results[0], Edge):
result_graph = transform_context_to_graph(results)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix isinstance checks: typing.List is invalid at runtime

isinstance(results, List) will raise/behave incorrectly; use the built-in list. Apply the same change to other isinstance(..., List) checks in this function (context branches).

Apply this diff here:

-    if isinstance(results, List) and len(results) > 0 and isinstance(results[0], Edge):
+    if isinstance(results, list) and results and isinstance(results[0], Edge):

And mirror the update for the context checks above (replace List with list and prefer truthiness: if isinstance(context, list) and context and ...).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if isinstance(results, List) and len(results) > 0 and isinstance(results[0], Edge):
result_graph = transform_context_to_graph(results)
if isinstance(results, list) and results and isinstance(results[0], Edge):
result_graph = transform_context_to_graph(results)
🤖 Prompt for AI Agents
In cognee/modules/search/utils/prepare_search_result.py around lines 33-34, the
code uses isinstance(..., List) which is invalid at runtime; replace all
isinstance(..., List) checks with isinstance(..., list) and prefer truthiness
checks (e.g., if isinstance(results, list) and results and
isinstance(results[0], Edge):) and make the same changes for the earlier context
branches (replace List with list and use context and similar truthy checks) so
runtime type checks work correctly.

@coderabbitai coderabbitai bot mentioned this pull request Sep 16, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants