Skip to content

Conversation

@ViaSocket-Git
Copy link
Collaborator

resource is now being deleted

@ViaSocket-Git
Copy link
Collaborator Author

/windsurf-review

Copy link
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

@ViaSocket-Git ViaSocket-Git force-pushed the KB_resource_deletion branch 2 times, most recently from 5ae7f17 to a58812e Compare January 15, 2026 12:29
@ViaSocket-Git ViaSocket-Git changed the title resource deletionfrom kb resource deletion from kb Jan 15, 2026
@ViaSocket-Git
Copy link
Collaborator Author

/windsurf-review

Copy link
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

Other comments (3)
  • src/db_services/agentVersion.service.js (570-587) This function modifies documents but doesn't invalidate related cache entries. Other functions in this file (like `updateAgents` and `deleteAgentVersion`) use `_buildCacheKeys` and `deleteInCache` to maintain cache consistency. Consider adding cache invalidation to prevent stale data.
  • src/controllers/rag.controller.js (405-408) While logging cleanup errors is good, consider implementing a more robust error handling strategy for the resource reference cleanup. Orphaned references could cause issues later. You might want to add a background job or retry mechanism for failed cleanups.
  • src/db_services/agentVersion.service.js (570-570) This function lacks JSDoc documentation explaining its purpose, parameters, and return value. Consider adding documentation to maintain consistency with the codebase and improve maintainability.

💡 To request another review, post a new comment with "/windsurf-review".

});

// If external deletion was successful
if (response.status === 200) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The status check response.status === 200 might be too restrictive. Consider using response.status >= 200 && response.status < 300 to handle all successful HTTP responses, as some APIs might return 204 No Content for successful deletions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no issue

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.

2 participants