Commit graph

4796 commits

Author SHA1 Message Date
vasilije
b7d5bf5e9c test: update cognify test assertions to include chunks_per_batch parameter
Update all cognify test assertions to expect the chunks_per_batch=None
parameter that was added to the CLI command. This fixes three failing tests:
- test_execute_basic_cognify
- test_cognify_invalid_chunk_size
- test_cognify_nonexistent_ontology_file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 16:22:06 +01:00
vasilije
98394fc264 docs: add code style rules for double quotes and pre-commit 2026-01-11 16:18:29 +01:00
vasilije
7d3450cb08 style: apply ruff formatting to use double quotes 2026-01-11 16:18:13 +01:00
Vasilije
6ec44f64f7
Merge branch 'dev' into COG-3146 2026-01-11 16:16:06 +01:00
vasilije
e38c33c1b5 fix: handle missing chunks_per_batch attribute in cognify CLI command
Fix AttributeError when args.chunks_per_batch is not present in the
argparse.Namespace object. Use getattr() with default value of None
to safely access the optional chunks_per_batch parameter.

This resolves test failures in test_cli_edge_cases.py where Namespace
objects were created without the chunks_per_batch attribute.

Changes:
- Use getattr(args, 'chunks_per_batch', None) instead of direct access
- Update test assertion to expect chunks_per_batch=None parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 16:15:29 +01:00
vasilije
ab990f7c5c docs: add CLAUDE.md for Claude Code guidance
Add comprehensive CLAUDE.md file to guide future Claude Code instances working in this repository. Includes:
- Development commands (setup, testing, code quality)
- Architecture overview (ECL pipeline, data flows, key patterns)
- Complete configuration guide (LLM providers, databases, storage)
- All 15 search types with descriptions
- Extension points for custom functionality
- Troubleshooting common issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 16:04:11 +01:00
Vasilije
861c5e33da
refactor: add type hints for user_id and visualization server args (#1987)
<!-- .github/pull_request_template.md -->

## Description
Resolves #1986 

I addressed all `ANN001` errors in `cognee/shared/utils.py`.
Updated functions:
1. send_telemetry
2. start_visualization_server
3. _sanitize_nested_properties
4. embed_logo

While fixing these errors, i've noticed that the `send_telemetry`
function lacked a type hint for `user_id`. After analyzing the `User`
models and usage patterns in the codebase, I found that `user_id` is not
strictly a `str` but can also be a `uuid.UUID` object.

Therefore, I updated the type hint to `Union[str, uuid.UUID]` (importing
`uuid` and `typing.Union`) to accurately reflect the data structure and
improve type safety.

## Acceptance Criteria
* [x] The code passes static analysis (`ruff`) without `ANN001` errors
in `cognee/shared/utils.py`.
* [x] Correct imports (`uuid`, `Union`) are added and sorted.

[Check Steps]
1. Run 'uv run ruff check cognee/shared/utils.py --select ANN001'
5. Expected result: No errors found.

## 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
- [x] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## 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 -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **This PR contains minimal changes necessary to address the
issue/feature**
- [x] 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)
- [x] All new and existing tests pass
- [x] I have searched existing PRs to ensure this change hasn't been
submitted already
- [x] I have linked any relevant issues in the description
- [x] My commits have clear and descriptive messages

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Improved type annotations across telemetry and sanitization utilities
for safer handling of IDs and nested properties.
* Ensured additional properties are sanitized before telemetry is sent.
* Added explicit type hints for visualization startup and logo embedding
parameters for clearer IDE support.

This release contains no user-facing changes.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-10 15:27:52 +01:00
HectorSin
4189cda895 refactor: simplify type hint and add return type for sanitize function
Signed-off-by: HectorSin <kkang15634@ajou.ac.kr>
2026-01-10 21:25:25 +09:00
HectorSin
da5660b716 refactor: fix mutable default argument in send_telemetry
Signed-off-by: HectorSin <kkang15634@ajou.ac.kr>
2026-01-10 21:21:04 +09:00
HectorSin
46c12cc0ee refactor: resolve remaining ANN001 errors in utils.py
Signed-off-by: HectorSin <kkang15634@ajou.ac.kr>
2026-01-10 21:13:10 +09:00
HectorSin
ebf2aaaa5c refactor: add type hint for handler_class
Signed-off-by: HectorSin <kkang15634@ajou.ac.kr>
2026-01-10 20:58:08 +09:00
HectorSin
f73457ef72 refactor: add type hints for user_id and visualization server args
Signed-off-by: HectorSin <kkang15634@ajou.ac.kr>
2026-01-10 20:29:50 +09:00
Vasilije
2c23063da7
fix: Better error message if cognee is run without cognee.add and cognee.cognify (#1940)
<!-- .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.
-->

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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):

## 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

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved error messaging in search functionality with clearer,
actionable feedback when database or user configuration prerequisites
are not met
* Standardized error response format for consistent and informative
error reporting across search operations

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-10 11:21:52 +01:00
Vasilije
f2166be823
Merge branch 'dev' into COG-3146 2026-01-10 08:49:43 +01:00
Vasilije
f03ab671e6
fix: Remove Jon Doe enitity reference due to hallucination issues (#1939)
<!-- .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.
-->

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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):

## 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

## 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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Clarifies and tightens coreference resolution guidance across
knowledge-graph prompt templates.
> 
> - Updates coreference rules to emphasize using the most complete,
human-readable identifiers consistently (`generate_graph_prompt*.txt`)
> - Tweaks examples, notably replacing the John Doe example with a
generic "X" case in the one-shot prompt
> - Minor wording/formatting cleanups; no code changes or logic
modifications
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8499258272. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Refined entity resolution guidance in knowledge graph generation
prompts to use more generic instructions, improving flexibility and
consistency in how entities are identified throughout the system.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-10 08:49:23 +01:00
Vasilije
a3c04d30be
Merge branch 'dev' into COG-3283 2026-01-10 08:48:55 +01:00
Vasilije
7a421dd968
Chore: Update helm chart (#1984)
<!-- .github/pull_request_template.md -->

## Description
Updated example Helm chart:
* connected PostgreSQL + pgvector to Cognee
* Added required variables and secrets
* Tested with port forwarding
* Updated readme
<!--
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.
-->

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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
- [x] Other (please specify): Cloud

## 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

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated deployment guide with example setup instructions, deployment
commands, and port forwarding details for local access.

* **Configuration**
  * Added LLM model and provider configuration settings.
* Enhanced deployment with environment variables and memory resource
limits.
  * Implemented secure secret management for API keys.
  * Adjusted resource allocations for services.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-09 19:16:45 +01:00
Pavel Zorin
fb4796204a Chore: Fix helm chart 2026-01-09 18:06:08 +01:00
Vasilije
6dc08eb5d0
Chore: Remove Lint and Format check in favor to pre-commit (#1983)
<!-- .github/pull_request_template.md -->

## Description
Removed `List and Format check` steps. It's all done by pre-commit
checks
## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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
- [x] Other (please specify): Dev Experience

## 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

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Streamlined the continuous integration workflow by removing redundant
job steps from the automated testing pipeline. Unit tests and
integration tests continue to run as expected.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-09 15:39:01 +01:00
Pavel Zorin
aeb2f39fd8 Chore: Remove Lint and Format check in favor to pre-commit 2026-01-09 14:15:36 +01:00
Vasilije
14c5a306b3
fix: Resolve issue with distributed test (#1982)
<!-- .github/pull_request_template.md -->

## Description
Update poetry lock for distributed Cognee

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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):

## 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

## 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.
2026-01-09 12:54:41 +01:00
Igor Ilic
6db193ef36 fix: Resolve issue with distributed test 2026-01-09 11:20:16 +01:00
Vasilije
beb8932fea
fix: Handle Dependabot security issues (#1968)
<!-- .github/pull_request_template.md -->

## Description
Fix security issue with langchain raised by Dependabot:
https://github.com/topoteretes/cognee/security/dependabot/73

Older version of langchain has an issue

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## Type of Change
<!-- Please check the relevant option -->
- [X ] 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):

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

## 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.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Addresses Dependabot alerts by updating critical dependencies and
refreshing the Python lockfile.
> 
> - Adds `langchain-core` to optional deps and updates locked version to
`1.2.6` (introduces `uuid-utils`)
> - Tightens HTTP stack: raises `aiohttp` to `>=3.13.3`, adds `urllib3`
runtime dep (locked to `2.6.2`)
> - Bumps frontend `next` to `16.1.7`
> - Regenerates `uv.lock` with numerous package/version updates and
platform wheels; adjusts `kubernetes` to `33.1.0` with `oauthlib` dep
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1eb4197f1a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Updated Next.js to 16.1.7.
  * Relaxed aiohttp dependency constraint.
  * Added urllib3 as a dependency.
  * Added langchain-core to optional dependencies.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-08 21:29:20 +01:00
Vasilije
c3c8961631
Merge branch 'dev' into ffix_sec 2026-01-08 21:29:02 +01:00
Vasilije
abc6faff34
fix: fix security issue (#1967)
<!-- .github/pull_request_template.md -->

## Description
Fix security issue reported by the user
https://github.com/topoteretes/cognee/issues/1950

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## Type of Change
<!-- Please check the relevant option -->
- [x] 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):

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

## 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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> - **Dependencies:** Adds `cbor2>=5.8.0` to `pyproject.toml`; updates
`uv.lock` (including version bump and wheels) to reflect new dependency.
> - **CI/Docs:** Refines `.github/pull_request_template.md` (simplified
change types; renamed `Screenshots` section to request proof of local
tests passing).
> - **Code cleanup:** Minor formatting changes in
`LiteLLMEmbeddingEngine.py` and `get_api_auth_backend.py` with no
functional impact.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
aa4ab1ed8a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Added the cbor2 serialization library to project dependencies.

* **Documentation**
* Updated the pull request template: simplified change-type options,
tightened acceptance criteria, expanded the pre-submission checklist
with additional verification items, and renamed/clarified the
screenshots section to request local test evidence.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-08 21:28:21 +01:00
Vasilije
ada0a2be4f
Merge branch 'dev' into fix_security_issue 2026-01-08 21:28:11 +01:00
Vasilije
b1ff473a38
COG-3395: Chore: pre-commit, pre-commit action, contribution guide update (#1979)
## Description
Revisited the `CONTRIBUTING.md`:
* Added the `Required tools`
* Pre-commit requirement. It replaces `ruff` and other linting guides
* Fixed `test_library.py` paths. Made sure that the testing guide is
complete and works
* Added a `pre-commit` step to `Pre-Test` workflow. It will fail if
`pre-commit` has issues and no other tests will be triggered
* Added a sufficient LLM configuration example for tests. Moved
`cognee/.env.example` to the project root for convenience

>>> Requires: https://github.com/topoteretes/cognee/pull/1980 <<<

## Acceptance Criteria
`pre-commit` action works 
Tested pre-commit locally. If a commit violates the rules - it rejects
it and fixes the issues. Then we need to `git commit ...` again.

## 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
- [x] Other (please specify): CI and DevExp improvement

## 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

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Expanded contributor guide with setup, required tools, testing
instructions, examples, and updated PR submission guidance.
* Updated pull-request checklist to reference contributing instructions.

* **Chores**
* Added three new local environment variables for LLM configuration and
updated example env file.
  * Added a pre-commit validation step to CI.
  * Updated ignore list to exclude a local environment file.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-08 19:59:20 +01:00
Pavel Zorin
3e602fdad7 Renamed the pre_test workflow 2026-01-08 19:19:11 +01:00
Pavel Zorin
15a88accac Chore: use pre-commit action 2026-01-08 19:19:11 +01:00
Pavel Zorin
b0fe1a8439 CI: Speed up pre-test workflow 2026-01-08 19:19:11 +01:00
Pavel Zorin
962ddf4257 Chore: pre-commit, pre-commit action, contribution guide update 2026-01-08 19:19:07 +01:00
Vasilije
fde921ca3e
chore: Remove trailing whitespaces in the project, fix YAMLs (#1980)
<!-- .github/pull_request_template.md -->

## Description
Removes trailing whitespaces from all files in the project. Needed by
https://github.com/topoteretes/cognee/pull/1979

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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):

## 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

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added `topK` parameter support in search functionality to control
result count (1-100).
  * Added Python tool configuration via mise.toml.

* **Documentation**
* Enhanced issue templates with improved UI metadata, labels, and
clearer guidance for bug reports, feature requests, and documentation
issues.
* Expanded CONTRIBUTING.md with comprehensive contribution guidelines
and community information.

* **Chores**
* Removed unused modules: `cognee.modules.retrieval` and
`cognee.tasks.temporal_graph`.
* Applied consistent formatting and whitespace normalization across
configuration files, workflows, and documentation.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-08 19:16:09 +01:00
Pavel Zorin
7a48e22b13 chore: Remove trailing whitespaces in the project, fix YAMLs 2026-01-08 17:15:53 +01:00
vasilije
1eb4197f1a add uv lock 2026-01-08 16:05:36 +01:00
Vasilije
c50b5fa139
Merge branch 'dev' into fix_security_issue 2026-01-08 16:00:21 +01:00
Vasilije
42dc9351f2
Merge branch 'dev' into ffix_sec 2026-01-08 15:53:44 +01:00
Vasilije
5cf63617a1
Fix dev branch ci (#1978)
<!-- .github/pull_request_template.md -->

## Description
Resolve issues with CI for dev branch with slight contributor PR
refactors

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## 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):

## 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

## 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.
2026-01-08 15:49:59 +01:00
Igor Ilic
7de3356b1f fix: Resolve issue with migration order 2026-01-08 14:28:39 +01:00
Igor Ilic
00697c4491 chore: Update poetry lock 2026-01-08 14:21:05 +01:00
Vasilije
1772439ea5
Update aiohttp version in pyproject.toml 2026-01-08 13:49:39 +01:00
Igor Ilic
fd6a77deec refactor: Add TODO for missing llm config parameters 2026-01-08 13:31:25 +01:00
Igor Ilic
f3215e16f9 refactor: Remove silent handling of lifetime assignment 2026-01-08 12:51:11 +01:00
Igor Ilic
07b91f3a5f refactor: Remove comment from Dockerfile 2026-01-08 12:45:03 +01:00
vasilije
af72dd2fc2 fixes to ruff format 2026-01-07 16:26:36 +01:00
vasilije
aa4ab1ed8a reformat 2026-01-06 18:05:34 +01:00
vasilije
f1f955b76a fix 2026-01-06 18:03:43 +01:00
vasilije
555eef69e3 added update to pr template 2026-01-06 17:53:42 +01:00
vasilije
5c365abf66 added update to pr template 2026-01-06 17:53:38 +01:00
vasilije
295f623db3 fix security issue 2026-01-06 17:47:54 +01:00
Vasilije
34c6652939
add configurable JWT expiration, cookie domain, CORS origins, and service restart policies (#1956)
<!-- .github/pull_request_template.md -->

## Description
This PR introduces several configuration improvements to enhance the
application's flexibility and reliability. The changes make JWT token
expiration and cookie domain configurable via environment variables,
improve CORS configuration, and add container restart policies for
better uptime.

**JWT Token Expiration Configuration:**
- Added `JWT_LIFETIME_SECONDS` environment variable to configure JWT
token expiration time
- Set default expiration to 3600 seconds (1 hour) for both API and
client authentication backends
- Removed hardcoded expiration values in favor of environment-based
configuration
- Added documentation comments explaining the JWT strategy configuration

**Cookie Domain Configuration:**
- Added `AUTH_TOKEN_COOKIE_DOMAIN` environment variable to configure
cookie domain
- When not set or empty, cookie domain defaults to `None` allowing
cross-domain usage
- Added documentation explaining cookie expiration is handled by JWT
strategy
- Updated default_transport to use environment-based cookie domain

**CORS Configuration Enhancement:**
- Added `CORS_ALLOWED_ORIGINS` environment variable with default value
of `'*'`
- Configured frontend to use `NEXT_PUBLIC_BACKEND_API_URL` environment
variable
- Set default backend API URL to `http://localhost:8000`

**Docker Service Reliability:**
- Added `restart: always` policy to all services (cognee, frontend,
neo4j, chromadb, and postgres)
- This ensures services automatically restart on failure or system
reboot
- Improves container reliability and uptime in production and
development environments

## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->

## Type of Change
<!-- Please check the relevant option -->
- [x] Bug fix (non-breaking change that fixes an issue)
- [x] 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):

## 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 -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **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

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Services now automatically restart on failure for improved
reliability.

* **Configuration**
* Cookie domain for authentication is now configurable via environment
variable, defaulting to None if not set.
* JWT token lifetime is now configurable via environment variable, with
a 3600-second default.
* CORS allowed origins are now configurable with a default of all
origins (*).
* Frontend backend API URL is now configurable, defaulting to
http://localhost:8000.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-04 10:37:13 +01:00