Skip to content

feat: refine node merge#1092

Merged
earayu merged 4 commits into
mainfrom
feature/bugfix_merge_nodes
Jul 11, 2025
Merged

feat: refine node merge#1092
earayu merged 4 commits into
mainfrom
feature/bugfix_merge_nodes

Conversation

@earayu
Copy link
Copy Markdown
Collaborator

@earayu earayu commented Jul 11, 2025

No description provided.

@earayu earayu requested a review from iziang as a code owner July 11, 2025 06:16
@apecloud-bot apecloud-bot added the size/S Denotes a PR that changes 10-29 lines. label Jul 11, 2025
cursor[bot]

This comment was marked as outdated.

@earayu earayu changed the title feat: update readme kg feat: refine node merge Jul 11, 2025
@apecloud-bot apecloud-bot added size/XXL Denotes a PR that changes 1000+ lines. and removed size/S Denotes a PR that changes 10-29 lines. labels Jul 11, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Bug: Merge Suggestion Expiry Regression

The handle_suggestion_action method, when accepting a merge suggestion, omits the call to self.db_ops.expire_related_suggestions. This regression from the previous implementation allows related merge suggestions involving the same entities to remain active instead of being marked as EXPIRED. This leads to data inconsistency and conflicting suggestions, contrary to API documentation and unit test expectations.

aperag/service/graph_service.py#L329-L351

else: # normalized_action == "accept"
# Accept and perform merge
merge_target_data = target_entity_data or suggestion.suggested_target_entity
# Execute merge operation
merge_result = await self._execute_merge_operation(
db_collection=db_collection,
entity_ids=suggestion.entity_ids,
target_entity_data=merge_target_data,
)
# Update suggestion status to ACCEPTED
await self.db_ops.update_suggestion_status(suggestion_id, MergeSuggestionStatus.ACCEPTED, utc_now())
logger.info(f"Suggestion {suggestion_id} has been accepted and merge completed")
return {
"status": "success",
"message": f"Suggestion {suggestion_id} has been accepted and merge completed",
"suggestion_id": suggestion_id,
"action": normalized_action,
"merge_result": merge_result,
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@earayu earayu merged commit d2f6cbc into main Jul 11, 2025
6 of 7 checks passed
@earayu earayu deleted the feature/bugfix_merge_nodes branch July 11, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants