This pull request implements soft deletion for nodes and relationships in the graph repository, replacing hard deletes with a deleted_at timestamp. All queries and operations are updated to respect this new soft delete mechanism, ensuring that "deleted" entities are excluded from results and not modified further. The in-memory test repository is also updated to reflect these changes for consistency in testing.
Soft Delete Implementation:
All delete operations for nodes and relationships now set a deleted_at timestamp instead of removing records from the database. Associated relationships are also soft-deleted when a node is deleted.
The in-memory test repository mirrors this behavior, updating its logic to mark entities as deleted and exclude them from future operations and queries.
Query and Update Adjustments:
All queries and update operations now include checks for deleted_at IS NULL to ensure only active (non-deleted) nodes and relationships are returned or modified. This includes node/relationship creation, updating, merging, and graph traversal methods.
Node and Relationship Creation Updates:
When creating or merging nodes and relationships, the deleted_at property is explicitly set to null to indicate they are active. [1][2][3][4][5][6]
Test Repository Enhancements:
The in-memory test repository now fully supports soft deletion, including for batch and position update operations, ensuring test coverage for the new logic.
Documentation Updates:
Docstrings and comments are updated to clarify that operations now perform soft deletes and return counts of soft-deleted entities, not hard deletes.
These changes collectively ensure that deletions in the graph are non-destructive and reversible, improving data integrity and auditability.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/reconurge/flowsint/pull/125
**Author:** [@gustavorps](https://github.com/gustavorps)
**Created:** 2/20/2026
**Status:** ✅ Merged
**Merged:** 3/2/2026
**Merged by:** [@dextmorgn](https://github.com/dextmorgn)
**Base:** `main` ← **Head:** `feat/soft-delete`
---
### 📝 Commits (1)
- [`a574d4e`](https://github.com/reconurge/flowsint/commit/a574d4ebeac795b88b390b64dabbbdd7300b80ec) feat(core): soft delete
### 📊 Changes
**2 files changed** (+164 additions, -79 deletions)
<details>
<summary>View changed files</summary>
📝 `flowsint-core/src/flowsint_core/core/graph/repository.py` (+91 -38)
📝 `flowsint-core/tests/core/graph/in_memory_graph_repository.py` (+73 -41)
</details>
### 📄 Description
This pull request implements soft deletion for nodes and relationships in the graph repository, replacing hard deletes with a `deleted_at` timestamp. All queries and operations are updated to respect this new soft delete mechanism, ensuring that "deleted" entities are excluded from results and not modified further. The in-memory test repository is also updated to reflect these changes for consistency in testing.
**Soft Delete Implementation:**
* All delete operations for nodes and relationships now set a `deleted_at` timestamp instead of removing records from the database. Associated relationships are also soft-deleted when a node is deleted.
* The in-memory test repository mirrors this behavior, updating its logic to mark entities as deleted and exclude them from future operations and queries.
**Query and Update Adjustments:**
* All queries and update operations now include checks for `deleted_at IS NULL` to ensure only active (non-deleted) nodes and relationships are returned or modified. This includes node/relationship creation, updating, merging, and graph traversal methods.
**Node and Relationship Creation Updates:**
* When creating or merging nodes and relationships, the `deleted_at` property is explicitly set to `null` to indicate they are active. [[1]](diffhunk://#diff-f3bdc07426b3407108ada3382e8a46e6097735eee0c27b5bcc7787d66631746bR123) [[2]](diffhunk://#diff-f3bdc07426b3407108ada3382e8a46e6097735eee0c27b5bcc7787d66631746bR149-R154) [[3]](diffhunk://#diff-f3bdc07426b3407108ada3382e8a46e6097735eee0c27b5bcc7787d66631746bL606-R638) [[4]](diffhunk://#diff-f3bdc07426b3407108ada3382e8a46e6097735eee0c27b5bcc7787d66631746bL753-R809) [[5]](diffhunk://#diff-b4d7a5d3a2ed4694f958039099cd175532eb848f669d9e7645f93cd756aefc04R48) [[6]](diffhunk://#diff-b4d7a5d3a2ed4694f958039099cd175532eb848f669d9e7645f93cd756aefc04R57)
**Test Repository Enhancements:**
* The in-memory test repository now fully supports soft deletion, including for batch and position update operations, ensuring test coverage for the new logic.
**Documentation Updates:**
* Docstrings and comments are updated to clarify that operations now perform soft deletes and return counts of soft-deleted entities, not hard deletes.
These changes collectively ensure that deletions in the graph are non-destructive and reversible, improving data integrity and auditability.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/reconurge/flowsint/pull/125
Author: @gustavorps
Created: 2/20/2026
Status: ✅ Merged
Merged: 3/2/2026
Merged by: @dextmorgn
Base:
main← Head:feat/soft-delete📝 Commits (1)
a574d4efeat(core): soft delete📊 Changes
2 files changed (+164 additions, -79 deletions)
View changed files
📝
flowsint-core/src/flowsint_core/core/graph/repository.py(+91 -38)📝
flowsint-core/tests/core/graph/in_memory_graph_repository.py(+73 -41)📄 Description
This pull request implements soft deletion for nodes and relationships in the graph repository, replacing hard deletes with a
deleted_attimestamp. All queries and operations are updated to respect this new soft delete mechanism, ensuring that "deleted" entities are excluded from results and not modified further. The in-memory test repository is also updated to reflect these changes for consistency in testing.Soft Delete Implementation:
All delete operations for nodes and relationships now set a
deleted_attimestamp instead of removing records from the database. Associated relationships are also soft-deleted when a node is deleted.The in-memory test repository mirrors this behavior, updating its logic to mark entities as deleted and exclude them from future operations and queries.
Query and Update Adjustments:
deleted_at IS NULLto ensure only active (non-deleted) nodes and relationships are returned or modified. This includes node/relationship creation, updating, merging, and graph traversal methods.Node and Relationship Creation Updates:
deleted_atproperty is explicitly set tonullto indicate they are active. [1] [2] [3] [4] [5] [6]Test Repository Enhancements:
Documentation Updates:
These changes collectively ensure that deletions in the graph are non-destructive and reversible, improving data integrity and auditability.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.