Skip to content

Fix trace deletion endpoint to validate successful deletion (Issue #155) - #165

Open
anshul23102 wants to merge 1 commit into
NEXARA-oss:mainfrom
anshul23102:fix/155-trace-deletion
Open

Fix trace deletion endpoint to validate successful deletion (Issue #155)#165
anshul23102 wants to merge 1 commit into
NEXARA-oss:mainfrom
anshul23102:fix/155-trace-deletion

Conversation

@anshul23102

Copy link
Copy Markdown
Contributor

Summary

The DELETE /api/traces/{executionId} endpoint previously returned 200 OK without confirming that traces were actually deleted from the database. This masked silent failures and violated GDPR compliance requirements for right-to-erasure.

Changes

  • Added deleteTrace() method to PulseInfra class with proper row count validation
  • Added trace:write permission to RBAC system for delete operations
  • Updated permission check in gateway to require trace:write for DELETE requests
  • Added DELETE handler in pulse-trace service

Behavior Changes

  • DELETE now validates deletion and returns appropriate status codes:
    • 200 OK only when traces are actually deleted
    • 404 if trace/execution does not exist
    • Prevents false success responses that could violate data governance

Fixes #155

Testing

  • TypeScript strict mode checks pass for modified packages
  • No merge conflicts
  • Backward compatible (no breaking changes to existing APIs)

Fixes NEXARA-oss#155

The DELETE /api/traces/{executionId} endpoint previously returned 200 OK
without confirming that traces were actually deleted from the database.
This masked silent failures and violated GDPR compliance requirements.

Changes:
- Added deleteTrace() method to PulseInfra class with proper row count validation
- Added trace:write permission to RBAC system
- Added DELETE endpoint in pulse-gateway that requires trace:write permission
- Added DELETE handler in pulse-trace service that validates deletion success

Now returns 404 if trace does not exist, preventing false success responses
that could violate data governance policies.
@anshul23102

Copy link
Copy Markdown
Contributor Author

Hi @NEXARA-oss team! 👋

I've completed the implementation for Issue #155 (Trace deletion endpoint validation).

What's Included

✅ Proper database deletion confirmation before returning success
✅ New trace:write permission for delete operations
✅ 404 responses when trace doesn't exist (prevents silent failures)
✅ Full TypeScript type safety and compliance with existing patterns
✅ GDPR/right-to-erasure compliance improvements

For Review

When reviewing, labels that would be valuable for tracking:

  • gssoc-approved (essential for GSSoC 2026 contribution credit)
  • bug (fixes silent failure bug)
  • security (improves compliance and data governance)
  • critical (impacts GDPR compliance requirements)

Ready for your review! 🚀


Contributed as part of GSSoC 2026

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.

[BUG] Trace deletion endpoint returns 200 OK before confirming database deletion, masking silent failures

1 participant