Skip to content

Conversation

@dexters1
Copy link
Collaborator

Description

Merge main changes to dev

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.

@dexters1 dexters1 changed the base branch from main to dev June 10, 2025 10:59
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces backend access control for Cognee with context-aware database configuration, dataset-level permissions, and extended API parameters. Adds environment flag, context var module, adapter expansions for graph/vector databases, pipeline and task updates, numerous permission methods/models, starter kit scripts, examples, and tests validating parallel and remote database integrations.

Changes

Files Change
.env.template, cognee-starter-kit/.env.template, .gitattributes Added ENABLE_BACKEND_ACCESS_CONTROL flag; new starter-kit env template; marked notebooks/ vendored.
README.md, cognee-mcp/README.md, cognee-starter-kit/README.md, cognee-starter-kit/.gitignore Updated links, badges, i18n, usage sections; added server run and starter-kit docs; added starter-kit .gitignore.
alembic/versions/..._add_default_user.py Wrapped create_default_user() in try/except UserAlreadyExists.
cognee-frontend/.../DatasetsView.tsx, .../SearchView.tsx Disabled modal backdrop close; added “Chain of Thought”/“Multi-Hop” options, rangeValue input, layout and payload update.
cognee/api/v1/add/..., cognee/api/v1/cognify/... Extended endpoints to accept vector_db_config, graph_db_config, dataset_id(s); switched to dataset‐level permission tasks.
cognee/api/v1/permissions/..., cognee/api/v1/search/..., cognee/api/v1/search/search.py Refactored permissions routers to require auth and add dataset‐permission routes; extended search DTO and function with dataset_ids, top_k.
cognee/context_global_variables.py, cognee/modules/pipelines/operations/pipeline.py Introduced context vars for DB configs; updated cognee_pipeline/run_pipeline to set context and accept DB configs.
cognee/infrastructure/databases/.../config.py, .../get_graph_engine.py, .../vector/create_vector_engine.py, .../vector/get_vector_engine.py Added context‐aware config getters; updated engine factories to use context vars; reordered parameters.
.../graph/kuzu/remote_kuzu_adapter.py, .../show_remote_kuzu_stats.py, .../memgraph_adapter.py, neo4j/adapter.py, neo4j_metrics_utils.py Added RemoteKuzuAdapter and stats script; renamed memgraph methods; enforced Neo4j base label, added initialize, switched to GDS .stats().
.../vector/pgvector/create_db_and_tables.py, .../vector/qdrant/QDrantAdapter.py Switched to context config; added conditional HTTPS flag in QDrant; minor signature reordering.
cognee/modules/data/..., cognee/modules/users/... Added dataset exceptions, methods, DatasetDatabase model; renamed ACL to dataset; expanded permission methods and imports.
cognee/tasks/documents/..., .../check_permissions_on_dataset.py, .../ingest_data.py Switched to dataset‐level permission check; added optional dataset_id to ingest tasks.
cognee/tests/... New and updated tests for parallel DBs, remote Kuzu, PGVector, QDrant, starter pipelines; safety checks on results.
examples/..., deleted notebooks/*.ipynb Added procurement and migration examples, relational+DLT script, SQL fixes; removed demo notebooks.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant API as SearchAPI
    participant Perm as permissions_search
    participant Spec as specific_search_by_context
    participant Ctx as ContextVars
    participant VDB as VectorDB
    participant GDB as GraphDB

    U->>API: POST /api/v1/search {dataset_ids, top_k}
    API->>Perm: permissions_search(query, ...)
    Perm->>Spec: specific_search_by_context(datasets)
    loop for each dataset
        Spec->>Ctx: set_database_global_context_variables(dataset)
        Ctx-->>Spec: configs set
        Spec->>VDB: get_vector_engine()
        Spec->>GDB: get_graph_engine()
        Spec->>Spec: perform dataset search
    end
    Spec-->>Perm: aggregated results
    Perm-->>API: results
    API-->>U: response
Loading

Poem

I'm a little rabbit, hopping through code,
New flags and contexts lighten my load.
Permissions flourish, datasets spring bright,
Adapters connect with database might.
Pipelines leap forward, tests join the race,
Cognee evolves—a bunny’s embrace! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@gitguardian
Copy link

gitguardian bot commented Jun 10, 2025

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
17350889 Triggered Generic Password 4eb71cc cognee/tests/test_remote_kuzu.py View secret
17116131 Triggered Generic Password 3b07f3c examples/database_examples/neo4j_example.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@borisarzentar borisarzentar merged commit 5926d59 into dev Jun 10, 2025
5 of 7 checks passed
@borisarzentar borisarzentar deleted the merge-main-again branch June 10, 2025 11:02
@coderabbitai coderabbitai bot mentioned this pull request Jun 18, 2025
This was referenced Jun 30, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 19, 2025
16 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 6, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants